summaryrefslogtreecommitdiffstats
path: root/chrome/renderer
diff options
context:
space:
mode:
authorabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 03:19:43 +0000
committerabarth@chromium.org <abarth@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-04 03:19:43 +0000
commitc21f1d5afca572bfdfaa94e0aa740ebbc0f05008 (patch)
tree2599ce051cb0a42736f542cfc2cab8119ecd765f /chrome/renderer
parent46012f109086b9548fbcfb2e620c757eadf88bea (diff)
downloadchromium_src-c21f1d5afca572bfdfaa94e0aa740ebbc0f05008.zip
chromium_src-c21f1d5afca572bfdfaa94e0aa740ebbc0f05008.tar.gz
chromium_src-c21f1d5afca572bfdfaa94e0aa740ebbc0f05008.tar.bz2
Only show the blocked plug-in UI when we actually fail to instantiate a
plug-in. BUG=36879 TEST=This code review does not have have a blocked plugin icon but http://kb2.adobe.com/cps/155/tn_15507.html does. Review URL: http://codereview.chromium.org/661363 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40593 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r--chrome/renderer/render_view.cc10
-rw-r--r--chrome/renderer/render_view.h1
2 files changed, 6 insertions, 5 deletions
diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc
index 9197041..901f3c76 100644
--- a/chrome/renderer/render_view.cc
+++ b/chrome/renderer/render_view.cc
@@ -2163,11 +2163,7 @@ void RenderView::willClose(WebFrame* frame) {
bool RenderView::allowPlugins(WebFrame* frame, bool enabled_per_settings) {
if (!enabled_per_settings)
return false;
- if (!AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS)) {
- DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
- return false;
- }
- return true;
+ return AllowContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
}
bool RenderView::allowImages(WebFrame* frame, bool enabled_per_settings) {
@@ -2873,6 +2869,10 @@ void RenderView::didNotAllowScript(WebKit::WebFrame* frame) {
DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT);
}
+void RenderView::didNotAllowPlugins(WebKit::WebFrame* frame) {
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS);
+}
+
void RenderView::didExhaustMemoryAvailableForScript(WebFrame* frame) {
Send(new ViewHostMsg_JSOutOfMemory(routing_id_));
}
diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h
index 797402f..0248eb2 100644
--- a/chrome/renderer/render_view.h
+++ b/chrome/renderer/render_view.h
@@ -367,6 +367,7 @@ class RenderView : public RenderWidget,
WebKit::WebFrame* frame, const WebKit::WebSecurityOrigin& origin);
virtual bool allowScript(WebKit::WebFrame* frame, bool enabled_per_settings);
virtual void didNotAllowScript(WebKit::WebFrame* frame);
+ virtual void didNotAllowPlugins(WebKit::WebFrame* frame);
virtual void didExhaustMemoryAvailableForScript(WebKit::WebFrame* frame);
virtual void didCreateScriptContext(WebKit::WebFrame* frame);
virtual void didDestroyScriptContext(WebKit::WebFrame* frame);