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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Updated according to creis@'s comments Created 8 years, 7 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/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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(
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698