Index: content/common/message_port.h |
diff --git a/content/common/message_port.h b/content/common/message_port.h |
index e63d0205fc1cd07f244cb3f7d35bd25c3ccda4f4..fbd7280af934dace99ca09f97706db9bf5871274 100644 |
--- a/content/common/message_port.h |
+++ b/content/common/message_port.h |
@@ -13,6 +13,7 @@ |
#include "base/strings/string16.h" |
#include "content/common/content_export.h" |
#include "mojo/public/cpp/system/message_pipe.h" |
+#include "mojo/public/cpp/system/watcher.h" |
namespace content { |
@@ -82,17 +83,25 @@ class CONTENT_EXPORT MessagePort { |
void AddWatch(); |
void CancelWatch(); |
- static void OnHandleReady(uintptr_t context, |
- MojoResult result, |
- MojoHandleSignalsState signals_state, |
- MojoWatchNotificationFlags flags); |
+ mojo::ScopedWatcherHandle watcher_handle_; |
mojo::ScopedMessagePipeHandle handle_; |
base::Closure callback_; |
private: |
friend class base::RefCountedThreadSafe<State>; |
+ |
~State(); |
+ |
+ void ArmWatcher(); |
+ void OnHandleReady(MojoResult result); |
+ |
+ static void CallOnHandleReady(uintptr_t context, |
+ MojoResult result, |
+ MojoHandleSignalsState signals_state, |
+ MojoWatcherNotificationFlags flags); |
+ |
+ uintptr_t context_; |
}; |
mutable scoped_refptr<State> state_; |
}; |