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

Unified Diff: chrome/browser/ui/zoom/zoom_controller.cc

Issue 678343002: Default zoom was never read from chrome://settings (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/zoom/zoom_controller.cc
diff --git a/chrome/browser/ui/zoom/zoom_controller.cc b/chrome/browser/ui/zoom/zoom_controller.cc
index 50fb694637c18442d72ce12516f2ff581e83706d..40d9b978b059eb221516a554e6542f4f51cb29c0 100644
--- a/chrome/browser/ui/zoom/zoom_controller.cc
+++ b/chrome/browser/ui/zoom/zoom_controller.cc
@@ -44,6 +44,12 @@ bool ZoomController::IsAtDefaultZoom() const {
return content::ZoomValuesEqual(GetZoomLevel(), GetDefaultZoomLevel());
}
+int ZoomController::GetDefaultZoomPercent() const {
+ double zoom_factor = content::ZoomLevelToZoomFactor(GetDefaultZoomLevel());
+ // Round double for return.
+ return static_cast<int>(zoom_factor * 100 + 0.5);
+}
+
int ZoomController::GetResourceForZoomLevel() const {
if (IsAtDefaultZoom())
return IDR_ZOOM_NORMAL;
« chrome/browser/ui/browser_commands.cc ('K') | « chrome/browser/ui/zoom/zoom_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698