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 | |
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 { | |
Fady Samuel
2014/08/13 19:45:42
Explain the purpose of this class here.
wjmaclean
2014/08/14 18:18:21
Done.
| |
25 public: | |
26 HostZoomLevelContext(scoped_ptr<ZoomLevelPrefsDelegate> delegate, | |
27 const base::FilePath& file_path, | |
28 double default_zoom_level); | |
29 ~HostZoomLevelContext(); | |
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 scoped_ptr<HostZoomMapImpl> host_zoom_map_impl_; | |
38 // The delegate pointer needs to be released before the destructor for the | |
39 // HostZoomMapImpl is called, and so must be declared in this order. | |
40 scoped_ptr<ZoomLevelPrefsDelegate> delegate_; | |
41 | |
42 DISALLOW_COPY_AND_ASSIGN(HostZoomLevelContext); | |
43 }; // HostZoomLevelContext | |
44 | |
45 } // namespace content | |
46 | |
47 #endif // CONTENT_BROWSER_HOST_ZOOM_LEVEL_CONTEXT | |
OLD | NEW |