| 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" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
| 13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 14 #include "base/prefs/json_pref_store.h" | 14 #include "base/prefs/json_pref_store.h" |
| 15 #include "base/prefs/pref_change_registrar.h" | 15 #include "base/prefs/pref_change_registrar.h" |
| 16 #include "base/prefs/pref_service.h" | 16 #include "base/prefs/pref_service.h" |
| 17 #include "base/prefs/pref_store.h" | 17 #include "base/prefs/pref_store.h" |
| 18 #include "content/public/browser/host_zoom_map.h" | 18 #include "content/public/browser/host_zoom_map.h" |
| 19 #include "content/public/browser/zoom_level_delegate.h" | 19 #include "content/public/browser/zoom_level_delegate.h" |
| 20 | 20 |
| 21 class ZoomEventManager; | |
| 22 | |
| 23 namespace base { | 21 namespace base { |
| 24 class DictionaryValue; | 22 class DictionaryValue; |
| 25 } | 23 } |
| 26 | 24 |
| 25 namespace extensions { |
| 26 class ZoomEventManager; |
| 27 } |
| 28 |
| 27 namespace chrome { | 29 namespace chrome { |
| 28 | 30 |
| 31 using extensions::ZoomEventManager; |
| 32 |
| 29 // A class to manage per-partition default and per-host zoom levels in Chrome's | 33 // A class to manage per-partition default and per-host zoom levels in Chrome's |
| 30 // preference system. It implements an interface between the content/ zoom | 34 // preference system. It implements an interface between the content/ zoom |
| 31 // levels in HostZoomMap and Chrome's preference system. All changes | 35 // levels in HostZoomMap and Chrome's preference system. All changes |
| 32 // to the per-partition default zoom levels from chrome/ flow through this | 36 // to the per-partition default zoom levels from chrome/ flow through this |
| 33 // class. Any changes to per-host levels are updated when HostZoomMap calls | 37 // class. Any changes to per-host levels are updated when HostZoomMap calls |
| 34 // OnZoomLevelChanged. | 38 // OnZoomLevelChanged. |
| 35 class ChromeZoomLevelPrefs : public content::ZoomLevelDelegate { | 39 class ChromeZoomLevelPrefs : public content::ZoomLevelDelegate { |
| 36 public: | 40 public: |
| 37 typedef base::CallbackList<void(void)>::Subscription | 41 typedef base::CallbackList<void(void)>::Subscription |
| 38 DefaultZoomLevelSubscription; | 42 DefaultZoomLevelSubscription; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 77 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
| 74 std::string partition_key_; | 78 std::string partition_key_; |
| 75 base::CallbackList<void(void)> default_zoom_changed_callbacks_; | 79 base::CallbackList<void(void)> default_zoom_changed_callbacks_; |
| 76 | 80 |
| 77 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs); | 81 DISALLOW_COPY_AND_ASSIGN(ChromeZoomLevelPrefs); |
| 78 }; | 82 }; |
| 79 | 83 |
| 80 } // namespace chrome | 84 } // namespace chrome |
| 81 | 85 |
| 82 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ | 86 #endif // CHROME_BROWSER_UI_ZOOM_CHROME_ZOOM_LEVEL_PREFS_H_ |
| OLD | NEW |