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

Unified Diff: chrome/browser/guestview/webview/webview_guest.cc

Issue 24576003: <webview>: Change how plugin load works inside guests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 3 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: chrome/browser/guestview/webview/webview_guest.cc
diff --git a/chrome/browser/guestview/webview/webview_guest.cc b/chrome/browser/guestview/webview/webview_guest.cc
index e0ee6a0debee88d014fa86d30b832244d6e0d93b..273a49fab1178624bc0b12f8208f8df6305eb599 100644
--- a/chrome/browser/guestview/webview/webview_guest.cc
+++ b/chrome/browser/guestview/webview/webview_guest.cc
@@ -26,6 +26,10 @@
#include "content/public/common/result_codes.h"
#include "net/base/net_errors.h"
+#if defined(ENABLE_PLUGINS)
+#include "chrome/browser/guestview/webview/plugin_permission_helper.h"
+#endif
+
using content::WebContents;
namespace {
@@ -62,8 +66,9 @@ static std::string PermissionTypeToString(BrowserPluginPermissionType type) {
return webview::kPermissionTypePointerLock;
case BROWSER_PLUGIN_PERMISSION_TYPE_JAVASCRIPT_DIALOG:
return webview::kPermissionTypeDialog;
+ case BROWSER_PLUGIN_PERMISSION_TYPE_LOAD_PLUGIN:
+ return webview::kPermissionTypeLoadPlugin;
case BROWSER_PLUGIN_PERMISSION_TYPE_UNKNOWN:
- default:
NOTREACHED();
break;
}
@@ -85,6 +90,9 @@ void RemoveWebViewEventListenersOnIOThread(
void AttachWebViewHelpers(WebContents* contents) {
FaviconTabHelper::CreateForWebContents(contents);
+#if defined(ENABLE_PLUGINS)
+ PluginPermissionHelper::CreateForWebContents(contents);
+#endif
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698