Index: chrome/renderer/content_settings_observer.cc |
diff --git a/chrome/renderer/content_settings_observer.cc b/chrome/renderer/content_settings_observer.cc |
index 1e00b6cb13b413fc408f4680a4760943f5e11a2a..3c1147dd996eaea4fc4d51d1ef932d698f40a243 100644 |
--- a/chrome/renderer/content_settings_observer.cc |
+++ b/chrome/renderer/content_settings_observer.cc |
@@ -258,10 +258,10 @@ void ContentSettingsObserver::DidCommitProvisionalLoad( |
if (!is_same_page_navigation) { |
// Clear "block" flags for the new page. This needs to happen before any of |
- // |allowScript()|, |allowScriptFromSource()|, |allowImage()|, or |
- // |allowPlugins()| is called for the new page so that these functions can |
- // correctly detect that a piece of content flipped from "not blocked" to |
- // "blocked". |
+ // |allowScript()|, |allowScriptFromSource()|, |allowImage()|, |
+ // |allowPlugins()|, or |allowKeygen()| is called for the new page so that |
+ // these functions can correctly detect that a piece of content flipped from |
+ // "not blocked" to "blocked". |
ClearBlockedContentSettings(); |
temporarily_allowed_plugins_.clear(); |
} |
@@ -349,6 +349,17 @@ bool ContentSettingsObserver::allowIndexedDB(const WebString& name, |
return result; |
} |
+bool ContentSettingsObserver::allowKeygen() { |
+ if (is_interstitial_page_) |
+ return true; |
+ |
+ WebFrame* frame = render_frame()->GetWebFrame(); |
+ bool allow = false; |
+ Send(new ChromeViewHostMsg_AllowKeygen( |
+ routing_id(), GURL(frame->securityOrigin().toString()), &allow)); |
+ return allow; |
+} |
+ |
bool ContentSettingsObserver::allowPlugins(bool enabled_per_settings) { |
return enabled_per_settings; |
} |
@@ -593,6 +604,10 @@ bool ContentSettingsObserver::allowRunningInsecureContent( |
return true; |
} |
+void ContentSettingsObserver::didNotAllowKeygen() { |
+ DidBlockContentType(CONTENT_SETTINGS_TYPE_KEYGEN); |
+} |
+ |
void ContentSettingsObserver::didNotAllowPlugins() { |
DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); |
} |