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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_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/bookmarks/bookmark_bubble_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index d075d7ef30ae0ec747a6ebda133b05ea23714e67..4891f85b49061334c90edd428d823c80afee0618 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -121,13 +121,6 @@ views::View* BookmarkBubbleView::GetInitiallyFocusedView() {
return title_tf_;
}
-gfx::Rect BookmarkBubbleView::GetAnchorRect() {
- // Compensate for some built-in padding in the star image.
- gfx::Rect rect(BubbleDelegateView::GetAnchorRect());
- rect.Inset(0, anchor_view() ? 5 : 0);
- return rect;
-}
-
void BookmarkBubbleView::WindowClosing() {
// We have to reset |bubble_| here, not in our destructor, because we'll be
// destroyed asynchronously and the shown state will be checked before then.
@@ -262,6 +255,8 @@ BookmarkBubbleView::BookmarkBubbleView(views::View* anchor_view,
parent_combobox_(NULL),
remove_bookmark_(false),
apply_edits_(true) {
+ // Compensate for built-in vertical padding in the anchor view's image.
+ set_anchor_insets(gfx::Insets(5, 0, 5, 0));
}
string16 BookmarkBubbleView::GetTitle() {
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h ('k') | chrome/browser/ui/views/chrome_to_mobile_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698