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

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

Issue 508263002: Simplify ZoomController by removing DefaultZoomLevel prefs machinery. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 6 years, 3 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 | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/zoom/zoom_controller.h
diff --git a/chrome/browser/ui/zoom/zoom_controller.h b/chrome/browser/ui/zoom/zoom_controller.h
index f456cbd6c201647a0ce01098be9324483e3bb080..f1e6a64d0cfc1e918d1f20c2246a521ca01ffef3 100644
--- a/chrome/browser/ui/zoom/zoom_controller.h
+++ b/chrome/browser/ui/zoom/zoom_controller.h
@@ -70,6 +70,15 @@ class ZoomController : public content::WebContentsObserver,
ZoomMode zoom_mode() const { return zoom_mode_; }
+ // Convenience method to get default zoom level. Implemented here for
+ // inlining.
+ double GetDefaultZoomLevel() const {
+ // TODO(wjmaclean) Make this refer to the webcontents-specific HostZoomMap
+ // when that becomes available.
+ return content::HostZoomMap::GetDefaultForBrowserContext(browser_context_)->
+ GetDefaultZoomLevel();
+ }
+
// Convenience method to quickly check if the tab's at default zoom.
bool IsAtDefaultZoom() const;
@@ -142,9 +151,6 @@ class ZoomController : public content::WebContentsObserver,
// Current zoom level.
double zoom_level_;
- // Used to access the default zoom level preference.
- DoublePrefMember default_zoom_level_;
-
scoped_ptr<ZoomChangedEventData> event_data_;
// Keeps track of the extension (if any) that initiated the last zoom change
« no previous file with comments | « no previous file | chrome/browser/ui/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698