OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" | 5 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 | 51 |
52 using content::WebContents; | 52 using content::WebContents; |
53 using content::WebPreferences; | 53 using content::WebPreferences; |
54 | 54 |
55 DEFINE_WEB_CONTENTS_USER_DATA_KEY(PrefsTabHelper); | 55 DEFINE_WEB_CONTENTS_USER_DATA_KEY(PrefsTabHelper); |
56 | 56 |
57 namespace { | 57 namespace { |
58 | 58 |
59 // The list of prefs we want to observe. | 59 // The list of prefs we want to observe. |
60 const char* kPrefsToObserve[] = { | 60 const char* kPrefsToObserve[] = { |
| 61 #if defined(ENABLE_EXTENSIONS) |
| 62 prefs::kAnimationPolicy, |
| 63 #endif |
61 prefs::kDefaultCharset, | 64 prefs::kDefaultCharset, |
62 prefs::kDisable3DAPIs, | 65 prefs::kDisable3DAPIs, |
63 prefs::kEnableHyperlinkAuditing, | 66 prefs::kEnableHyperlinkAuditing, |
64 prefs::kWebKitAllowDisplayingInsecureContent, | 67 prefs::kWebKitAllowDisplayingInsecureContent, |
65 prefs::kWebKitAllowRunningInsecureContent, | 68 prefs::kWebKitAllowRunningInsecureContent, |
66 prefs::kWebKitDefaultFixedFontSize, | 69 prefs::kWebKitDefaultFixedFontSize, |
67 prefs::kWebKitDefaultFontSize, | 70 prefs::kWebKitDefaultFontSize, |
68 prefs::kWebKitDomPasteEnabled, | 71 prefs::kWebKitDomPasteEnabled, |
69 #if defined(OS_ANDROID) | 72 #if defined(OS_ANDROID) |
70 prefs::kWebKitFontScaleFactor, | 73 prefs::kWebKitFontScaleFactor, |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 } | 736 } |
734 } | 737 } |
735 | 738 |
736 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { | 739 void PrefsTabHelper::OnWebPrefChanged(const std::string& pref_name) { |
737 #if !defined(OS_ANDROID) | 740 #if !defined(OS_ANDROID) |
738 OnFontFamilyPrefChanged(pref_name); | 741 OnFontFamilyPrefChanged(pref_name); |
739 #endif | 742 #endif |
740 | 743 |
741 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); | 744 web_contents_->GetRenderViewHost()->OnWebkitPreferencesChanged(); |
742 } | 745 } |
OLD | NEW |