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

Unified Diff: chrome/browser/ui/browser_commands.cc

Issue 678343002: Default zoom was never read from chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed function names to something intuitive Created 6 years, 2 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
Index: chrome/browser/ui/browser_commands.cc
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
index 76c73ebf2732615c102e06616997d39516bce80f..a31ae8e8f9f9a34cb78c91d1c8840a6db9a55f47 100644
--- a/chrome/browser/ui/browser_commands.cc
+++ b/chrome/browser/ui/browser_commands.cc
@@ -596,21 +596,21 @@ void CloseTab(Browser* browser) {
browser->tab_strip_model()->CloseSelectedTabs();
}
-bool CanZoomIn(content::WebContents* contents) {
+bool IsAtMaximumZoom(content::WebContents* contents) {
ZoomController* zoom_controller = ZoomController::FromWebContents(contents);
return zoom_controller->GetZoomPercent() !=
contents->GetMaximumZoomPercent() + 1;
}
-bool CanZoomOut(content::WebContents* contents) {
+bool IsAtMinimumZoom(content::WebContents* contents) {
ZoomController* zoom_controller = ZoomController::FromWebContents(contents);
return zoom_controller->GetZoomPercent() !=
contents->GetMinimumZoomPercent();
}
-bool ActualSize(content::WebContents* contents) {
+bool IsAtDefaultZoom(content::WebContents* contents) {
ZoomController* zoom_controller = ZoomController::FromWebContents(contents);
- return zoom_controller->GetZoomPercent() != 100.0f;
+ return !zoom_controller->IsAtDefaultZoom();
Alexei Svitkine (slow) 2014/10/30 13:49:42 IsAtDefaultZoom(contents) shouldn't negate the res
}
TabStripModelDelegate::RestoreTabType GetRestoreTabType(
« chrome/browser/browser_commands_unittest.cc ('K') | « chrome/browser/ui/browser_commands.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698