Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(277)

Unified Diff: chrome/browser/service/service_process_control.h

Issue 3450021: Cloud print proxy management UI. (Closed)
Patch Set: Fix nits. Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/service/service_process_control.h
diff --git a/chrome/browser/service/service_process_control.h b/chrome/browser/service/service_process_control.h
index 53f40dee288986ff811c4c6eba7d82ff2e0f407f..46c2a188e23230efb30aefea514035f836587e6f 100644
--- a/chrome/browser/service/service_process_control.h
+++ b/chrome/browser/service/service_process_control.h
@@ -6,8 +6,10 @@
#define CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_
#include <queue>
+#include <string>
#include "base/id_map.h"
+#include "base/callback.h"
#include "base/process.h"
#include "base/scoped_ptr.h"
#include "base/task.h"
@@ -69,6 +71,10 @@ class ServiceProcessControl : public IPC::Channel::Sender,
// IPC::Channel::Sender implementation
virtual bool Send(IPC::Message* message);
+ // Message handlers
+ void OnGoodDay();
+ void OnCloudPrintProxyIsEnabled(bool enabled, std::string email);
+
// Send a hello message to the service process for testing purpose.
// Return true if the message was sent.
bool SendHello();
@@ -84,6 +90,13 @@ class ServiceProcessControl : public IPC::Channel::Sender,
const std::string& remoting_token,
const std::string& talk_token);
+ // Send a message to the service process to request a response
+ // containing the enablement status of the cloud print proxy and the
+ // registered email address. The callback gets the information when
+ // received.
+ bool GetCloudPrintProxyStatus(
+ Callback2<bool, std::string>::Type* cloud_print_status_callback);
+
// Set the message handler for receiving messages from the service process.
// TODO(hclam): Allow more than 1 handler.
void SetMessageHandler(MessageHandler* message_handler) {
@@ -113,8 +126,12 @@ class ServiceProcessControl : public IPC::Channel::Sender,
// connect.
scoped_ptr<Task> connect_done_task_;
+ // 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_;
+
// Handler for messages from service process.
MessageHandler* message_handler_;
};
-#endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_H_
+#endif // CHROME_BROWSER_SERVICE_SERVICE_PROCESS_CONTROL_H_

Powered by Google App Engine
This is Rietveld 408576698