| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ | 5 #ifndef REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ |
| 6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ | 6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/timer/timer.h" | 9 #include "base/timer/timer.h" |
| 10 #include "base/win/scoped_comptr.h" | 10 #include "base/win/scoped_comptr.h" |
| 11 // chromoting_lib.h contains MIDL-generated declarations. | 11 // chromoting_lib.h contains MIDL-generated declarations. |
| 12 #include "remoting/host/chromoting_lib.h" | 12 #include "remoting/host/chromoting_lib.h" |
| 13 #include "remoting/host/setup/daemon_controller.h" | 13 #include "remoting/host/setup/daemon_controller.h" |
| 14 #include "remoting/host/setup/daemon_installer_win.h" | 14 #include "remoting/host/setup/daemon_installer_win.h" |
| 15 | 15 |
| 16 namespace remoting { | 16 namespace remoting { |
| 17 | 17 |
| 18 class DaemonInstallerWin; | 18 class DaemonInstallerWin; |
| 19 | 19 |
| 20 class DaemonControllerDelegateWin : public DaemonController::Delegate { | 20 class DaemonControllerDelegateWin : public DaemonController::Delegate { |
| 21 public: | 21 public: |
| 22 DaemonControllerDelegateWin(); | 22 DaemonControllerDelegateWin(); |
| 23 virtual ~DaemonControllerDelegateWin(); | 23 virtual ~DaemonControllerDelegateWin(); |
| 24 | 24 |
| 25 // DaemonController::Delegate interface. | 25 // DaemonController::Delegate interface. |
| 26 virtual DaemonController::State GetState() OVERRIDE; | 26 virtual DaemonController::State GetState() override; |
| 27 virtual scoped_ptr<base::DictionaryValue> GetConfig() OVERRIDE; | 27 virtual scoped_ptr<base::DictionaryValue> GetConfig() override; |
| 28 virtual void InstallHost( | 28 virtual void InstallHost( |
| 29 const DaemonController::CompletionCallback& done) OVERRIDE; | 29 const DaemonController::CompletionCallback& done) override; |
| 30 virtual void SetConfigAndStart( | 30 virtual void SetConfigAndStart( |
| 31 scoped_ptr<base::DictionaryValue> config, | 31 scoped_ptr<base::DictionaryValue> config, |
| 32 bool consent, | 32 bool consent, |
| 33 const DaemonController::CompletionCallback& done) OVERRIDE; | 33 const DaemonController::CompletionCallback& done) override; |
| 34 virtual void UpdateConfig( | 34 virtual void UpdateConfig( |
| 35 scoped_ptr<base::DictionaryValue> config, | 35 scoped_ptr<base::DictionaryValue> config, |
| 36 const DaemonController::CompletionCallback& done) OVERRIDE; | 36 const DaemonController::CompletionCallback& done) override; |
| 37 virtual void Stop(const DaemonController::CompletionCallback& done) OVERRIDE; | 37 virtual void Stop(const DaemonController::CompletionCallback& done) override; |
| 38 virtual void SetWindow(void* window_handle) OVERRIDE; | 38 virtual void SetWindow(void* window_handle) override; |
| 39 virtual std::string GetVersion() OVERRIDE; | 39 virtual std::string GetVersion() override; |
| 40 virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() OVERRIDE; | 40 virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 // Activates an unprivileged instance of the daemon controller and caches it. | 43 // Activates an unprivileged instance of the daemon controller and caches it. |
| 44 HRESULT ActivateController(); | 44 HRESULT ActivateController(); |
| 45 | 45 |
| 46 // Activates an instance of the daemon controller and caches it. If COM | 46 // Activates an instance of the daemon controller and caches it. If COM |
| 47 // Elevation is supported (Vista+) the activated instance is elevated, | 47 // Elevation is supported (Vista+) the activated instance is elevated, |
| 48 // otherwise it is activated under credentials of the caller. | 48 // otherwise it is activated under credentials of the caller. |
| 49 HRESULT ActivateElevatedController(); | 49 HRESULT ActivateElevatedController(); |
| 50 | 50 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 78 HWND window_handle_; | 78 HWND window_handle_; |
| 79 | 79 |
| 80 scoped_ptr<DaemonInstallerWin> installer_; | 80 scoped_ptr<DaemonInstallerWin> installer_; |
| 81 | 81 |
| 82 DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateWin); | 82 DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateWin); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 } // namespace remoting | 85 } // namespace remoting |
| 86 | 86 |
| 87 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ | 87 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_WIN_H_ |
| OLD | NEW |