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 CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT | |
Fady Samuel
2014/08/15 15:03:01
CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT_H_ here an
wjmaclean
2014/08/15 22:13:50
Already fixed in WIP patch.
| |
6 #define CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT | |
7 | |
8 #include <string> | |
Fady Samuel
2014/08/15 15:03:01
Is this necessary?
wjmaclean
2014/08/15 22:13:50
No, I think it's a debugging artifact ... removed.
| |
9 | |
10 #include "base/files/file_path.h" | |
Fady Samuel
2014/08/15 15:03:01
Is this necesary? You can probably forward declare
wjmaclean
2014/08/15 22:13:50
Again, debugging artifact, thanks for catching it.
| |
11 #include "base/macros.h" | |
12 #include "base/memory/ref_counted.h" | |
Fady Samuel
2014/08/15 15:03:01
Is this necessary?
wjmaclean
2014/08/15 22:13:50
Done.
| |
13 #include "content/public/browser/host_zoom_map.h" | |
14 #include "content/public/browser/zoom_level_prefs_store.h" | |
15 | |
16 class JsonPrefStore; | |
Fady Samuel
2014/08/15 15:03:01
Is this necessary?
wjmaclean
2014/08/15 22:13:50
Done.
| |
17 class PrefService; | |
18 class PrefServiceSyncable; | |
Fady Samuel
2014/08/15 15:03:01
Is this necessary?
wjmaclean
2014/08/15 22:13:50
Done.
| |
19 | |
20 namespace content { | |
21 | |
22 class HostZoomMapImpl; | |
23 | |
24 class HostZoomLevelContext { | |
25 // This class manages a HostZoomMap and, associates it with a PrefsStore, | |
26 // if one is provided. | |
Fady Samuel
2014/08/15 15:03:01
Put this ABOVE the class. Also, this description d
wjmaclean
2014/08/15 22:13:50
Profile? This is owned by StoragePartitionImpl.
T
| |
27 public: | |
28 HostZoomLevelContext(scoped_ptr<ZoomLevelPrefsStore> prefs_store, | |
29 const base::FilePath& file_path, | |
30 double default_zoom_level); | |
31 ~HostZoomLevelContext(); | |
32 | |
33 HostZoomMapImpl* GetHostZoomMap() const { return host_zoom_map_impl_.get(); } | |
Fady Samuel
2014/08/15 15:03:01
host_zoom_map
wjmaclean
2014/08/15 22:13:49
Done.
| |
34 PrefService* GetZoomLevelPrefs() { | |
Fady Samuel
2014/08/15 15:03:01
zoom_level_prefs
wjmaclean
2014/08/15 22:13:50
Done.
| |
35 return prefs_store_ ? prefs_store_->GetPrefs() : NULL; | |
36 } | |
37 | |
38 private: | |
39 scoped_ptr<HostZoomMapImpl> host_zoom_map_impl_; | |
40 // The prefs_store pointer needs to be released before the destructor for the | |
41 // HostZoomMapImpl is called, and so must be declared in this order. | |
42 scoped_ptr<ZoomLevelPrefsStore> prefs_store_; | |
43 | |
44 DISALLOW_COPY_AND_ASSIGN(HostZoomLevelContext); | |
45 }; // HostZoomLevelContext | |
Fady Samuel
2014/08/15 15:03:01
Remove this comment.
wjmaclean
2014/08/15 22:13:50
Done.
| |
46 | |
47 } // namespace content | |
48 | |
49 #endif // CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT | |
OLD | NEW |