Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(425)

Side by Side Diff: chrome/browser/ui/zoom/zoom_controller.h

Issue 373603007: Refactor to convert vector to scoped_ptr in ZoomController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up includes list. Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698