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

Side by Side Diff: components/zoom/zoom_controller.h

Issue 2662503002: Convert StartPageService and ZoomController to use the new navigation callbacks. (Closed)
Patch Set: fix unittest Created 3 years, 10 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
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 COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ 5 #ifndef COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_
6 #define COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ 6 #define COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 const scoped_refptr<const ZoomRequestClient>& client); 142 const scoped_refptr<const ZoomRequestClient>& client);
143 143
144 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode). 144 // Sets the zoom mode, which defines zoom behavior (see enum ZoomMode).
145 void SetZoomMode(ZoomMode zoom_mode); 145 void SetZoomMode(ZoomMode zoom_mode);
146 146
147 // Set and query whether or not the page scale factor is one. 147 // Set and query whether or not the page scale factor is one.
148 void SetPageScaleFactorIsOneForTesting(bool is_one); 148 void SetPageScaleFactorIsOneForTesting(bool is_one);
149 bool PageScaleFactorIsOne() const; 149 bool PageScaleFactorIsOne() const;
150 150
151 // content::WebContentsObserver overrides: 151 // content::WebContentsObserver overrides:
152 void DidNavigateMainFrame( 152 void DidFinishNavigation(
153 const content::LoadCommittedDetails& details, 153 content::NavigationHandle* navigation_handle) override;
154 const content::FrameNavigateParams& params) override;
155 void WebContentsDestroyed() override; 154 void WebContentsDestroyed() override;
156 void RenderFrameHostChanged(content::RenderFrameHost* old_host, 155 void RenderFrameHostChanged(content::RenderFrameHost* old_host,
157 content::RenderFrameHost* new_host) override; 156 content::RenderFrameHost* new_host) override;
158 157
159 protected: 158 protected:
160 // Protected for testing. 159 // Protected for testing.
161 explicit ZoomController(content::WebContents* web_contents); 160 explicit ZoomController(content::WebContents* web_contents);
162 161
163 private: 162 private:
164 friend class content::WebContentsUserData<ZoomController>; 163 friend class content::WebContentsUserData<ZoomController>;
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 content::HostZoomMap* host_zoom_map_; 195 content::HostZoomMap* host_zoom_map_;
197 196
198 std::unique_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 197 std::unique_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
199 198
200 DISALLOW_COPY_AND_ASSIGN(ZoomController); 199 DISALLOW_COPY_AND_ASSIGN(ZoomController);
201 }; 200 };
202 201
203 } // namespace zoom 202 } // namespace zoom
204 203
205 #endif // COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_ 204 #endif // COMPONENTS_ZOOM_ZOOM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698