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

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

Issue 2967007: Disable outdated plugins, block non-sandboxed plugins. (Closed)
Patch Set: '' Created 10 years, 5 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 bbf43fa4ff8a07aabc1e5f6ab35ffe2d85f5b081..be254e13a9debd853e6d544c75d0291d60d13e0b 100644
--- a/chrome/browser/renderer_host/render_view_host.cc
+++ b/chrome/browser/renderer_host/render_view_host.cc
@@ -15,6 +15,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"
@@ -652,6 +653,10 @@ void RenderViewHost::InstallMissingPlugin() {
Send(new ViewMsg_InstallMissingPlugin(routing_id()));
}
+void RenderViewHost::LoadBlockedPlugins() {
+ Send(new ViewMsg_LoadBlockedPlugins(routing_id()));
+}
+
void RenderViewHost::FilesSelectedInChooser(
const std::vector<FilePath>& files) {
// Grant the security access requested to the given files.
@@ -794,7 +799,13 @@ 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_DisabledOutdatedPlugin,
+ OnDisabledOutdatedPlugin);
IPC_MESSAGE_HANDLER(ViewHostMsg_SendCurrentPageAllSavableResourceLinks,
OnReceivedSavableResourceLinksForCurrentPage);
IPC_MESSAGE_HANDLER(ViewHostMsg_SendSerializedHtmlData,
@@ -1525,6 +1536,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();
@@ -1532,6 +1559,14 @@ void RenderViewHost::OnCrashedPlugin(const FilePath& plugin_path) {
integration_delegate->OnCrashedPlugin(plugin_path);
}
+void RenderViewHost::OnDisabledOutdatedPlugin(const string16& name,
+ const GURL& update_url) {
+ RenderViewHostDelegate::BrowserIntegration* integration_delegate =
+ delegate_->GetBrowserIntegrationDelegate();
+ if (integration_delegate)
+ integration_delegate->OnDisabledOutdatedPlugin(name, update_url);
+}
+
void RenderViewHost::GetAllSavableResourceLinksForCurrentPage(
const GURL& page_url) {
Send(new ViewMsg_GetAllSavableResourceLinksForCurrentPage(routing_id(),
« 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