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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 9169042: Block plugins for platform apps (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix plugin_tests on linux Created 8 years, 10 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
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index c8972322280c690b89533d289a88bdd82a8dd398..95cb7e4b5ed77c0ed6d4b1bc179d22c002f1f73f 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -4,17 +4,14 @@
#include "chrome/browser/ui/extensions/shell_window.h"
-#include "chrome/browser/chrome_plugin_service_filter.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
-#include "content/browser/renderer_host/render_view_host.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
-#include "content/public/browser/render_process_host.h"
ShellWindow* ShellWindow::Create(Profile* profile,
const Extension* extension,
@@ -65,10 +62,6 @@ void ShellWindow::Observe(int type,
}
}
-void ShellWindow::RenderViewCreated(RenderViewHost* render_view_host) {
- DisableNPAPIPlugins();
-}
-
ShellWindow::ShellWindow(ExtensionHost* host)
: host_(host) {
// Close the window in response to window.close() and the like.
@@ -83,27 +76,7 @@ ShellWindow::ShellWindow(ExtensionHost* host)
// apps are no longer tied to the browser process).
registrar_.Add(this, content::NOTIFICATION_APP_TERMINATING,
content::NotificationService::AllSources());
- content::WebContentsObserver::Observe(web_contents());
}
ShellWindow::~ShellWindow() {
- ClearDisabledNPAPIPlugins();
-}
-
-void ShellWindow::DisableNPAPIPlugins() {
- int render_process_id = host_->render_process_host()->GetID();
- int render_view_id = host_->render_view_host()->routing_id();
- ChromePluginServiceFilter* filter =
- ChromePluginServiceFilter::GetInstance();
- filter->DisableNPAPIForRenderView(render_process_id,
- render_view_id);
-}
-
-void ShellWindow::ClearDisabledNPAPIPlugins() {
- int render_process_id = host_->render_process_host()->GetID();
- int render_view_id = host_->render_view_host()->routing_id();
- ChromePluginServiceFilter* filter =
- ChromePluginServiceFilter::GetInstance();
- filter->ClearDisabledNPAPIForRenderView(render_process_id,
- render_view_id);
}
« no previous file with comments | « chrome/browser/ui/extensions/shell_window.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698