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

Unified Diff: chrome/browser/ui/views/network_profile_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/network_profile_bubble_view.cc
diff --git a/chrome/browser/ui/views/network_profile_bubble_view.cc b/chrome/browser/ui/views/network_profile_bubble_view.cc
index 6f6587d9f93239eb6bb25e58b9985c1a3a960062..96d2c9e50dba69c3b1b5c05a277f63e84723998a 100644
--- a/chrome/browser/ui/views/network_profile_bubble_view.cc
+++ b/chrome/browser/ui/views/network_profile_bubble_view.cc
@@ -60,6 +60,9 @@ NetworkProfileBubbleView::NetworkProfileBubbleView(
: BubbleDelegateView(anchor, views::BubbleBorder::TOP_RIGHT),
navigator_(navigator),
profile_(profile) {
+ // Compensate for built-in vertical padding in the anchor view's image.
+ set_anchor_insets(
+ gfx::Insets(kAnchorVerticalInset, 0, kAnchorVerticalInset, 0));
}
////////////////////////////////////////////////////////////////////////////////
@@ -107,13 +110,6 @@ void NetworkProfileBubbleView::Init() {
layout->AddView(ok_button);
}
-gfx::Rect NetworkProfileBubbleView::GetAnchorRect() {
- // Compensate for padding in anchor.
- gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
- rect.Inset(0, anchor_view() ? kAnchorVerticalInset : 0);
- return rect;
-}
-
void NetworkProfileBubbleView::ButtonPressed(views::Button* sender,
const ui::Event& event) {
NetworkProfileBubble::RecordUmaEvent(
« no previous file with comments | « chrome/browser/ui/views/network_profile_bubble_view.h ('k') | chrome/browser/ui/views/page_info_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698