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

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

Issue 377423002: Make ChromeAutofillClient a ZoomObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix typo in comment. 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 | « chrome/browser/ui/tab_helpers.cc ('k') | 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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 double zoom_level, 107 double zoom_level,
108 const scoped_refptr<const extensions::Extension>& extension); 108 const scoped_refptr<const extensions::Extension>& extension);
109 109
110 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode). 110 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode).
111 void SetZoomMode(ZoomMode zoom_mode); 111 void SetZoomMode(ZoomMode zoom_mode);
112 112
113 // content::WebContentsObserver overrides: 113 // content::WebContentsObserver overrides:
114 virtual void DidNavigateMainFrame( 114 virtual void DidNavigateMainFrame(
115 const content::LoadCommittedDetails& details, 115 const content::LoadCommittedDetails& details,
116 const content::FrameNavigateParams& params) OVERRIDE; 116 const content::FrameNavigateParams& params) OVERRIDE;
117 virtual void WebContentsDestroyed() OVERRIDE;
117 118
118 private: 119 private:
119 explicit ZoomController(content::WebContents* web_contents); 120 explicit ZoomController(content::WebContents* web_contents);
120 friend class content::WebContentsUserData<ZoomController>; 121 friend class content::WebContentsUserData<ZoomController>;
121 friend class ZoomControllerTest; 122 friend class ZoomControllerTest;
122 123
123 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); 124 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
124 125
125 // Updates the zoom icon and zoom percentage based on current values and 126 // Updates the zoom icon and zoom percentage based on current values and
126 // notifies the observer if changes have occurred. |host| may be empty, 127 // notifies the observer if changes have occurred. |host| may be empty,
(...skipping 23 matching lines...) Expand all
150 ObserverList<ZoomObserver> observers_; 151 ObserverList<ZoomObserver> observers_;
151 152
152 content::BrowserContext* browser_context_; 153 content::BrowserContext* browser_context_;
153 154
154 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 155 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
155 156
156 DISALLOW_COPY_AND_ASSIGN(ZoomController); 157 DISALLOW_COPY_AND_ASSIGN(ZoomController);
157 }; 158 };
158 159
159 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 160 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/tab_helpers.cc ('k') | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698