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

Unified Diff: content/common/message_port.h

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 9 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
« no previous file with comments | « content/child/web_data_consumer_handle_impl.cc ('k') | content/common/message_port.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
};
« no previous file with comments | « content/child/web_data_consumer_handle_impl.cc ('k') | content/common/message_port.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698