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

Unified Diff: webkit/plugins/ppapi/ppapi_webplugin_impl.cc

Issue 19800005: Hide knowledge of webkit::ppapi::PluginDelegate from chrome. This is part of moving ppapi implement… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 5 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
Index: webkit/plugins/ppapi/ppapi_webplugin_impl.cc
===================================================================
--- webkit/plugins/ppapi/ppapi_webplugin_impl.cc (revision 212906)
+++ webkit/plugins/ppapi/ppapi_webplugin_impl.cc (working copy)
@@ -49,6 +49,7 @@
struct WebPluginImpl::InitData {
scoped_refptr<PluginModule> module;
base::WeakPtr<PluginDelegate> delegate;
+ base::WeakPtr<content::RenderView> render_view;
std::vector<std::string> arg_names;
std::vector<std::string> arg_values;
GURL url;
@@ -57,7 +58,8 @@
WebPluginImpl::WebPluginImpl(
PluginModule* plugin_module,
const WebPluginParams& params,
- const base::WeakPtr<PluginDelegate>& plugin_delegate)
+ const base::WeakPtr<PluginDelegate>& plugin_delegate,
+ const base::WeakPtr<content::RenderView>& render_view)
: init_data_(new InitData()),
full_frame_(params.loadManually),
instance_object_(PP_MakeUndefined()),
@@ -65,6 +67,7 @@
DCHECK(plugin_module);
init_data_->module = plugin_module;
init_data_->delegate = plugin_delegate;
+ init_data_->render_view = render_view;
for (size_t i = 0; i < params.attributeNames.size(); ++i) {
init_data_->arg_names.push_back(params.attributeNames[i].utf8());
init_data_->arg_values.push_back(params.attributeValues[i].utf8());
@@ -87,8 +90,9 @@
if (!init_data_->delegate.get())
return false;
- instance_ = init_data_->module
- ->CreateInstance(init_data_->delegate.get(), container, init_data_->url);
+ instance_ = init_data_->module->CreateInstance(
+ init_data_->delegate.get(), init_data_->render_view.get(), container,
+ init_data_->url);
if (!instance_.get())
return false;
« chrome/renderer/pepper/ppb_pdf_impl.cc ('K') | « webkit/plugins/ppapi/ppapi_webplugin_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698