Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / remoting / host / setup / daemon_controller_delegate_mac.h
blob8b65d404790755a5223de2a0623e77b0843a84e9
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
3 // found in the LICENSE file.
5 #ifndef REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_
6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "remoting/host/setup/daemon_controller.h"
12 namespace remoting {
14 class DaemonControllerDelegateMac : public DaemonController::Delegate {
15 public:
16 DaemonControllerDelegateMac();
17 virtual ~DaemonControllerDelegateMac();
19 // DaemonController::Delegate interface.
20 virtual DaemonController::State GetState() OVERRIDE;
21 virtual scoped_ptr<base::DictionaryValue> GetConfig() OVERRIDE;
22 virtual void InstallHost(
23 const DaemonController::CompletionCallback& done) OVERRIDE;
24 virtual void SetConfigAndStart(
25 scoped_ptr<base::DictionaryValue> config,
26 bool consent,
27 const DaemonController::CompletionCallback& done) OVERRIDE;
28 virtual void UpdateConfig(
29 scoped_ptr<base::DictionaryValue> config,
30 const DaemonController::CompletionCallback& done) OVERRIDE;
31 virtual void Stop(const DaemonController::CompletionCallback& done) OVERRIDE;
32 virtual void SetWindow(void* window_handle) OVERRIDE;
33 virtual std::string GetVersion() OVERRIDE;
34 virtual DaemonController::UsageStatsConsent GetUsageStatsConsent() OVERRIDE;
36 private:
37 void ShowPreferencePane(const std::string& config_data,
38 const DaemonController::CompletionCallback& done);
39 void RegisterForPreferencePaneNotifications(
40 const DaemonController::CompletionCallback &done);
41 void DeregisterForPreferencePaneNotifications();
42 void PreferencePaneCallbackDelegate(CFStringRef name);
44 static bool DoShowPreferencePane(const std::string& config_data);
45 static void PreferencePaneCallback(CFNotificationCenterRef center,
46 void* observer,
47 CFStringRef name,
48 const void* object,
49 CFDictionaryRef user_info);
51 DaemonController::CompletionCallback current_callback_;
53 DISALLOW_COPY_AND_ASSIGN(DaemonControllerDelegateMac);
56 } // namespace remoting
58 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_DELEGATE_MAC_H_