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

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

Issue 15947004: Allow renderer to create pepper ResourceHosts in the browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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 58408375dd3a403da128703afd4eaa02c45d5d34..d46daf2e2df962ea0f0648546ec8de11c085ba69 100644
--- a/content/renderer/pepper/pepper_plugin_delegate_impl.cc
+++ b/content/renderer/pepper/pepper_plugin_delegate_impl.cc
@@ -42,6 +42,7 @@
#include "content/renderer/p2p/socket_dispatcher.h"
#include "content/renderer/pepper/content_renderer_pepper_host_factory.h"
#include "content/renderer/pepper/pepper_broker_impl.h"
+#include "content/renderer/pepper/pepper_browser_connection.h"
#include "content/renderer/pepper/pepper_device_enumeration_event_handler.h"
#include "content/renderer/pepper/pepper_file_system_host.h"
#include "content/renderer/pepper/pepper_hung_plugin_filter.h"
@@ -203,6 +204,10 @@ class HostDispatcherWrapper
return peer_pid_;
}
+ virtual int GetPluginChildId() OVERRIDE {
+ return plugin_child_id_;
+ }
+
ppapi::proxy::HostDispatcher* dispatcher() { return dispatcher_.get(); }
private:
@@ -328,6 +333,7 @@ const HostType* GetRendererResourceHost(
PepperPluginDelegateImpl::PepperPluginDelegateImpl(RenderViewImpl* render_view)
: RenderViewObserver(render_view),
render_view_(render_view),
+ pepper_browser_connection_(this),
focused_plugin_(NULL),
last_mouse_event_target_(NULL),
device_enumeration_event_handler_(
@@ -1469,6 +1475,9 @@ void PepperPluginDelegateImpl::StopEnumerateDevices(int request_id) {
}
bool PepperPluginDelegateImpl::OnMessageReceived(const IPC::Message& message) {
+ if (pepper_browser_connection_.OnMessageReceived(message))
+ return true;
+
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(PepperPluginDelegateImpl, message)
IPC_MESSAGE_HANDLER(PpapiMsg_PPBTCPSocket_ConnectACK,
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/pepper/renderer_ppapi_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698