Index: chrome/browser/ui/browser_commands.cc |
diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc |
index 62529595f58be5241f5814edc03c0d6ce0c2a9dd..78756d1fd545c8482b8493731b22dc122ba27f5b 100644 |
--- a/chrome/browser/ui/browser_commands.cc |
+++ b/chrome/browser/ui/browser_commands.cc |
@@ -959,6 +959,25 @@ void Zoom(Browser* browser, content::PageZoom zoom) { |
zoom); |
} |
+bool CanZoomIn(content::WebContents *contents) { |
Ben Goodger (Google)
2014/06/05 15:45:03
nit: WebContents* contents here, and in the subseq
sarka
2014/06/05 19:55:05
Done.
sarka
2014/06/05 19:55:05
Done.
|
+ bool dummy = false; |
+ return contents->GetZoomPercent(&dummy, |
+ &dummy) == contents->GetMaximumZoomPercent() + 1 ? false : true; |
Ben Goodger (Google)
2014/06/05 15:45:03
I'd write these as:
return contents->GetZoomPerce
sarka
2014/06/05 19:55:05
Done.
|
+} |
+ |
+bool CanZoomOut(content::WebContents *contents) { |
+ bool dummy = false; |
+ return contents->GetZoomPercent(&dummy, |
+ &dummy) == contents->GetMinimumZoomPercent() ? false : true; |
+} |
+ |
+bool ActualSize(content::WebContents *contents) { |
+ bool dummy = false; |
+ return contents->GetZoomPercent(&dummy, |
+ &dummy) == 100 ? false : true; |
+} |
+ |
+ |
void FocusToolbar(Browser* browser) { |
content::RecordAction(UserMetricsAction("FocusToolbar")); |
browser->window()->FocusToolbar(); |