OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 6 #define CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
13 #include "base/sequenced_task_runner_helpers.h" | 13 #include "base/sequenced_task_runner_helpers.h" |
14 #include "base/supports_user_data.h" | 14 #include "base/supports_user_data.h" |
Fady Samuel
2014/11/03 22:11:11
Is this still necessary?
wjmaclean
2014/11/04 19:34:25
Done.
| |
15 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
16 #include "content/public/browser/host_zoom_map.h" | 16 #include "content/public/browser/host_zoom_map.h" |
17 #include "content/public/browser/notification_observer.h" | 17 #include "content/public/browser/notification_observer.h" |
18 #include "content/public/browser/notification_registrar.h" | 18 #include "content/public/browser/notification_registrar.h" |
19 | 19 |
20 namespace content { | 20 namespace content { |
21 | 21 |
22 class WebContentsImpl; | 22 class WebContentsImpl; |
23 | 23 |
24 // HostZoomMap needs to be deleted on the UI thread because it listens | 24 // HostZoomMap needs to be deleted on the UI thread because it listens |
25 // to notifications on there (and holds a NotificationRegistrar). | 25 // to notifications on there (and holds a NotificationRegistrar). |
26 class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), | 26 class CONTENT_EXPORT HostZoomMapImpl : public NON_EXPORTED_BASE(HostZoomMap), |
27 public NotificationObserver, | 27 public NotificationObserver { |
28 public base::SupportsUserData::Data { | |
29 public: | 28 public: |
30 HostZoomMapImpl(); | 29 HostZoomMapImpl(); |
31 ~HostZoomMapImpl() override; | 30 ~HostZoomMapImpl() override; |
32 | 31 |
33 // HostZoomMap implementation: | 32 // HostZoomMap implementation: |
34 void CopyFrom(HostZoomMap* copy) override; | 33 void CopyFrom(HostZoomMap* copy) override; |
35 double GetZoomLevelForHostAndScheme(const std::string& scheme, | 34 double GetZoomLevelForHostAndScheme(const std::string& scheme, |
36 const std::string& host) const override; | 35 const std::string& host) const override; |
37 // TODO(wjmaclean) Should we use a GURL here? crbug.com/384486 | 36 // TODO(wjmaclean) Should we use a GURL here? crbug.com/384486 |
38 bool HasZoomLevel(const std::string& scheme, | 37 bool HasZoomLevel(const std::string& scheme, |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 mutable base::Lock lock_; | 133 mutable base::Lock lock_; |
135 | 134 |
136 NotificationRegistrar registrar_; | 135 NotificationRegistrar registrar_; |
137 | 136 |
138 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); | 137 DISALLOW_COPY_AND_ASSIGN(HostZoomMapImpl); |
139 }; | 138 }; |
140 | 139 |
141 } // namespace content | 140 } // namespace content |
142 | 141 |
143 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ | 142 #endif // CONTENT_BROWSER_HOST_ZOOM_MAP_IMPL_H_ |
OLD | NEW |