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

Side by Side Diff: content/browser/host_zoom_level_context.h

Issue 393133002: Migrate HostZoomMap to live in StoragePartition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address 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 CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT
6 #define CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT
7
8 #include <string>
9
10 #include "base/files/file_path.h"
11 #include "base/macros.h"
12 #include "base/memory/ref_counted.h"
13 #include "content/public/browser/host_zoom_map.h"
14 #include "content/public/browser/zoom_level_prefs_delegate.h"
15
16 class JsonPrefStore;
17 class PrefService;
18 class PrefServiceSyncable;
19
20 namespace content {
21
22 class HostZoomMapImpl;
23
24 class HostZoomLevelContext
25 : public base::RefCountedThreadSafe<HostZoomLevelContext> {
awong 2014/08/12 21:07:06 Can this be expressed as single-ownership? The res
wjmaclean 2014/08/13 17:16:03 Done.
26 public:
27 HostZoomLevelContext(ZoomLevelPrefsDelegate* delegate,
28 const base::FilePath& file_path,
29 double default_zoom_level);
30
31 HostZoomMapImpl* GetHostZoomMap() const { return host_zoom_map_impl_.get(); }
32 PrefService* GetZoomLevelPrefs() {
33 return delegate_ ? delegate_->GetPrefs() : NULL;
34 }
35
36 private:
37 friend class base::RefCountedThreadSafe<HostZoomLevelContext>;
38
39 virtual ~HostZoomLevelContext();
40
41 scoped_ptr<HostZoomMapImpl> host_zoom_map_impl_;
42 scoped_refptr<ZoomLevelPrefsDelegate> delegate_;
43
44 DISALLOW_COPY_AND_ASSIGN(HostZoomLevelContext);
45 }; // HostZoomLevelContext
46
47 } // namespace content
48
49 #endif // CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698