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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 scoped_ptr<base::DictionaryValue> CreatePrinterInfo( | 140 scoped_ptr<base::DictionaryValue> CreatePrinterInfo( |
141 const CloudPrintPrinterList::PrinterDetails& description); | 141 const CloudPrintPrinterList::PrinterDetails& description); |
142 | 142 |
143 // Announcement hasn't been sent for a certain time after registration | 143 // Announcement hasn't been sent for a certain time after registration |
144 // finished. Consider it failed. | 144 // finished. Consider it failed. |
145 // TODO(noamsml): Re-resolve service first. | 145 // TODO(noamsml): Re-resolve service first. |
146 void OnAnnouncementTimeoutReached(); | 146 void OnAnnouncementTimeoutReached(); |
147 | 147 |
148 void CheckUserLoggedIn(); | 148 void CheckUserLoggedIn(); |
149 | 149 |
150 void ScheduleQuery(int timeout_seconds); | |
151 | |
152 void SendQuery(int next_timeout_seconds); | |
153 | |
154 #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) | 150 #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) |
155 void StartCloudPrintConnector(); | 151 void StartCloudPrintConnector(); |
156 void OnCloudPrintPrefsChanged(); | 152 void OnCloudPrintPrefsChanged(); |
157 void ShowCloudPrintSetupDialog(const base::ListValue* args); | 153 void ShowCloudPrintSetupDialog(const base::ListValue* args); |
158 void HandleDisableCloudPrintConnector(const base::ListValue* args); | 154 void HandleDisableCloudPrintConnector(const base::ListValue* args); |
159 void SetupCloudPrintConnectorSection(); | 155 void SetupCloudPrintConnectorSection(); |
160 void RemoveCloudPrintConnectorSection(); | 156 void RemoveCloudPrintConnectorSection(); |
161 void RefreshCloudPrintStatusFromService(); | 157 void RefreshCloudPrintStatusFromService(); |
162 #endif | 158 #endif |
163 | 159 |
(...skipping 20 matching lines...) Expand all Loading... |
184 | 180 |
185 // A map of current device descriptions provided by the PrivetDeviceLister. | 181 // A map of current device descriptions provided by the PrivetDeviceLister. |
186 DeviceDescriptionMap device_descriptions_; | 182 DeviceDescriptionMap device_descriptions_; |
187 | 183 |
188 // Whether or not the page is marked as visible. | 184 // Whether or not the page is marked as visible. |
189 bool is_visible_; | 185 bool is_visible_; |
190 | 186 |
191 // List of printers from cloud print. | 187 // List of printers from cloud print. |
192 scoped_ptr<CloudPrintPrinterList> cloud_print_printer_list_; | 188 scoped_ptr<CloudPrintPrinterList> cloud_print_printer_list_; |
193 | 189 |
194 // Callback for requery. | |
195 base::CancelableCallback<void()> requery_callback_; | |
196 | |
197 #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) | 190 #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE) |
198 StringPrefMember cloud_print_connector_email_; | 191 StringPrefMember cloud_print_connector_email_; |
199 BooleanPrefMember cloud_print_connector_enabled_; | 192 BooleanPrefMember cloud_print_connector_enabled_; |
200 bool cloud_print_connector_ui_enabled_; | 193 bool cloud_print_connector_ui_enabled_; |
201 #endif | 194 #endif |
202 | 195 |
203 content::NotificationRegistrar notification_registrar_; | 196 content::NotificationRegistrar notification_registrar_; |
204 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler); | 197 DISALLOW_COPY_AND_ASSIGN(LocalDiscoveryUIHandler); |
205 }; | 198 }; |
206 | 199 |
207 #undef CLOUD_PRINT_CONNECTOR_UI_AVAILABLE | 200 #undef CLOUD_PRINT_CONNECTOR_UI_AVAILABLE |
208 | 201 |
209 } // namespace local_discovery | 202 } // namespace local_discovery |
210 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ | 203 #endif // CHROME_BROWSER_UI_WEBUI_LOCAL_DISCOVERY_LOCAL_DISCOVERY_UI_HANDLER_H_ |
OLD | NEW |