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

Unified Diff: chrome/browser/renderer_host/render_view_host.cc

Issue 3040034: Block non-sandboxed plugins. (Closed) Base URL: git://codf21.jail/chromium.git
Patch Set: fix indentation; sync Created 10 years, 4 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/renderer_host/render_view_host.cc
diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc
index b8a03f487c3aa583a6373d7dbbdc8d2615f124e3..15f4e43b28a1adbf4ae4e6a95081e688f6002f2c 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -14,6 +14,7 @@
#include "base/string_util.h"
#include "base/time.h"
#include "base/waitable_event.h"
+#include "chrome/browser/blocked_plugin_manager.h"
#include "chrome/browser/browser_list.h"
#include "chrome/browser/child_process_security_policy.h"
#include "chrome/browser/cross_site_request_manager.h"
@@ -797,6 +798,10 @@ void RenderViewHost::OnMessageReceived(const IPC::Message& msg) {
IPC_MESSAGE_HANDLER(ViewHostMsg_UserMetricsRecordAction,
OnUserMetricsRecordAction)
IPC_MESSAGE_HANDLER(ViewHostMsg_MissingPluginStatus, OnMissingPluginStatus);
+ IPC_MESSAGE_HANDLER(ViewHostMsg_NonSandboxedPluginBlocked,
+ OnNonSandboxedPluginBlocked);
+ IPC_MESSAGE_HANDLER(ViewHostMsg_BlockedPluginLoaded,
+ OnBlockedPluginLoaded);
IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin);
IPC_MESSAGE_HANDLER(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
OnReceivedSavableResourceLinksForCurrentPage);
@@ -1530,6 +1535,22 @@ void RenderViewHost::OnMissingPluginStatus(int status) {
integration_delegate->OnMissingPluginStatus(status);
}
+void RenderViewHost::OnNonSandboxedPluginBlocked(const string16& name) {
+ RenderViewHostDelegate::BlockedPlugin* blocked_plugin_delegate =
+ delegate_->GetBlockedPluginDelegate();
+ if (blocked_plugin_delegate) {
+ blocked_plugin_delegate->OnNonSandboxedPluginBlocked(name);
+ }
+}
+
+void RenderViewHost::OnBlockedPluginLoaded() {
+ RenderViewHostDelegate::BlockedPlugin* blocked_plugin_delegate =
+ delegate_->GetBlockedPluginDelegate();
+ if (blocked_plugin_delegate) {
+ blocked_plugin_delegate->OnBlockedPluginLoaded();
+ }
+}
+
void RenderViewHost::OnCrashedPlugin(const FilePath& plugin_path) {
RenderViewHostDelegate::BrowserIntegration* integration_delegate =
delegate_->GetBrowserIntegrationDelegate();
« no previous file with comments | « chrome/browser/renderer_host/render_view_host.h ('k') | chrome/browser/renderer_host/render_view_host_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698