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

Unified Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 9609008: Implemented Browser Plugin (NOT FOR REVIEW) (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merged with Tip-of-Tree Created 8 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
Index: content/renderer/pepper/pepper_plugin_delegate_impl.cc
diff --git a/content/renderer/pepper/pepper_plugin_delegate_impl.cc b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
index 82f1acc45a9999ad1f60967769e85be052d31973..d03e3593e8e15d9a127fe31e91b59610c13c4d31 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -73,6 +73,7 @@
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/size.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
+#include "webkit/plugins/plugin_constants.h"
#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/ppapi/file_path.h"
#include "webkit/plugins/ppapi/ppb_file_io_impl.h"
@@ -254,6 +255,30 @@ PepperPluginDelegateImpl::CreatePepperPluginModule(
return module;
}
+scoped_refptr<webkit::ppapi::PluginModule>
+ PepperPluginDelegateImpl::CreateBrowserPluginModule(
+ base::ProcessHandle process_handle,
+ const IPC::ChannelHandle& channel_handle) {
+ // Create a new HostDispatcher for the proxying, and hook it to a new
+ // PluginModule. Note that AddLiveModule must be called before any early
+ // returns since the module's destructor will remove itself.
+ scoped_refptr<webkit::ppapi::PluginModule> module =
+ new webkit::ppapi::PluginModule(kBrowserPluginName,
+ FilePath(kBrowserPluginPath),
+ NULL /* lifetime delegate */);
+
+ scoped_ptr<HostDispatcherWrapper> dispatcher(new HostDispatcherWrapper);
+ if (!dispatcher->Init(
+ process_handle,
+ channel_handle,
+ module->pp_module(),
+ webkit::ppapi::PluginModule::GetLocalGetInterfaceFunc(),
+ GetPreferences()))
+ return scoped_refptr<webkit::ppapi::PluginModule>();
+ module->InitAsProxied(dispatcher.release());
+ return module;
+}
+
scoped_refptr<PepperBrokerImpl> PepperPluginDelegateImpl::CreateBroker(
webkit::ppapi::PluginModule* plugin_module) {
DCHECK(plugin_module);
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/plugins/browser_plugin_placeholder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698