OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_LEVEL_PREFS_STORE_IMPL_H_ | |
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_LEVEL_PREFS_STORE_IMPL_H_ | |
7 | |
8 #include "content/public/browser/zoom_level_prefs_store.h" | |
9 | |
10 #include "base/macros.h" | |
11 #include "base/memory/ref_counted.h" | |
12 #include "base/prefs/json_pref_store.h" | |
13 #include "base/prefs/pref_store.h" | |
14 #include "chrome/browser/prefs/pref_service_syncable.h" | |
15 #include "content/public/browser/host_zoom_map.h" | |
16 | |
17 namespace browser { | |
Fady Samuel
2014/08/14 18:56:26
namespace chrome
wjmaclean
2014/08/14 19:12:20
Done.
| |
18 | |
19 class ZoomLevelPrefsStoreImpl : public PrefStore::Observer, | |
20 public content::ZoomLevelPrefsStore { | |
Fady Samuel
2014/08/14 18:56:26
Alignment.
wjmaclean
2014/08/14 19:12:20
Done.
| |
21 public: | |
22 ZoomLevelPrefsStoreImpl(); | |
23 virtual ~ZoomLevelPrefsStoreImpl(); | |
24 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | |
25 | |
26 // Implement ZoomLevelPrefsStore. | |
27 virtual void InitHostZoomMap(const base::FilePath& file_path, | |
28 content::HostZoomMap* host_zoom_map) OVERRIDE; | |
29 virtual PrefService* GetPrefs() OVERRIDE; | |
30 | |
31 // Implement PrefObserver. | |
32 virtual void OnPrefValueChanged(const std::string& key) OVERRIDE; | |
33 virtual void OnInitializationCompleted(bool succeeded) OVERRIDE; | |
34 | |
35 private: | |
36 | |
37 scoped_refptr<JsonPrefStore> zoom_level_prefs_; | |
38 scoped_ptr<PrefServiceSyncable> pref_service_; | |
39 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | |
40 content::HostZoomMap* host_zoom_map_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(ZoomLevelPrefsStoreImpl); | |
43 }; | |
44 | |
45 } // namespace browser | |
46 | |
47 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_LEVEL_PREFS_STORE_IMPL_H_ | |
OLD | NEW |