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

Unified Diff: chrome/common/ipc_channel_proxy.h

Issue 8001: Make IPC::SyncChannel not duplicate the underlying MessageLoop implementation... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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 | « base/object_watcher_unittest.cc ('k') | chrome/common/ipc_channel_proxy.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/ipc_channel_proxy.h
===================================================================
--- chrome/common/ipc_channel_proxy.h (revision 3707)
+++ chrome/common/ipc_channel_proxy.h (working copy)
@@ -112,8 +112,6 @@
void RemoveFilter(MessageFilter* filter);
protected:
- Channel::Listener* listener() const { return context_->listener(); }
-
class Context;
// A subclass uses this constructor if it needs to add more information
// to the internal state. If create_pipe_now is true, the pipe is created
@@ -129,6 +127,7 @@
Context(Channel::Listener* listener, MessageFilter* filter,
MessageLoop* ipc_thread);
virtual ~Context() { }
+ MessageLoop* ipc_message_loop() const { return ipc_message_loop_; }
protected:
// IPC::Channel::Listener methods:
@@ -136,6 +135,9 @@
virtual void OnChannelConnected(int32 peer_pid);
virtual void OnChannelError();
+ // Like OnMessageReceived but doesn't try the filters.
+ void OnMessageReceivedNoFilter(const Message& message);
+
Channel::Listener* listener() const { return listener_; }
const std::wstring& channel_id() const { return channel_id_; }
@@ -143,14 +145,21 @@
// Returns true if the message was processed, false otherwise.
bool TryFilters(const Message& message);
+ // Like Open and Close, but called on the IPC thread.
+ virtual void OnChannelOpened();
+ virtual void OnChannelClosed();
+
+ // Called on the consumers thread when the ChannelProxy is closed. At that
+ // point the consumer is telling us that they don't want to receive any
+ // more messages, so we honor that wish by forgetting them!
+ virtual void Clear() { listener_ = NULL; }
+
private:
friend class ChannelProxy;
// Create the Channel
void CreateChannel(const std::wstring& id, const Channel::Mode& mode);
// Methods called via InvokeLater:
- void OnOpenChannel();
- void OnCloseChannel();
void OnSendMessage(Message* message_ptr);
void OnAddFilter(MessageFilter* filter);
void OnRemoveFilter(MessageFilter* filter);
@@ -158,13 +167,6 @@
void OnDispatchConnected(int32 peer_pid);
void OnDispatchError();
- MessageLoop* ipc_message_loop() const { return ipc_message_loop_; }
-
- // Called on the consumers thread when the ChannelProxy is closed. At that
- // point the consumer is telling us that they don't want to receive any
- // more messages, so we honor that wish by forgetting them!
- void clear() { listener_ = NULL; }
-
MessageLoop* listener_message_loop_;
Channel::Listener* listener_;
« no previous file with comments | « base/object_watcher_unittest.cc ('k') | chrome/common/ipc_channel_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698