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

Unified Diff: content/common/message_port.h

Issue 2725133002: Mojo: Armed Watchers (Closed)
Patch Set: . Created 3 years, 10 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: content/common/message_port.h
diff --git a/content/common/message_port.h b/content/common/message_port.h
index e63d0205fc1cd07f244cb3f7d35bd25c3ccda4f4..1ef01edf723487f46a7c27f7f349e5e5e66d66c6 100644
--- a/content/common/message_port.h
+++ b/content/common/message_port.h
@@ -80,19 +80,24 @@ class CONTENT_EXPORT MessagePort {
State();
State(mojo::ScopedMessagePipeHandle handle);
- void AddWatch();
- void CancelWatch();
- static void OnHandleReady(uintptr_t context,
- MojoResult result,
- MojoHandleSignalsState signals_state,
- MojoWatchNotificationFlags flags);
+ void RegisterWatcher();
+ void UnregisterWatcher();
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,
+ MojoWatchNotificationFlags flags);
};
mutable scoped_refptr<State> state_;
};

Powered by Google App Engine
This is Rietveld 408576698