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 CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ | 5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ |
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ | 6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ |
7 | 7 |
8 #include <vector> | |
9 | |
10 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
11 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" |
12 #include "base/observer_list.h" | 11 #include "base/observer_list.h" |
13 #include "base/prefs/pref_member.h" | 12 #include "base/prefs/pref_member.h" |
14 #include "content/public/browser/host_zoom_map.h" | 13 #include "content/public/browser/host_zoom_map.h" |
15 #include "content/public/browser/web_contents_observer.h" | 14 #include "content/public/browser/web_contents_observer.h" |
16 #include "content/public/browser/web_contents_user_data.h" | 15 #include "content/public/browser/web_contents_user_data.h" |
17 | 16 |
18 class ZoomObserver; | 17 class ZoomObserver; |
19 | 18 |
20 namespace content { | 19 namespace content { |
21 class WebContents; | 20 class WebContents; |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 128 |
130 // The current zoom mode. | 129 // The current zoom mode. |
131 ZoomMode zoom_mode_; | 130 ZoomMode zoom_mode_; |
132 | 131 |
133 // Current zoom level. | 132 // Current zoom level. |
134 double zoom_level_; | 133 double zoom_level_; |
135 | 134 |
136 // Used to access the default zoom level preference. | 135 // Used to access the default zoom level preference. |
137 DoublePrefMember default_zoom_level_; | 136 DoublePrefMember default_zoom_level_; |
138 | 137 |
139 std::vector<ZoomChangedEventData> event_data_; | 138 scoped_ptr<ZoomChangedEventData> event_data_; |
140 | 139 |
141 // Keeps track of the extension (if any) that initiated the last zoom change | 140 // Keeps track of the extension (if any) that initiated the last zoom change |
142 // that took effect. | 141 // that took effect. |
143 scoped_refptr<const extensions::Extension> last_extension_; | 142 scoped_refptr<const extensions::Extension> last_extension_; |
144 | 143 |
145 // Observer receiving notifications on state changes. | 144 // Observer receiving notifications on state changes. |
146 ObserverList<ZoomObserver> observers_; | 145 ObserverList<ZoomObserver> observers_; |
147 | 146 |
148 content::BrowserContext* browser_context_; | 147 content::BrowserContext* browser_context_; |
149 | 148 |
150 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 149 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
151 | 150 |
152 DISALLOW_COPY_AND_ASSIGN(ZoomController); | 151 DISALLOW_COPY_AND_ASSIGN(ZoomController); |
153 }; | 152 }; |
154 | 153 |
155 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ | 154 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ |
OLD | NEW |