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 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 5 #ifndef CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 6 #define CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
7 | 7 |
8 #include "base/callback_list.h" | 8 #include "base/callback_list.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 namespace user_prefs { | 24 namespace user_prefs { |
25 class PrefRegistrySyncable; | 25 class PrefRegistrySyncable; |
26 } | 26 } |
27 | 27 |
28 // Per-tab class to handle user preferences. | 28 // Per-tab class to handle user preferences. |
29 class PrefsTabHelper : public content::NotificationObserver, | 29 class PrefsTabHelper : public content::NotificationObserver, |
30 public content::WebContentsUserData<PrefsTabHelper> { | 30 public content::WebContentsUserData<PrefsTabHelper> { |
31 public: | 31 public: |
32 ~PrefsTabHelper() override; | 32 ~PrefsTabHelper() override; |
33 | 33 |
34 static void InitIncognitoUserPrefStore(OverlayUserPrefStore* pref_store); | |
35 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); | 34 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); |
36 static void GetServiceInstance(); | 35 static void GetServiceInstance(); |
37 | 36 |
38 protected: | 37 protected: |
39 // Update the RenderView's WebPreferences. Exposed as protected for testing. | 38 // Update the RenderView's WebPreferences. Exposed as protected for testing. |
40 virtual void UpdateWebPreferences(); | 39 virtual void UpdateWebPreferences(); |
41 | 40 |
42 private: | 41 private: |
43 explicit PrefsTabHelper(content::WebContents* contents); | 42 explicit PrefsTabHelper(content::WebContents* contents); |
44 friend class content::WebContentsUserData<PrefsTabHelper>; | 43 friend class content::WebContentsUserData<PrefsTabHelper>; |
(...skipping 16 matching lines...) Expand all Loading... |
61 scoped_ptr<base::CallbackList<void(void)>::Subscription> | 60 scoped_ptr<base::CallbackList<void(void)>::Subscription> |
62 style_sheet_subscription_; | 61 style_sheet_subscription_; |
63 scoped_ptr<ChromeZoomLevelPrefs::DefaultZoomLevelSubscription> | 62 scoped_ptr<ChromeZoomLevelPrefs::DefaultZoomLevelSubscription> |
64 default_zoom_level_subscription_; | 63 default_zoom_level_subscription_; |
65 base::WeakPtrFactory<PrefsTabHelper> weak_ptr_factory_; | 64 base::WeakPtrFactory<PrefsTabHelper> weak_ptr_factory_; |
66 | 65 |
67 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper); | 66 DISALLOW_COPY_AND_ASSIGN(PrefsTabHelper); |
68 }; | 67 }; |
69 | 68 |
70 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ | 69 #endif // CHROME_BROWSER_UI_PREFS_PREFS_TAB_HELPER_H_ |
OLD | NEW |