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

Unified Diff: content/child/child_thread.cc

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 | « content/child/child_thread.h ('k') | content/child/webmessageportchannel_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread.cc
diff --git a/content/child/child_thread.cc b/content/child/child_thread.cc
index 8c160ada60eb15660d340a3bb9cf56a978d639e2..57919e5319245e843d9de8d4ac4884c948039106 100644
--- a/content/child/child_thread.cc
+++ b/content/child/child_thread.cc
@@ -192,8 +192,17 @@ void QuitMainThreadMessageLoop() {
} // namespace
+ChildThread::ChildThreadMessageRouter::ChildThreadMessageRouter(
+ IPC::Sender* sender)
+ : sender_(sender) {}
+
+bool ChildThread::ChildThreadMessageRouter::Send(IPC::Message* msg) {
+ return sender_->Send(msg);
+}
+
ChildThread::ChildThread()
- : channel_connected_factory_(this),
+ : router_(this),
+ channel_connected_factory_(this),
in_browser_process_(false) {
channel_name_ = CommandLine::ForCurrentProcess()->GetSwitchValueASCII(
switches::kProcessChannelID);
@@ -202,6 +211,7 @@ ChildThread::ChildThread()
ChildThread::ChildThread(const std::string& channel_name)
: channel_name_(channel_name),
+ router_(this),
channel_connected_factory_(this),
in_browser_process_(true) {
Init();
@@ -349,16 +359,9 @@ bool ChildThread::Send(IPC::Message* msg) {
return channel_->Send(msg);
}
-void ChildThread::AddRoute(int32 routing_id, IPC::Listener* listener) {
+MessageRouter* ChildThread::GetRouter() {
DCHECK(base::MessageLoop::current() == message_loop());
-
- router_.AddRoute(routing_id, listener);
-}
-
-void ChildThread::RemoveRoute(int32 routing_id) {
- DCHECK(base::MessageLoop::current() == message_loop());
-
- router_.RemoveRoute(routing_id);
+ return &router_;
}
webkit_glue::ResourceLoaderBridge* ChildThread::CreateBridge(
« no previous file with comments | « content/child/child_thread.h ('k') | content/child/webmessageportchannel_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698