OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Represents the browser side of the browser <--> renderer communication | 5 // Represents the browser side of the browser <--> renderer communication |
6 // channel. There will be one RenderProcessHost per renderer process. | 6 // channel. There will be one RenderProcessHost per renderer process. |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 #include "content/common/frame_messages.h" | 122 #include "content/common/frame_messages.h" |
123 #include "content/common/gpu/gpu_host_messages.h" | 123 #include "content/common/gpu/gpu_host_messages.h" |
124 #include "content/common/in_process_child_thread_params.h" | 124 #include "content/common/in_process_child_thread_params.h" |
125 #include "content/common/mojo/channel_init.h" | 125 #include "content/common/mojo/channel_init.h" |
126 #include "content/common/mojo/mojo_messages.h" | 126 #include "content/common/mojo/mojo_messages.h" |
127 #include "content/common/render_process_messages.h" | 127 #include "content/common/render_process_messages.h" |
128 #include "content/common/resource_messages.h" | 128 #include "content/common/resource_messages.h" |
129 #include "content/common/site_isolation_policy.h" | 129 #include "content/common/site_isolation_policy.h" |
130 #include "content/common/view_messages.h" | 130 #include "content/common/view_messages.h" |
131 #include "content/public/browser/browser_context.h" | 131 #include "content/public/browser/browser_context.h" |
| 132 #include "content/public/browser/browser_thread.h" |
132 #include "content/public/browser/content_browser_client.h" | 133 #include "content/public/browser/content_browser_client.h" |
133 #include "content/public/browser/navigator_connect_context.h" | 134 #include "content/public/browser/navigator_connect_context.h" |
134 #include "content/public/browser/notification_service.h" | 135 #include "content/public/browser/notification_service.h" |
135 #include "content/public/browser/notification_types.h" | 136 #include "content/public/browser/notification_types.h" |
136 #include "content/public/browser/render_process_host_factory.h" | 137 #include "content/public/browser/render_process_host_factory.h" |
137 #include "content/public/browser/render_process_host_observer.h" | 138 #include "content/public/browser/render_process_host_observer.h" |
138 #include "content/public/browser/render_widget_host.h" | 139 #include "content/public/browser/render_widget_host.h" |
139 #include "content/public/browser/render_widget_host_iterator.h" | 140 #include "content/public/browser/render_widget_host_iterator.h" |
140 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" | 141 #include "content/public/browser/render_widget_host_view_frame_subscriber.h" |
141 #include "content/public/browser/resource_context.h" | 142 #include "content/public/browser/resource_context.h" |
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
731 | 732 |
732 channel_connected_ = false; | 733 channel_connected_ = false; |
733 sent_render_process_ready_ = false; | 734 sent_render_process_ready_ = false; |
734 | 735 |
735 // Setup the IPC channel. | 736 // Setup the IPC channel. |
736 const std::string channel_id = | 737 const std::string channel_id = |
737 IPC::Channel::GenerateVerifiedChannelID(std::string()); | 738 IPC::Channel::GenerateVerifiedChannelID(std::string()); |
738 channel_ = CreateChannelProxy(channel_id); | 739 channel_ = CreateChannelProxy(channel_id); |
739 #if USE_ATTACHMENT_BROKER | 740 #if USE_ATTACHMENT_BROKER |
740 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( | 741 IPC::AttachmentBroker::GetGlobal()->RegisterCommunicationChannel( |
741 channel_.get()); | 742 channel_.get(), content::BrowserThread::GetMessageLoopProxyForThread( |
| 743 content::BrowserThread::IO)); |
742 #endif | 744 #endif |
743 | 745 |
744 // Setup the Mojo channel. | 746 // Setup the Mojo channel. |
745 mojo_application_host_->Init(); | 747 mojo_application_host_->Init(); |
746 | 748 |
747 // Call the embedder first so that their IPC filters have priority. | 749 // Call the embedder first so that their IPC filters have priority. |
748 GetContentClient()->browser()->RenderProcessWillLaunch(this); | 750 GetContentClient()->browser()->RenderProcessWillLaunch(this); |
749 | 751 |
750 CreateMessageFilters(); | 752 CreateMessageFilters(); |
751 RegisterMojoServices(); | 753 RegisterMojoServices(); |
(...skipping 2054 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2806 | 2808 |
2807 // Skip widgets in other processes. | 2809 // Skip widgets in other processes. |
2808 if (rvh->GetProcess()->GetID() != GetID()) | 2810 if (rvh->GetProcess()->GetID() != GetID()) |
2809 continue; | 2811 continue; |
2810 | 2812 |
2811 rvh->OnWebkitPreferencesChanged(); | 2813 rvh->OnWebkitPreferencesChanged(); |
2812 } | 2814 } |
2813 } | 2815 } |
2814 | 2816 |
2815 } // namespace content | 2817 } // namespace content |
OLD | NEW |