Index: content/renderer/render_thread_impl.cc |
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc |
index dae9cd06fbf47c4972e17fc98615c02e62b1af4c..3935593d2a260a41763b4c5c6640ad6a96cd07a2 100644 |
--- a/content/renderer/render_thread_impl.cc |
+++ b/content/renderer/render_thread_impl.cc |
@@ -46,6 +46,8 @@ |
#include "content/public/renderer/content_renderer_client.h" |
#include "content/public/renderer/render_process_observer.h" |
#include "content/public/renderer/render_view_visitor.h" |
+#include "content/renderer/browser_plugin/browser_plugin_channel_manager.h" |
+#include "content/renderer/browser_plugin/browser_plugin_registry.h" |
#include "content/renderer/devtools_agent_filter.h" |
#include "content/renderer/dom_storage/dom_storage_dispatcher.h" |
#include "content/renderer/dom_storage/webstoragearea_impl.h" |
@@ -212,6 +214,11 @@ void RenderThreadImpl::Init() { |
dom_storage_dispatcher_.reset(new DomStorageDispatcher()); |
main_thread_indexed_db_dispatcher_.reset(new IndexedDBDispatcher()); |
+ browser_plugin_registry_.reset(new content::BrowserPluginRegistry()); |
+ browser_plugin_channel_manager_.reset( |
+ new content::BrowserPluginChannelManager()); |
+ AddObserver(browser_plugin_channel_manager_.get()); |
+ |
media_stream_center_ = NULL; |
db_message_filter_ = new DBMessageFilter(); |
@@ -861,22 +868,26 @@ void RenderThreadImpl::OnSetCSSColors( |
void RenderThreadImpl::OnCreateNewView(const ViewMsg_New_Params& params) { |
EnsureWebKitInitialized(); |
// When bringing in render_view, also bring in webkit's glue and jsbindings. |
- RenderViewImpl::Create( |
- params.parent_window, |
- params.opener_route_id, |
- params.renderer_preferences, |
- params.web_preferences, |
- new SharedRenderViewCounter(0), |
- params.view_id, |
- params.surface_id, |
- params.session_storage_namespace_id, |
- params.frame_name, |
- false, |
- params.swapped_out, |
- params.next_page_id, |
- params.screen_info, |
- false, |
- params.accessibility_mode); |
+ if (!params.embedder_channel_name.empty()) { |
+ browser_plugin_channel_manager()->CreateRenderView(params); |
+ } else { |
+ RenderViewImpl::Create( |
+ params.parent_window, |
+ params.opener_route_id, |
+ params.renderer_preferences, |
+ params.web_preferences, |
+ new SharedRenderViewCounter(0), |
+ params.view_id, |
+ params.surface_id, |
+ params.session_storage_namespace_id, |
+ params.frame_name, |
+ false, |
+ params.swapped_out, |
+ params.next_page_id, |
+ params.screen_info, |
+ NULL, |
+ params.accessibility_mode); |
+ } |
} |
GpuChannelHost* RenderThreadImpl::EstablishGpuChannelSync( |