diff options
author | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 20:41:35 +0000 |
---|---|---|
committer | sanjeevr@chromium.org <sanjeevr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-11 20:41:35 +0000 |
commit | de119cf2b1e0cc6b6ab2352812adb14726633413 (patch) | |
tree | a43fe7e052f03a0bd9c3a54c317c2a8a71f7df8d /chrome/browser/service/service_process_control.h | |
parent | e64648531fc7386c139dffadefa746996264b90f (diff) | |
download | chromium_src-de119cf2b1e0cc6b6ab2352812adb14726633413.zip chromium_src-de119cf2b1e0cc6b6ab2352812adb14726633413.tar.gz chromium_src-de119cf2b1e0cc6b6ab2352812adb14726633413.tar.bz2 |
Changed the IPC between the browser and the service process to return more detailed information about the cloud print proxy. This is a first step towards the new login mechanism for Cloud Print.
BUG=None
TEST=Unit-tests, enabling disabling cloud print proxy
Review URL: http://codereview.chromium.org/7001012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85038 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/service/service_process_control.h')
-rw-r--r-- | chrome/browser/service/service_process_control.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h index 7a9456b..10e9aa0 100644 --- a/chrome/browser/service/service_process_control.h +++ b/chrome/browser/service/service_process_control.h @@ -23,6 +23,10 @@ class Profile; class CommandLine; +namespace cloud_print { +struct CloudPrintProxyInfo; +} // namespace cloud_print + // A ServiceProcessControl works as a portal between the service process and // the browser process. // @@ -39,6 +43,8 @@ class ServiceProcessControl : public IPC::Channel::Sender, public: typedef IDMap<ServiceProcessControl>::iterator iterator; typedef std::queue<IPC::Message> MessageQueue; + typedef Callback1<const cloud_print::CloudPrintProxyInfo&>::Type + CloudPrintProxyInfoHandler; // Construct a ServiceProcessControl with |profile|.. explicit ServiceProcessControl(Profile* profile); @@ -78,17 +84,18 @@ class ServiceProcessControl : public IPC::Channel::Sender, const NotificationDetails& details); // Message handlers - void OnCloudPrintProxyIsEnabled(bool enabled, std::string email); + void OnCloudPrintProxyInfo( + const cloud_print::CloudPrintProxyInfo& proxy_info); // Send a shutdown message to the service process. IPC channel will be // destroyed after calling this method. // Return true if the message was sent. bool Shutdown(); - // Send request for cloud print proxy status and the registered - // email address. The callback gets the information when received. - bool GetCloudPrintProxyStatus( - Callback2<bool, std::string>::Type* cloud_print_status_callback); + // Send request for cloud print proxy info (enabled state, email, proxy id). + // The callback gets the information when received. + bool GetCloudPrintProxyInfo( + CloudPrintProxyInfoHandler* cloud_print_status_callback); private: // This class is responsible for launching the service process on the @@ -152,7 +159,7 @@ class ServiceProcessControl : public IPC::Channel::Sender, // Callback that gets invoked when a status message is received from // the cloud print proxy. - scoped_ptr<Callback2<bool, std::string>::Type> cloud_print_status_callback_; + scoped_ptr<CloudPrintProxyInfoHandler> cloud_print_info_callback_; NotificationRegistrar registrar_; }; |