| Index: chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
|
| diff --git a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
|
| index a9f35d36ab4f4441117b950b7cdb9282ab11a0db..82d3abb181d1614bdf5567918354ea2d045c2a35 100644
|
| --- a/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
|
| +++ b/chrome/browser/ui/webui/local_discovery/local_discovery_ui_handler.h
|
| @@ -11,6 +11,7 @@
|
|
|
| #include "base/cancelable_callback.h"
|
| #include "base/prefs/pref_member.h"
|
| +#include "chrome/browser/local_discovery/cloud_device_list.h"
|
| #include "chrome/browser/local_discovery/cloud_print_printer_list.h"
|
| #include "chrome/browser/local_discovery/privet_device_lister.h"
|
| #include "chrome/browser/local_discovery/privet_http.h"
|
| @@ -36,6 +37,7 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
| public PrivetRegisterOperation::Delegate,
|
| public PrivetDeviceLister::Delegate,
|
| public CloudPrintPrinterList::Delegate,
|
| + public CloudDeviceList::Delegate,
|
| public SigninManagerBase::Observer {
|
| public:
|
| LocalDiscoveryUIHandler();
|
| @@ -74,9 +76,12 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
|
|
| // CloudPrintPrinterList::Delegate implementation.
|
| virtual void OnCloudPrintPrinterListReady() OVERRIDE;
|
| -
|
| virtual void OnCloudPrintPrinterListUnavailable() OVERRIDE;
|
|
|
| + // CloudDeviceList::Delegate implementation.
|
| + virtual void OnCloudDeviceListReady() OVERRIDE;
|
| + virtual void OnCloudDeviceListUnavailable() OVERRIDE;
|
| +
|
| // SigninManagerBase::Observer implementation.
|
| virtual void GoogleSigninSucceeded(const std::string& username,
|
| const std::string& password) OVERRIDE;
|
| @@ -96,11 +101,11 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
| // For when a user choice is made.
|
| void HandleRegisterDevice(const base::ListValue* args);
|
|
|
| - // For when a cancelation is made.
|
| + // For when a cancellation is made.
|
| void HandleCancelRegistration(const base::ListValue* args);
|
|
|
| - // For requesting the printer list.
|
| - void HandleRequestPrinterList(const base::ListValue* args);
|
| + // For requesting the device list.
|
| + void HandleRequestDeviceList(const base::ListValue* args);
|
|
|
| // For opening URLs (relative to the Google Cloud Print base URL) in a new
|
| // tab.
|
| @@ -135,6 +140,8 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
|
|
| scoped_ptr<base::DictionaryValue> CreatePrinterInfo(
|
| const CloudPrintPrinterList::PrinterDetails& description);
|
| + scoped_ptr<base::DictionaryValue> CreateDeviceInfo(
|
| + const CloudDeviceList::DeviceDetails& description);
|
|
|
| // Announcement hasn't been sent for a certain time after registration
|
| // finished. Consider it failed.
|
| @@ -143,6 +150,8 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
|
|
| void CheckUserLoggedIn();
|
|
|
| + void CheckListingDone();
|
| +
|
| #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE)
|
| void StartCloudPrintConnector();
|
| void OnCloudPrintPrefsChanged();
|
| @@ -182,6 +191,8 @@ class LocalDiscoveryUIHandler : public content::WebUIMessageHandler,
|
|
|
| // List of printers from cloud print.
|
| scoped_ptr<CloudPrintPrinterList> cloud_print_printer_list_;
|
| + scoped_ptr<CloudDeviceList> cloud_device_list_;
|
| + scoped_ptr<base::ListValue> devices_list_;
|
|
|
| #if defined(CLOUD_PRINT_CONNECTOR_UI_AVAILABLE)
|
| StringPrefMember cloud_print_connector_email_;
|
|
|