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 |
| 25 : public base::RefCountedThreadSafe<HostZoomLevelContext> { |
| 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 |
OLD | NEW |