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 COMPONENTS_UI_ZOOM_ZOOM_CONTROLLER_H_ | 5 #ifndef COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ |
6 #define COMPONENTS_UI_ZOOM_ZOOM_CONTROLLER_H_ | 6 #define COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
14 #include "components/prefs/pref_member.h" | 14 #include "components/prefs/pref_member.h" |
15 #include "content/public/browser/host_zoom_map.h" | 15 #include "content/public/browser/host_zoom_map.h" |
16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
17 #include "content/public/browser/web_contents_user_data.h" | 17 #include "content/public/browser/web_contents_user_data.h" |
18 | 18 |
19 class ZoomControllerTest; | 19 class ZoomControllerTest; |
20 | 20 |
21 namespace content { | 21 namespace content { |
22 class WebContents; | 22 class WebContents; |
23 } | 23 } |
24 | 24 |
25 namespace ui_zoom { | 25 namespace zoom { |
26 class ZoomObserver; | 26 class ZoomObserver; |
27 | 27 |
28 class ZoomRequestClient : public base::RefCounted<ZoomRequestClient> { | 28 class ZoomRequestClient : public base::RefCounted<ZoomRequestClient> { |
29 public: | 29 public: |
30 ZoomRequestClient() {} | 30 ZoomRequestClient() {} |
31 virtual bool ShouldSuppressBubble() const = 0; | 31 virtual bool ShouldSuppressBubble() const = 0; |
32 | 32 |
33 protected: | 33 protected: |
34 virtual ~ZoomRequestClient() {} | 34 virtual ~ZoomRequestClient() {} |
35 | 35 |
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 content::BrowserContext* browser_context_; | 193 content::BrowserContext* browser_context_; |
194 // Keep track of the HostZoomMap we're currently subscribed to. | 194 // Keep track of the HostZoomMap we're currently subscribed to. |
195 content::HostZoomMap* host_zoom_map_; | 195 content::HostZoomMap* host_zoom_map_; |
196 | 196 |
197 std::unique_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 197 std::unique_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
198 | 198 |
199 DISALLOW_COPY_AND_ASSIGN(ZoomController); | 199 DISALLOW_COPY_AND_ASSIGN(ZoomController); |
200 }; | 200 }; |
201 | 201 |
202 } // namespace ui_zoom | 202 } // namespace zoom |
203 | 203 |
204 #endif // COMPONENTS_UI_ZOOM_ZOOM_CONTROLLER_H_ | 204 #endif // COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ |
OLD | NEW |