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 "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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 bool SetZoomLevelByExtension( | 116 bool SetZoomLevelByExtension( |
117 double zoom_level, | 117 double zoom_level, |
118 const scoped_refptr<const extensions::Extension>& extension); | 118 const scoped_refptr<const extensions::Extension>& extension); |
119 | 119 |
120 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode). | 120 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode). |
121 void SetZoomMode(ZoomMode zoom_mode); | 121 void SetZoomMode(ZoomMode zoom_mode); |
122 | 122 |
123 // content::WebContentsObserver overrides: | 123 // content::WebContentsObserver overrides: |
124 virtual void DidNavigateMainFrame( | 124 virtual void DidNavigateMainFrame( |
125 const content::LoadCommittedDetails& details, | 125 const content::LoadCommittedDetails& details, |
126 const content::FrameNavigateParams& params) OVERRIDE; | 126 const content::FrameNavigateParams& params) override; |
127 virtual void WebContentsDestroyed() OVERRIDE; | 127 virtual void WebContentsDestroyed() override; |
128 | 128 |
129 protected: | 129 protected: |
130 // Protected for testing. | 130 // Protected for testing. |
131 explicit ZoomController(content::WebContents* web_contents); | 131 explicit ZoomController(content::WebContents* web_contents); |
132 | 132 |
133 private: | 133 private: |
134 friend class content::WebContentsUserData<ZoomController>; | 134 friend class content::WebContentsUserData<ZoomController>; |
135 friend class ZoomControllerTest; | 135 friend class ZoomControllerTest; |
136 | 136 |
137 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); | 137 void OnZoomLevelChanged(const content::HostZoomMap::ZoomLevelChange& change); |
(...skipping 23 matching lines...) Expand all Loading... |
161 ObserverList<ZoomObserver> observers_; | 161 ObserverList<ZoomObserver> observers_; |
162 | 162 |
163 content::BrowserContext* browser_context_; | 163 content::BrowserContext* browser_context_; |
164 | 164 |
165 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; | 165 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; |
166 | 166 |
167 DISALLOW_COPY_AND_ASSIGN(ZoomController); | 167 DISALLOW_COPY_AND_ASSIGN(ZoomController); |
168 }; | 168 }; |
169 | 169 |
170 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ | 170 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ |
OLD | NEW |