Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ | 5 #ifndef CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ |
| 6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ | 6 #define CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ |
| 7 | 7 |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/files/file_path.h" | 9 #include "base/files/file_path.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 46 virtual void InitPrefsAndCopyToHostZoomMap( | 46 virtual void InitPrefsAndCopyToHostZoomMap( |
| 47 const base::FilePath& partition_path, | 47 const base::FilePath& partition_path, |
| 48 content::HostZoomMap* host_zoom_map); | 48 content::HostZoomMap* host_zoom_map); |
| 49 | 49 |
| 50 void SetDefaultZoomLevelPref(double level); | 50 void SetDefaultZoomLevelPref(double level); |
| 51 double GetDefaultZoomLevelPref() const; | 51 double GetDefaultZoomLevelPref() const; |
| 52 scoped_ptr<DefaultZoomLevelSubscription> RegisterDefaultZoomLevelCallback( | 52 scoped_ptr<DefaultZoomLevelSubscription> RegisterDefaultZoomLevelCallback( |
| 53 const base::Closure& callback); | 53 const base::Closure& callback); |
| 54 | 54 |
| 55 void ExtractPerHostZoomLevels( | 55 void ExtractPerHostZoomLevels( |
| 56 const base::DictionaryValue* host_zoom_dictionary); | 56 const base::DictionaryValue* host_zoom_dictionary, |
| 57 const char* dictionary_path); | |
|
Bernhard Bauer
2014/10/21 14:13:13
An alternative would be to pass in a boolean that
wjmaclean
2014/10/21 14:21:49
I thought about using a bool, but then with the ge
Bernhard Bauer
2014/10/21 14:26:15
Yeah, I'm absolutely okay with using well-commente
| |
| 57 | 58 |
| 58 private: | 59 private: |
| 59 // This is a callback function that receives notifications from HostZoomMap | 60 // This is a callback function that receives notifications from HostZoomMap |
| 60 // when per-host zoom levels change. It is used to update the per-host | 61 // when per-host zoom levels change. It is used to update the per-host |
| 61 // zoom levels (if any) managed by this class (for its associated partition). | 62 // zoom levels (if any) managed by this class (for its associated partition). |
| 62 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 63 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
| 63 | 64 |
| 64 PrefService* pref_service_; | 65 PrefService* pref_service_; |
| 65 const base::FilePath profile_path_; | 66 const base::FilePath profile_path_; |
| 66 content::HostZoomMap* host_zoom_map_; | 67 content::HostZoomMap* host_zoom_map_; |
| 67 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 68 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
| 68 std::string partition_key_; | 69 std::string partition_key_; |
| 69 base::CallbackList<void(void)> default_zoom_changed_callbacks_; | 70 base::CallbackList<void(void)> default_zoom_changed_callbacks_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs); | 72 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 } // namespace chrome | 75 } // namespace chrome |
| 75 | 76 |
| 76 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ | 77 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ |
| OLD | NEW |