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

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

Issue 8368016: Rebase BookmarkBubble on the new views bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add Textfield::[set_]select_all_on_focus, use GetInitiallyFocusedView. Created 9 years, 1 month 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/location_bar_view.cc
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.cc b/chrome/browser/ui/views/location_bar/location_bar_view.cc
index 30814edc9cd0ff268aac72737f187f5a1c461253..ff31229a7441e07a85da13d9ef244edd08a1a072 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -56,7 +56,6 @@
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/skia_util.h"
-#include "views/bubble/bubble_border.h"
#include "views/controls/label.h"
#include "views/controls/textfield/native_textfield_views.h"
#include "views/drag_utils.h"
@@ -405,14 +404,11 @@ void LocationBarView::SetStarToggled(bool on) {
}
void LocationBarView::ShowStarBubble(const GURL& url, bool newly_bookmarked) {
- gfx::Rect screen_bounds(star_view_->GetImageBounds());
// Compensate for some built-in padding in the Star image.
- screen_bounds.Inset(1, 1, 1, 2);
- gfx::Point origin(screen_bounds.origin());
- views::View::ConvertPointToScreen(star_view_, &origin);
- screen_bounds.set_origin(origin);
- browser::ShowBookmarkBubbleView(GetWidget(), screen_bounds, star_view_,
- browser_->profile(), url, newly_bookmarked);
+ gfx::Point anchor(star_view_->width() / 2, star_view_->height() - 5);
+ views::View::ConvertPointToScreen(star_view_, &anchor);
+ browser::ShowBookmarkBubbleView(GetWidget(), anchor, browser_->profile(),
+ url, newly_bookmarked);
}
gfx::Point LocationBarView::GetLocationEntryOrigin() const {

Powered by Google App Engine
This is Rietveld 408576698