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

Unified Diff: components/ui/zoom/zoom_controller.cc

Issue 954923005: Make command-zero reset page scale in addition to zoom level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again again Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/ui/zoom/zoom_controller.h ('k') | content/browser/host_zoom_map_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ui/zoom/zoom_controller.cc
diff --git a/components/ui/zoom/zoom_controller.cc b/components/ui/zoom/zoom_controller.cc
index 6df05d9e78c6abe316c6203a419f7a4e2b6acdc7..51dbf021b716bf7df6bf1be01ffa02926f28eb11 100644
--- a/components/ui/zoom/zoom_controller.cc
+++ b/components/ui/zoom/zoom_controller.cc
@@ -341,4 +341,15 @@ void ZoomController::UpdateState(const std::string& host) {
}
}
+void ZoomController::SetPageScaleFactorIsOneForTesting(bool is_one) {
+ int render_process_id = web_contents()->GetRenderProcessHost()->GetID();
+ int render_view_id = web_contents()->GetRenderViewHost()->GetRoutingID();
+ host_zoom_map_->SetPageScaleFactorIsOneForView(
+ render_process_id, render_view_id, is_one);
+}
+
+bool ZoomController::PageScaleFactorIsOne() const {
+ return content::HostZoomMap::PageScaleFactorIsOne(web_contents());
+}
+
} // namespace ui_zoom
« no previous file with comments | « components/ui/zoom/zoom_controller.h ('k') | content/browser/host_zoom_map_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698