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

Unified Diff: content/child/child_thread.h

Issue 198073003: Remove some content_child dependency from content_common (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ffd442cb fix for bots barfing on clang style checks Created 6 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 | « no previous file | content/child/child_thread.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.h
diff --git a/content/child/child_thread.h b/content/child/child_thread.h
index 89156baadccba8ad9015047f605f00ecb59d62d7..33083bfdb4e52c8c7259bff280b4e79e09058f56 100644
--- a/content/child/child_thread.h
+++ b/content/child/child_thread.h
@@ -66,12 +66,10 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
// IPC::Sender implementation:
virtual bool Send(IPC::Message* msg) OVERRIDE;
- // See documentation on MessageRouter for AddRoute and RemoveRoute
- void AddRoute(int32 routing_id, IPC::Listener* listener);
- void RemoveRoute(int32 routing_id);
-
IPC::SyncChannel* channel() { return channel_.get(); }
+ MessageRouter* GetRouter();
+
// Creates a ResourceLoaderBridge.
// Tests can override this method if they want a custom loading behavior.
virtual webkit_glue::ResourceLoaderBridge* CreateBridge(
@@ -164,6 +162,16 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
virtual void OnChannelError() OVERRIDE;
private:
+ class ChildThreadMessageRouter : public MessageRouter {
+ public:
+ // |sender| must outlive this object.
+ explicit ChildThreadMessageRouter(IPC::Sender* sender);
+ virtual bool Send(IPC::Message* msg) OVERRIDE;
+
+ private:
+ IPC::Sender* const sender_;
+ };
+
void Init();
// IPC message handlers.
@@ -189,7 +197,7 @@ class CONTENT_EXPORT ChildThread : public IPC::Listener, public IPC::Sender {
scoped_refptr<ThreadSafeSender> thread_safe_sender_;
// Implements message routing functionality to the consumers of ChildThread.
- MessageRouter router_;
+ ChildThreadMessageRouter router_;
// Handles resource loads for this process.
scoped_ptr<ResourceDispatcher> resource_dispatcher_;
« no previous file with comments | « no previous file | content/child/child_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698