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

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: Make ChromeAutofillClient responsible for adding itself as a ZoomObserver. 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
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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 double zoom_level, 100 double zoom_level,
101 const scoped_refptr<const extensions::Extension>& extension); 101 const scoped_refptr<const extensions::Extension>& extension);
102 102
103 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode). 103 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode).
104 void SetZoomMode(ZoomMode zoom_mode); 104 void SetZoomMode(ZoomMode zoom_mode);
105 105
106 // content::WebContentsObserver overrides: 106 // content::WebContentsObserver overrides:
107 virtual void DidNavigateMainFrame( 107 virtual void DidNavigateMainFrame(
108 const content::LoadCommittedDetails& details, 108 const content::LoadCommittedDetails& details,
109 const content::FrameNavigateParams& params) OVERRIDE; 109 const content::FrameNavigateParams& params) OVERRIDE;
110 virtual void WebContentsDestroyed() OVERRIDE;
110 111
111 private: 112 private:
112 explicit ZoomController(content::WebContents* web_contents); 113 explicit ZoomController(content::WebContents* web_contents);
113 friend class content::WebContentsUserData<ZoomController>; 114 friend class content::WebContentsUserData<ZoomController>;
114 friend class ZoomControllerTest; 115 friend class ZoomControllerTest;
115 116
116 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); 117 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change);
117 118
118 // Updates the zoom icon and zoom percentage based on current values and 119 // Updates the zoom icon and zoom percentage based on current values and
119 // notifies the observer if changes have occurred. |host| may be empty, 120 // notifies the observer if changes have occurred. |host| may be empty,
(...skipping 20 matching lines...) Expand all
140 ObserverList<ZoomObserver> observers_; 141 ObserverList<ZoomObserver> observers_;
141 142
142 content::BrowserContext* browser_context_; 143 content::BrowserContext* browser_context_;
143 144
144 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 145 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
145 146
146 DISALLOW_COPY_AND_ASSIGN(ZoomController); 147 DISALLOW_COPY_AND_ASSIGN(ZoomController);
147 }; 148 };
148 149
149 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 150 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698