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

Unified Diff: chrome/browser/ui/browser_commands.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 | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index bececbe68688e4d5d9fe749d8ce3843513f24f66..0b7fc6ff931685c3a662b40cd43adffa8952761a 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -578,10 +578,11 @@ bool CanZoomOut(content::WebContents* contents) {
contents->GetMinimumZoomPercent();
}
-bool IsAtDefaultZoom(content::WebContents* contents) {
+bool CanResetZoom(content::WebContents* contents) {
ui_zoom::ZoomController* zoom_controller =
ui_zoom::ZoomController::FromWebContents(contents);
- return zoom_controller->IsAtDefaultZoom();
+ return !zoom_controller->IsAtDefaultZoom() ||
+ !zoom_controller->PageScaleFactorIsOne();
}
TabStripModelDelegate::RestoreTabType GetRestoreTabType(
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | chrome/browser/ui/webui/options/content_settings_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698