Index: chrome/renderer/content_settings_observer.cc |
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc |
index 1fcdc201e7ea583f66406b65566d2ae43dcc41f2..4a3dede8759d4b83c4366435f4db87ec39481ce6 100644 |
--- a/chrome/renderer/content_settings_observer.cc |
+++ b/chrome/renderer/content_settings_observer.cc |
@@ -6,6 +6,7 @@ |
#include "chrome/common/render_messages.h" |
#include "chrome/common/url_constants.h" |
+#include "content/common/view_messages.h" |
#include "content/public/renderer/document_state.h" |
#include "content/public/renderer/navigation_state.h" |
#include "content/public/renderer/render_view.h" |
@@ -94,7 +95,8 @@ ContentSettingsObserver::ContentSettingsObserver( |
: content::RenderViewObserver(render_view), |
content::RenderViewObserverTracker<ContentSettingsObserver>(render_view), |
content_setting_rules_(NULL), |
- plugins_temporarily_allowed_(false) { |
+ plugins_temporarily_allowed_(false), |
+ is_interstitial_page_(false) { |
ClearBlockedContentSettings(); |
} |
@@ -127,6 +129,7 @@ bool ContentSettingsObserver::OnMessageReceived(const IPC::Message& message) { |
// blocked plugin. |
IPC_MESSAGE_HANDLER_GENERIC(ChromeViewMsg_LoadBlockedPlugins, |
OnLoadBlockedPlugins(); handled = false) |
+ IPC_MESSAGE_HANDLER(ViewMsg_SetAsInterstitial, OnSetAsInterstitial) |
jochen (gone - plz use gerrit)
2011/12/02 12:38:08
I think the render view impl should handle the mes
marja
2011/12/02 14:39:34
Done.
|
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
return handled; |
@@ -226,6 +229,8 @@ bool ContentSettingsObserver::AllowPlugins(WebFrame* frame, |
bool ContentSettingsObserver::AllowScript(WebFrame* frame, |
bool enabled_per_settings) { |
+ if (is_interstitial_page_) |
+ return true; |
if (!enabled_per_settings) |
return false; |
@@ -255,6 +260,8 @@ bool ContentSettingsObserver::AllowScriptFromSource( |
WebFrame* frame, |
bool enabled_per_settings, |
const WebKit::WebURL& script_url) { |
+ if (is_interstitial_page_) |
+ return true; |
if (!enabled_per_settings) |
return false; |
@@ -302,6 +309,10 @@ void ContentSettingsObserver::OnLoadBlockedPlugins() { |
plugins_temporarily_allowed_ = true; |
} |
+void ContentSettingsObserver::OnSetAsInterstitial() { |
+ is_interstitial_page_ = true; |
+} |
+ |
void ContentSettingsObserver::ClearBlockedContentSettings() { |
for (size_t i = 0; i < arraysize(content_blocked_); ++i) |
content_blocked_[i] = false; |