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

Unified Diff: chrome/browser/ui/prefs/prefs_tab_helper.cc

Issue 785723002: Add new extension APIs related to animation policy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use prefs_tab_helper. Created 5 years, 11 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
Index: chrome/browser/ui/prefs/prefs_tab_helper.cc
diff --git a/chrome/browser/ui/prefs/prefs_tab_helper.cc b/chrome/browser/ui/prefs/prefs_tab_helper.cc
index 3f7ba0db6ee1279564af61547f9f668cc9c3a063..ea1f292eab19d0e1d4ea426a3ce298fbfc367ed5 100644
--- a/chrome/browser/ui/prefs/prefs_tab_helper.cc
+++ b/chrome/browser/ui/prefs/prefs_tab_helper.cc
@@ -49,6 +49,10 @@
#include "base/win/windows_version.h"
#endif
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/chrome_content_browser_client.h"
+#endif
+
using content::WebContents;
using content::WebPreferences;
@@ -58,6 +62,9 @@ namespace {
// The list of prefs we want to observe.
const char* kPrefsToObserve[] = {
+#if defined(ENABLE_EXTENSIONS)
+ prefs::kAnimationPolicy,
+#endif
prefs::kDefaultCharset,
prefs::kDisable3DAPIs,
prefs::kEnableHyperlinkAuditing,
@@ -515,6 +522,12 @@ void PrefsTabHelper::InitIncognitoUserPrefStore(
void PrefsTabHelper::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {
WebPreferences pref_defaults;
+#if defined(ENABLE_EXTENSIONS)
+ registry->RegisterStringPref(
+ prefs::kAnimationPolicy,
+ chrome::kAnimationPolicyAllowed,
+ user_prefs::PrefRegistrySyncable::SYNCABLE_PREF);
Lei Zhang 2015/01/30 20:18:08 Should this be a syncable pref? I don't know the a
je_julie(Not used) 2015/01/31 07:25:35 There is no specific reason using SYNCABLE_PREF.
+#endif
registry->RegisterBooleanPref(
prefs::kWebKitJavascriptEnabled,
pref_defaults.javascript_enabled,

Powered by Google App Engine
This is Rietveld 408576698