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_MAC_H_ | 5 #ifndef REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_ |
6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_ | 6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_ |
7 | 7 |
8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "remoting/host/setup/daemon_controller.h" | 10 #include "remoting/host/setup/daemon_controller.h" |
11 | 11 |
12 namespace remoting { | 12 namespace remoting { |
13 | 13 |
14 class DaemonControllerDelegateMac : public DaemonController::Delegate { | 14 class DaemonControllerDelegateMac : public DaemonController::Delegate { |
15 public: | 15 public: |
16 DaemonControllerDelegateMac(); | 16 DaemonControllerDelegateMac(); |
17 virtual ~DaemonControllerDelegateMac(); | 17 ~DaemonControllerDelegateMac() override; |
18 | 18 |
19 // DaemonController::Delegate interface. | 19 // DaemonController::Delegate interface. |
20 virtual DaemonController::State GetState() override; | 20 DaemonController::State GetState() override; |
21 virtual scoped_ptr<base::DictionaryValue> GetConfig() override; | 21 scoped_ptr<base::DictionaryValue> GetConfig() override; |
22 virtual void InstallHost( | 22 void InstallHost(const DaemonController::CompletionCallback& done) override; |
23 const DaemonController::CompletionCallback& done) override; | 23 void SetConfigAndStart( |
24 virtual void SetConfigAndStart( | |
25 scoped_ptr<base::DictionaryValue> config, | 24 scoped_ptr<base::DictionaryValue> config, |
26 bool consent, | 25 bool consent, |
27 const DaemonController::CompletionCallback& done) override; | 26 const DaemonController::CompletionCallback& done) override; |
28 virtual void UpdateConfig( | 27 void UpdateConfig(scoped_ptr<base::DictionaryValue> config, |
29 scoped_ptr<base::DictionaryValue> config, | 28 const DaemonController::CompletionCallback& done) override; |
30 const DaemonController::CompletionCallback& done) override; | 29 void Stop(const DaemonController::CompletionCallback& done) override; |
31 virtual void Stop(const DaemonController::CompletionCallback& done) override; | 30 void SetWindow(void* window_handle) override; |
32 virtual void SetWindow(void* window_handle) override; | 31 std::string GetVersion() override; |
33 virtual std::string GetVersion() override; | 32 DaemonController::UsageStatsConsent GetUsageStatsConsent() override; |
34 virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() override; | |
35 | 33 |
36 private: | 34 private: |
37 void ShowPreferencePane(const std::string& config_data, | 35 void ShowPreferencePane(const std::string& config_data, |
38 const DaemonController::CompletionCallback& done); | 36 const DaemonController::CompletionCallback& done); |
39 void RegisterForPreferencePaneNotifications( | 37 void RegisterForPreferencePaneNotifications( |
40 const DaemonController::CompletionCallback &done); | 38 const DaemonController::CompletionCallback &done); |
41 void DeregisterForPreferencePaneNotifications(); | 39 void DeregisterForPreferencePaneNotifications(); |
42 void PreferencePaneCallbackDelegate(CFStringRef name); | 40 void PreferencePaneCallbackDelegate(CFStringRef name); |
43 | 41 |
44 static bool DoShowPreferencePane(const std::string& config_data); | 42 static bool DoShowPreferencePane(const std::string& config_data); |
45 static void PreferencePaneCallback(CFNotificationCenterRef center, | 43 static void PreferencePaneCallback(CFNotificationCenterRef center, |
46 void* observer, | 44 void* observer, |
47 CFStringRef name, | 45 CFStringRef name, |
48 const void* object, | 46 const void* object, |
49 CFDictionaryRef user_info); | 47 CFDictionaryRef user_info); |
50 | 48 |
51 DaemonController::CompletionCallback current_callback_; | 49 DaemonController::CompletionCallback current_callback_; |
52 | 50 |
53 DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateMac); | 51 DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateMac); |
54 }; | 52 }; |
55 | 53 |
56 } // namespace remoting | 54 } // namespace remoting |
57 | 55 |
58 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_ | 56 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_ |
OLD | NEW |