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

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

Issue 373733003: Make sure WebContents passed to chrome_page_zoom::Zoom() have a ZoomController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to r282074. Created 6 years, 5 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/zoom/zoom_controller.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/zoom/zoom_controller.cc
diff --git a/chrome/browser/ui/zoom/zoom_controller.cc b/chrome/browser/ui/zoom/zoom_controller.cc
index 0e4db31c771ca8a4f0e3a31b87ec5f42376ff495..a2e8ce9376afbf83f5510f2cf92bb6c349d5d1d3 100644
--- a/chrome/browser/ui/zoom/zoom_controller.cc
+++ b/chrome/browser/ui/zoom/zoom_controller.cc
@@ -27,6 +27,7 @@ DEFINE_WEB_CONTENTS_USER_DATA_KEY(ZoomController);
ZoomController::ZoomController(content::WebContents* web_contents)
: content::WebContentsObserver(web_contents),
+ can_show_bubble_(true),
zoom_mode_(ZOOM_MODE_DEFAULT),
zoom_level_(1.0),
browser_context_(web_contents->GetBrowserContext()) {
@@ -274,9 +275,9 @@ void ZoomController::UpdateState(const std::string& host) {
}
}
- // The zoom bubble can be shown for all zoom changes where the host is
- // not empty.
- bool can_show_bubble = !host.empty();
+ // The zoom bubble should not be shown for zoom changes where the host is
+ // empty.
+ bool can_show_bubble = can_show_bubble_ && !host.empty();
if (event_data_) {
// For state changes initiated within the ZoomController, information about
« no previous file with comments | « 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