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

Side by Side Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 420533002: zoom bubble: Close if anchor is clicked while bubble is showing. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asdf 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 unified diff | Download patch | Annotate | Revision Log
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 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h" 5 #include "chrome/browser/ui/views/location_bar/zoom_bubble_view.h"
6 6
7 #include "base/i18n/rtl.h" 7 #include "base/i18n/rtl.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/chrome_page_zoom.h" 10 #include "chrome/browser/chrome_page_zoom.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 zoom_bubble_->Close(); 113 zoom_bubble_->Close();
114 } 114 }
115 115
116 // static 116 // static
117 bool ZoomBubbleView::IsShowing() { 117 bool ZoomBubbleView::IsShowing() {
118 // The bubble may be in the process of closing. 118 // The bubble may be in the process of closing.
119 return zoom_bubble_ != NULL && zoom_bubble_->GetWidget()->IsVisible(); 119 return zoom_bubble_ != NULL && zoom_bubble_->GetWidget()->IsVisible();
120 } 120 }
121 121
122 // static 122 // static
123 bool ZoomBubbleView::IsClosing() {
124 return zoom_bubble_ != NULL && zoom_bubble_->GetWidget()->IsClosed();
125 }
126
127 // static
123 const ZoomBubbleView* ZoomBubbleView::GetZoomBubbleForTest() { 128 const ZoomBubbleView* ZoomBubbleView::GetZoomBubbleForTest() {
124 return zoom_bubble_; 129 return zoom_bubble_;
125 } 130 }
126 131
127 ZoomBubbleView::ZoomBubbleView( 132 ZoomBubbleView::ZoomBubbleView(
128 views::View* anchor_view, 133 views::View* anchor_view,
129 content::WebContents* web_contents, 134 content::WebContents* web_contents,
130 bool auto_close, 135 bool auto_close,
131 ImmersiveModeController* immersive_mode_controller, 136 ImmersiveModeController* immersive_mode_controller,
132 FullscreenController* fullscreen_controller) 137 FullscreenController* fullscreen_controller)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
359 void ZoomBubbleView::WindowClosing() { 364 void ZoomBubbleView::WindowClosing() {
360 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't 365 // |zoom_bubble_| can be a new bubble by this point (as Close(); doesn't
361 // call this right away). Only set to NULL when it's this bubble. 366 // call this right away). Only set to NULL when it's this bubble.
362 if (zoom_bubble_ == this) 367 if (zoom_bubble_ == this)
363 zoom_bubble_ = NULL; 368 zoom_bubble_ = NULL;
364 } 369 }
365 370
366 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {} 371 ZoomBubbleView::ZoomBubbleExtensionInfo::ZoomBubbleExtensionInfo() {}
367 372
368 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {} 373 ZoomBubbleView::ZoomBubbleExtensionInfo::~ZoomBubbleExtensionInfo() {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698