Index: remoting/host/setup/me2me_native_messaging_host.h |
diff --git a/remoting/host/setup/me2me_native_messaging_host.h b/remoting/host/setup/me2me_native_messaging_host.h |
index 704e5db8a2959ba099ad3f63df15ee14df646df5..71c115fe4af38e96b7196fafeace145440571ad7 100644 |
--- a/remoting/host/setup/me2me_native_messaging_host.h |
+++ b/remoting/host/setup/me2me_native_messaging_host.h |
@@ -28,8 +28,8 @@ namespace protocol { |
class PairingRegistry; |
} // namespace protocol |
-// Implementation of the native messaging host process. |
-class NativeMessagingHost : public NativeMessagingChannel::Delegate { |
+// Implementation of the me2me native messaging host. |
+class NativeMessagingHost { |
public: |
typedef NativeMessagingChannel::SendMessageCallback SendMessageCallback; |
@@ -39,13 +39,15 @@ class NativeMessagingHost : public NativeMessagingChannel::Delegate { |
scoped_ptr<OAuthClient> oauth_client); |
virtual ~NativeMessagingHost(); |
- // NativeMessagingChannel::Delegate interface. |
- virtual void SetSendMessageCallback( |
- const SendMessageCallback& send_message) OVERRIDE; |
- virtual void ProcessMessage( |
- scoped_ptr<base::DictionaryValue> message) OVERRIDE; |
+ void Start( |
+ base::PlatformFile input, |
+ base::PlatformFile output, |
+ const base::Closure& quit_closure); |
+ void ShutDown(); |
private: |
+ void ProcessMessage(scoped_ptr<base::DictionaryValue> message); |
+ |
// These "Process.." methods handle specific request types. The |response| |
// dictionary is pre-filled by ProcessMessage() with the parts of the |
// response already known ("id" and "type" fields). |
@@ -114,6 +116,9 @@ class NativeMessagingHost : public NativeMessagingChannel::Delegate { |
const std::string& user_email, |
const std::string& refresh_token); |
+ base::Closure quit_closure_; |
+ |
+ scoped_ptr<NativeMessagingChannel> channel_; |
scoped_refptr<DaemonController> daemon_controller_; |
// Used to load and update the paired clients for this host. |
@@ -124,7 +129,6 @@ class NativeMessagingHost : public NativeMessagingChannel::Delegate { |
base::ThreadChecker thread_checker_; |
- SendMessageCallback send_message_; |
base::WeakPtr<NativeMessagingHost> weak_ptr_; |
base::WeakPtrFactory<NativeMessagingHost> weak_factory_; |