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

Unified Diff: chrome/browser/chrome_content_browser_client.cc

Issue 11368019: Add support for external out-of-process PPAPI plugins in the browser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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: chrome/browser/chrome_content_browser_client.cc
===================================================================
--- chrome/browser/chrome_content_browser_client.cc (revision 166155)
+++ chrome/browser/chrome_content_browser_client.cc (working copy)
@@ -40,6 +40,7 @@
#include "chrome/browser/google/google_util.h"
#include "chrome/browser/infobars/infobar_tab_helper.h"
#include "chrome/browser/media/media_internals.h"
+#include "chrome/browser/nacl_host/nacl_process_host.h"
#include "chrome/browser/net/chrome_net_log.h"
#include "chrome/browser/notifications/desktop_notification_service.h"
#include "chrome/browser/notifications/desktop_notification_service_factory.h"
@@ -89,6 +90,7 @@
#include "content/public/browser/browser_main_parts.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_url_handler.h"
+#include "content/public/browser/child_process_data.h"
#include "content/public/browser/child_process_security_policy.h"
#include "content/public/browser/compositor_util.h"
#include "content/public/browser/render_process_host.h"
@@ -1712,6 +1714,20 @@
new ChromeBrowserPepperHostFactory(browser_host)));
}
+content::BrowserPpapiHost*
+ ChromeContentBrowserClient::GetExternalBrowserPpapiHost(
+ int plugin_process_id) {
+ for (NaClProcessHostIterator iter; !iter.Done(); ++iter) {
+ if (iter->process() &&
+ iter->process()->GetData().id == plugin_process_id) {
+ // Found the plugin.
+ return iter->browser_ppapi_host();
+ }
+ }
+
+ return NULL;
+}
+
bool ChromeContentBrowserClient::AllowPepperSocketAPI(
content::BrowserContext* browser_context,
const GURL& url,

Powered by Google App Engine
This is Rietveld 408576698