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

Unified Diff: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc

Issue 10830366: Avoid overriding Bubble's GetAnchorRect() where possible. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove a redundant DCHECK. Created 8 years, 4 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
Index: chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
diff --git a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
index 2c13d0c930f59200bf5de46fb769c17eac09ffc3..46f4a8b835391a60e3b3852121f3b1ce42f51ba6 100644
--- a/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
+++ b/chrome/browser/ui/views/location_bar/zoom_bubble_view.cc
@@ -74,6 +74,8 @@ ZoomBubbleView::ZoomBubbleView(views::View* anchor_view,
label_(NULL),
tab_contents_(tab_contents),
auto_close_(auto_close) {
+ // Compensate for built-in vertical padding in the anchor view's image.
+ set_anchor_insets(gfx::Insets(5, 0, 5, 0));
set_use_focusless(auto_close);
set_notify_enter_exit_on_child(true);
}
@@ -147,13 +149,6 @@ void ZoomBubbleView::Init() {
StartTimerIfNecessary();
}
-gfx::Rect ZoomBubbleView::GetAnchorRect() {
- // Compensate for some built-in padding in the zoom image.
- gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
- rect.Inset(0, anchor_view() ? 5 : 0);
- return rect;
-}
-
void ZoomBubbleView::WindowClosing() {
DCHECK(zoom_bubble_ == this);
zoom_bubble_ = NULL;
« no previous file with comments | « chrome/browser/ui/views/location_bar/zoom_bubble_view.h ('k') | chrome/browser/ui/views/network_profile_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698