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

Side by Side Diff: chrome/browser/ui/zoom/zoom_controller.h

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, 1 month 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Convenience method to get default zoom level. Implemented here for 73 // Convenience method to get default zoom level. Implemented here for
74 // inlining. 74 // inlining.
75 double GetDefaultZoomLevel() const { 75 double GetDefaultZoomLevel() const {
76 // TODO(wjmaclean) Make this refer to the webcontents-specific HostZoomMap 76 // TODO(wjmaclean) Make this refer to the webcontents-specific HostZoomMap
77 // when that becomes available. 77 // when that becomes available.
78 return content::HostZoomMap::GetDefaultForBrowserContext(browser_context_)-> 78 return content::HostZoomMap::GetDefaultForBrowserContext(browser_context_)->
79 GetDefaultZoomLevel(); 79 GetDefaultZoomLevel();
80 } 80 }
81 81
82 // Returns default zoom percentage of a tab.
83 int GetDefaultZoomPercent() const;
84
82 // Convenience method to quickly check if the tab's at default zoom. 85 // Convenience method to quickly check if the tab's at default zoom.
83 bool IsAtDefaultZoom() const; 86 bool IsAtDefaultZoom() const;
84 87
85 // Returns which image should be loaded for the current zoom level. 88 // Returns which image should be loaded for the current zoom level.
86 int GetResourceForZoomLevel() const; 89 int GetResourceForZoomLevel() const;
87 90
88 const extensions::Extension* last_extension() const { 91 const extensions::Extension* last_extension() const {
89 return last_extension_.get(); 92 return last_extension_.get();
90 } 93 }
91 94
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 ObserverList<ZoomObserver> observers_; 164 ObserverList<ZoomObserver> observers_;
162 165
163 content::BrowserContext* browser_context_; 166 content::BrowserContext* browser_context_;
164 167
165 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_; 168 scoped_ptr<content::HostZoomMap::Subscription> zoom_subscription_;
166 169
167 DISALLOW_COPY_AND_ASSIGN(ZoomController); 170 DISALLOW_COPY_AND_ASSIGN(ZoomController);
168 }; 171 };
169 172
170 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_ 173 #endif // CHROME_BROWSER_UI_ZOOM_ZOOM_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698