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 CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 public PrivetDeviceLister::Delegate, | 46 public PrivetDeviceLister::Delegate, |
47 public CloudDeviceListDelegate, | 47 public CloudDeviceListDelegate, |
48 public SigninManagerBase::Observer { | 48 public SigninManagerBase::Observer { |
49 public: | 49 public: |
50 LocalDiscoveryUIHandler(); | 50 LocalDiscoveryUIHandler(); |
51 virtual ~LocalDiscoveryUIHandler(); | 51 virtual ~LocalDiscoveryUIHandler(); |
52 | 52 |
53 static bool GetHasVisible(); | 53 static bool GetHasVisible(); |
54 | 54 |
55 // WebUIMessageHandler implementation. | 55 // WebUIMessageHandler implementation. |
56 virtual void RegisterMessages() OVERRIDE; | 56 virtual void RegisterMessages() override; |
57 // PrivetRegisterOperation::Delegate implementation. | 57 // PrivetRegisterOperation::Delegate implementation. |
58 virtual void OnPrivetRegisterClaimToken( | 58 virtual void OnPrivetRegisterClaimToken( |
59 PrivetRegisterOperation* operation, | 59 PrivetRegisterOperation* operation, |
60 const std::string& token, | 60 const std::string& token, |
61 const GURL& url) OVERRIDE; | 61 const GURL& url) override; |
62 virtual void OnPrivetRegisterError( | 62 virtual void OnPrivetRegisterError( |
63 PrivetRegisterOperation* operation, | 63 PrivetRegisterOperation* operation, |
64 const std::string& action, | 64 const std::string& action, |
65 PrivetRegisterOperation::FailureReason reason, | 65 PrivetRegisterOperation::FailureReason reason, |
66 int printer_http_code, | 66 int printer_http_code, |
67 const base::DictionaryValue* json) OVERRIDE; | 67 const base::DictionaryValue* json) override; |
68 virtual void OnPrivetRegisterDone( | 68 virtual void OnPrivetRegisterDone( |
69 PrivetRegisterOperation* operation, | 69 PrivetRegisterOperation* operation, |
70 const std::string& device_id) OVERRIDE; | 70 const std::string& device_id) override; |
71 | 71 |
72 // PrivetV3SetupFlow::Delegate implementation. | 72 // PrivetV3SetupFlow::Delegate implementation. |
73 virtual scoped_ptr<GCDApiFlow> CreateApiFlow() OVERRIDE; | 73 virtual scoped_ptr<GCDApiFlow> CreateApiFlow() override; |
74 virtual void GetWiFiCredentials(const CredentialsCallback& callback) OVERRIDE; | 74 virtual void GetWiFiCredentials(const CredentialsCallback& callback) override; |
75 virtual void SwitchToSetupWiFi(const ResultCallback& callback) OVERRIDE; | 75 virtual void SwitchToSetupWiFi(const ResultCallback& callback) override; |
76 virtual void CreatePrivetV3Client( | 76 virtual void CreatePrivetV3Client( |
77 const std::string& service_name, | 77 const std::string& service_name, |
78 const PrivetClientCallback& callback) OVERRIDE; | 78 const PrivetClientCallback& callback) override; |
79 virtual void ConfirmSecurityCode(const std::string& confirmation_code, | 79 virtual void ConfirmSecurityCode(const std::string& confirmation_code, |
80 const ResultCallback& callback) OVERRIDE; | 80 const ResultCallback& callback) override; |
81 virtual void RestoreWifi(const ResultCallback& callback) OVERRIDE; | 81 virtual void RestoreWifi(const ResultCallback& callback) override; |
82 virtual void OnSetupDone() OVERRIDE; | 82 virtual void OnSetupDone() override; |
83 virtual void OnSetupError() OVERRIDE; | 83 virtual void OnSetupError() override; |
84 | 84 |
85 // PrivetDeviceLister::Delegate implementation. | 85 // PrivetDeviceLister::Delegate implementation. |
86 virtual void DeviceChanged(bool added, | 86 virtual void DeviceChanged(bool added, |
87 const std::string& name, | 87 const std::string& name, |
88 const DeviceDescription& description) OVERRIDE; | 88 const DeviceDescription& description) override; |
89 virtual void DeviceRemoved(const std::string& name) OVERRIDE; | 89 virtual void DeviceRemoved(const std::string& name) override; |
90 virtual void DeviceCacheFlushed() OVERRIDE; | 90 virtual void DeviceCacheFlushed() override; |
91 | 91 |
92 // CloudDeviceListDelegate implementation. | 92 // CloudDeviceListDelegate implementation. |
93 virtual void OnDeviceListReady(const std::vector<Device>& devices) OVERRIDE; | 93 virtual void OnDeviceListReady(const std::vector<Device>& devices) override; |
94 virtual void OnDeviceListUnavailable() OVERRIDE; | 94 virtual void OnDeviceListUnavailable() override; |
95 | 95 |
96 // SigninManagerBase::Observer implementation. | 96 // SigninManagerBase::Observer implementation. |
97 virtual void GoogleSigninSucceeded(const std::string& account_id, | 97 virtual void GoogleSigninSucceeded(const std::string& account_id, |
98 const std::string& username, | 98 const std::string& username, |
99 const std::string& password) OVERRIDE; | 99 const std::string& password) override; |
100 virtual void GoogleSignedOut(const std::string& account_id, | 100 virtual void GoogleSignedOut(const std::string& account_id, |
101 const std::string& username) OVERRIDE; | 101 const std::string& username) override; |
102 | 102 |
103 private: | 103 private: |
104 typedef std::map<std::string, DeviceDescription> DeviceDescriptionMap; | 104 typedef std::map<std::string, DeviceDescription> DeviceDescriptionMap; |
105 | 105 |
106 // Message handlers: | 106 // Message handlers: |
107 // For when the page is ready to receive device notifications. | 107 // For when the page is ready to receive device notifications. |
108 void HandleStart(const base::ListValue* args); | 108 void HandleStart(const base::ListValue* args); |
109 | 109 |
110 // For when a visibility change occurs. | 110 // For when a visibility change occurs. |
111 void HandleIsVisible(const base::ListValue* args); | 111 void HandleIsVisible(const base::ListValue* args); |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 scoped_ptr<wifi::BootstrappingDeviceLister> bootstrapping_device_lister_; | 233 scoped_ptr<wifi::BootstrappingDeviceLister> bootstrapping_device_lister_; |
234 #endif | 234 #endif |
235 | 235 |
236 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler); | 236 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler); |
237 }; | 237 }; |
238 | 238 |
239 #undef CLOUD_PRINT_CONNECTOR_UI_AVAILABLE | 239 #undef CLOUD_PRINT_CONNECTOR_UI_AVAILABLE |
240 | 240 |
241 } // namespace local_discovery | 241 } // namespace local_discovery |
242 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ | 242 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ |
OLD | NEW |