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

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

Issue 15745031: Restyle omnibox popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove code from toolbar. Created 7 years, 6 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/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 c134a8a4d31d565f972a7ab81f1821f555ab269a..efdd1cb71f1a32939ac650c78bd8686c0837776a 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -427,6 +427,28 @@ SkColor LocationBarView::GetColor(ToolbarModel::SecurityLevel security_level,
}
}
+void LocationBarView::GetOmniboxPopupPositioningInfo(
+ gfx::Point* top_left_screen_coord,
+ int* popup_width,
+ int* left_margin,
+ int* right_margin) {
+ gfx::Rect location_bar_bounds(parent()->GetContentsBounds());
+
+ // The location bar is drawn using a background graphic that includes the
+ // border, so we inset by enough to make the edges line up, and the bubble
+ // appear at the same height as the Star bubble.
Peter Kasting 2013/06/06 22:52:04 Nit: I'd just nuke this comment (and the blank lin
+ location_bar_bounds.Inset(kNormalEdgeThickness, 0);
+
+ *top_left_screen_coord = gfx::Point(0, parent()->height());
+ views::View::ConvertPointToScreen(parent(), top_left_screen_coord);
+ *popup_width = parent()->width();
+
+ gfx::Point location_bar_in_toolbar(location_bar_bounds.origin());
+ views::View::ConvertPointToTarget(this, parent(), &location_bar_in_toolbar);
+ *left_margin = location_bar_in_toolbar.x();
+ *right_margin = *popup_width - *left_margin - location_bar_bounds.width();
+}
+
// static
int LocationBarView::GetItemPadding() {
const int kTouchItemPadding = 8;

Powered by Google App Engine
This is Rietveld 408576698