Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2408)

Side by Side Diff: chrome/browser/ui/zoom/zoom_level_prefs_delegate_impl.h

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove ref counts, improve comments. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_DELEGATE_IMPL_H_
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_LEVEL_PREFS_DELEGATE_IMPL_H_
7
8 #include "content/public/browser/zoom_level_prefs_delegate.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 {
18
19 class ZoomLevelPrefsDelegateImpl : public PrefStore::Observer,
Fady Samuel 2014/08/13 19:45:42 ZoomLevelPrefsStoreImpl
wjmaclean 2014/08/14 18:18:21 Done.
20 public content::ZoomLevelPrefsDelegate {
21 public:
22 ZoomLevelPrefsDelegateImpl();
23 virtual ~ZoomLevelPrefsDelegateImpl();
24 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
25
26 // Implement ZoomLevelPrefsDelegate.
27 virtual void InitZoomLevels(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(ZoomLevelPrefsDelegateImpl);
43 };
44
45 } // namespace browser
46
47 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_LEVEL_PREFS_DELEGATE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698