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

Side by Side Diff: remoting/host/win/elevated_controller.h

Issue 884713010: Remove ElevatedController (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating comment Created 5 years, 10 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
« no previous file with comments | « remoting/host/win/chromoting_module.cc ('k') | remoting/host/win/elevated_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_WIN_ELEVATED_CONTROLLER_H_
6 #define REMOTING_HOST_WIN_ELEVATED_CONTROLLER_H_
7
8 #include <atlbase.h>
9 #include <atlcom.h>
10 #include <atlctl.h>
11
12 #include "remoting/base/scoped_sc_handle_win.h"
13
14 // chromoting_lib.h contains MIDL-generated declarations.
15 #include "remoting/host/chromoting_lib.h"
16
17 namespace remoting {
18
19 class __declspec(uuid(DAEMON_CONTROLLER_CLSID)) ElevatedController
20 : public ATL::CComObjectRootEx<ATL::CComSingleThreadModel>,
21 public ATL::CComCoClass<ElevatedController,
22 &__uuidof(ElevatedController)>,
23 public ATL::IDispatchImpl<IDaemonControl2, &IID_IDaemonControl2,
24 &LIBID_ChromotingLib, 1, 0> {
25 public:
26 // Declare a class factory which must not lock the ATL module. This is the
27 // same as DECLARE_CLASSFACTORY() with the exception that
28 // ATL::CComObjectNoLock is used unconditionally.
29 //
30 // By default ATL generates locking class factories (by wrapping them in
31 // ATL::CComObjectCached) for classes hosted in a DLL. This class is compiled
32 // into a DLL but it is registered as an out-of-process class, so its class
33 // factory should not use locking.
34 typedef ATL::CComCreator<ATL::CComObjectNoLock<ATL::CComClassFactory> >
35 _ClassFactoryCreatorClass;
36
37 ElevatedController();
38
39 HRESULT FinalConstruct();
40 void FinalRelease();
41
42 // IDaemonControl implementation.
43 STDMETHOD(GetConfig)(BSTR* config_out);
44 STDMETHOD(GetVersion)(BSTR* version_out);
45 STDMETHOD(SetConfig)(BSTR config);
46 STDMETHOD(SetOwnerWindow)(LONG_PTR owner_window);
47 STDMETHOD(StartDaemon)();
48 STDMETHOD(StopDaemon)();
49 STDMETHOD(UpdateConfig)(BSTR config);
50
51 // IDaemonControl2 implementation.
52 STDMETHOD(GetUsageStatsConsent)(BOOL* allowed, BOOL* set_by_policy);
53 STDMETHOD(SetUsageStatsConsent)(BOOL allowed);
54
55 DECLARE_NO_REGISTRY()
56
57 private:
58 HRESULT OpenService(ScopedScHandle* service_out);
59
60 BEGIN_COM_MAP(ElevatedController)
61 COM_INTERFACE_ENTRY(IDaemonControl)
62 COM_INTERFACE_ENTRY(IDaemonControl2)
63 COM_INTERFACE_ENTRY(IDispatch)
64 END_COM_MAP()
65
66 // Handle of the owner window (if any) for any UI to be shown.
67 HWND owner_window_;
68
69 DECLARE_PROTECT_FINAL_CONSTRUCT()
70 };
71
72 } // namespace remoting
73
74 #endif // REMOTING_HOST_WIN_ELEVATED_CONTROLLER_H_
OLDNEW
« no previous file with comments | « remoting/host/win/chromoting_module.cc ('k') | remoting/host/win/elevated_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698