Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(385)

Side by Side Diff: remoting/host/elevated_controller_win.h

Issue 10537182: The user's consent to crash dumps reporting can now be set via the UI (Windows only). The checkbox … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_ 5 #ifndef REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_
6 #define REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_ 6 #define REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_
7 7
8 #include <atlbase.h> 8 #include <atlbase.h>
9 #include <atlcom.h> 9 #include <atlcom.h>
10 #include <atlctl.h> 10 #include <atlctl.h>
11 11
12 #include "remoting/base/scoped_sc_handle_win.h" 12 #include "remoting/base/scoped_sc_handle_win.h"
13 13
14 // MIDL-generated declarations. 14 // MIDL-generated declarations.
15 #include "remoting/host/elevated_controller.h" 15 #include "remoting/host/elevated_controller.h"
16 16
17 namespace remoting { 17 namespace remoting {
18 18
19 class ATL_NO_VTABLE ElevatedControllerWin 19 class ATL_NO_VTABLE ElevatedControllerWin
20 : public ATL::CComObjectRootEx<ATL::CComSingleThreadModel>, 20 : public ATL::CComObjectRootEx<ATL::CComSingleThreadModel>,
21 public ATL::CComCoClass<ElevatedControllerWin, &CLSID_ElevatedController>, 21 public ATL::CComCoClass<ElevatedControllerWin, &CLSID_ElevatedController>,
22 public ATL::IDispatchImpl<IDaemonControl, &IID_IDaemonControl, 22 public ATL::IDispatchImpl<IDaemonControl2, &IID_IDaemonControl2,
23 &LIBID_ChromotingElevatedControllerLib, 1, 0> { 23 &LIBID_ChromotingElevatedControllerLib, 1, 1> {
24 public: 24 public:
25 ElevatedControllerWin(); 25 ElevatedControllerWin();
26 26
27 HRESULT FinalConstruct(); 27 HRESULT FinalConstruct();
28 void FinalRelease(); 28 void FinalRelease();
29 29
30 // IDaemonControl implementation. 30 // IDaemonControl implementation.
31 STDMETHOD(GetConfig)(BSTR* config_out); 31 STDMETHOD(GetConfig)(BSTR* config_out);
32 STDMETHOD(GetVersion)(BSTR* version_out); 32 STDMETHOD(GetVersion)(BSTR* version_out);
33 STDMETHOD(SetConfig)(BSTR config); 33 STDMETHOD(SetConfig)(BSTR config);
34 STDMETHOD(SetOwnerWindow)(LONG_PTR owner_window); 34 STDMETHOD(SetOwnerWindow)(LONG_PTR owner_window);
35 STDMETHOD(StartDaemon)(); 35 STDMETHOD(StartDaemon)();
36 STDMETHOD(StopDaemon)(); 36 STDMETHOD(StopDaemon)();
37 STDMETHOD(UpdateConfig)(BSTR config); 37 STDMETHOD(UpdateConfig)(BSTR config);
38 38
39 // IDaemonControl2 implementation.
40 STDMETHOD(GetUsageStatsConsent)(BOOL* allowed, BOOL* set_by_policy);
41 STDMETHOD(SetUsageStatsConsent)(BOOL allowed);
42
39 DECLARE_NO_REGISTRY() 43 DECLARE_NO_REGISTRY()
40 44
41 private: 45 private:
42 HRESULT OpenService(ScopedScHandle* service_out); 46 HRESULT OpenService(ScopedScHandle* service_out);
43 47
44 BEGIN_COM_MAP(ElevatedControllerWin) 48 BEGIN_COM_MAP(ElevatedControllerWin)
45 COM_INTERFACE_ENTRY(IDaemonControl) 49 COM_INTERFACE_ENTRY(IDaemonControl)
50 COM_INTERFACE_ENTRY(IDaemonControl2)
46 COM_INTERFACE_ENTRY(IDispatch) 51 COM_INTERFACE_ENTRY(IDispatch)
47 END_COM_MAP() 52 END_COM_MAP()
48 53
49 // Handle of the owner window (if any) for any UI to be shown. 54 // Handle of the owner window (if any) for any UI to be shown.
50 HWND owner_window_; 55 HWND owner_window_;
51 56
52 DECLARE_PROTECT_FINAL_CONSTRUCT() 57 DECLARE_PROTECT_FINAL_CONSTRUCT()
53 }; 58 };
54 59
55 OBJECT_ENTRY_AUTO(CLSID_ElevatedController, ElevatedControllerWin) 60 OBJECT_ENTRY_AUTO(CLSID_ElevatedController, ElevatedControllerWin)
56 61
57 } // namespace remoting 62 } // namespace remoting
58 63
59 #endif // REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_ 64 #endif // REMOTING_HOST_ELEVATED_CONTROLLER_WIN_H_
OLDNEW
« no previous file with comments | « remoting/host/elevated_controller_module_win.cc ('k') | remoting/host/elevated_controller_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698