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

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: Fixed Nit in browser_commands_unittest.cc 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
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | no next file » | 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 76c73ebf2732615c102e06616997d39516bce80f..e6635a658fbe9cb7696fdd359ce6d27769de4421 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();
wjmaclean 2014/11/01 17:45:47 Thanks, this is definitely preferred.
}
TabStripModelDelegate::RestoreTabType GetRestoreTabType(
« no previous file with comments | « chrome/browser/ui/browser_commands.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698