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

Unified Diff: components/test_runner/test_runner.cc

Issue 1417033010: Adding <keygen> Content Setting (Blink) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@keygen_core
Patch Set: Clean up code. Created 5 years, 1 month 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: components/test_runner/test_runner.cc
diff --git a/components/test_runner/test_runner.cc b/components/test_runner/test_runner.cc
index 610676155fe6f62257b4bf91d2180f13db4b61ea..adbb71742f76cd180735990a1e48bc8f9f43be2f 100644
--- a/components/test_runner/test_runner.cc
+++ b/components/test_runner/test_runner.cc
@@ -241,6 +241,7 @@ class TestRunnerBindings : public gin::Wrappable<TestRunnerBindings> {
void SetMediaAllowed(bool allowed);
void SetScriptsAllowed(bool allowed);
void SetStorageAllowed(bool allowed);
+ void SetKeygenAllowed(bool allowed);
void SetPluginsAllowed(bool allowed);
void SetAllowDisplayOfInsecureContent(bool allowed);
void SetAllowRunningOfInsecureContent(bool allowed);
@@ -496,6 +497,7 @@ gin::ObjectTemplateBuilder TestRunnerBindings::GetObjectTemplateBuilder(
.SetMethod("setMediaAllowed", &TestRunnerBindings::SetMediaAllowed)
.SetMethod("setScriptsAllowed", &TestRunnerBindings::SetScriptsAllowed)
.SetMethod("setStorageAllowed", &TestRunnerBindings::SetStorageAllowed)
+ .SetMethod("setKeygenAllowed", &TestRunnerBindings::SetKeygenAllowed)
.SetMethod("setPluginsAllowed", &TestRunnerBindings::SetPluginsAllowed)
.SetMethod("setAllowDisplayOfInsecureContent",
&TestRunnerBindings::SetAllowDisplayOfInsecureContent)
@@ -1186,6 +1188,11 @@ void TestRunnerBindings::SetStorageAllowed(bool allowed) {
runner_->SetStorageAllowed(allowed);
}
+void TestRunnerBindings::SetKeygenAllowed(bool allowed) {
+ if (runner_)
+ runner_->SetKeygenAllowed(allowed);
+}
+
void TestRunnerBindings::SetPluginsAllowed(bool allowed) {
if (runner_)
runner_->SetPluginsAllowed(allowed);
@@ -2726,6 +2733,10 @@ void TestRunner::SetStorageAllowed(bool allowed) {
web_content_settings_->SetStorageAllowed(allowed);
}
+void TestRunner::SetKeygenAllowed(bool allowed) {
+ web_content_settings_->SetKeygenAllowed(allowed);
+}
+
void TestRunner::SetPluginsAllowed(bool allowed) {
web_content_settings_->SetPluginsAllowed(allowed);
}

Powered by Google App Engine
This is Rietveld 408576698