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

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

Issue 8265005: first run bubble using the views/bubble api. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: update chrome_tests.gypi 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
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble_unittest.cc ('k') | chrome/browser/ui/views/stubs_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4cdc1c2d963dd6ebc2b25699722bbe5b0bbd721b..cab1b06b6eebcde69eeb28f66f13406af2a896a1 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -60,7 +60,7 @@
#include "views/controls/textfield/native_textfield_views.h"
#include "views/drag_utils.h"
-#if defined(OS_WIN)
+#if !defined(OS_CHROMEOS)
#include "chrome/browser/ui/views/first_run_bubble.h"
#endif
@@ -987,23 +987,12 @@ void LocationBarView::OnMouseEvent(const views::MouseEvent& event, UINT msg) {
void LocationBarView::ShowFirstRunBubbleInternal(
FirstRun::BubbleType bubble_type) {
-#if defined(OS_WIN) // First run bubble doesn't make sense for Chrome OS.
- // Point at the start of the edit control; adjust to look as good as possible.
- const int kXOffset = kNormalHorizontalEdgeThickness + kEdgeItemPadding +
- ResourceBundle::GetSharedInstance().GetBitmapNamed(
- IDR_OMNIBOX_HTTP)->width() + kItemPadding;
- const int kYOffset = -(kVerticalEdgeThickness + 2);
- gfx::Point origin(location_entry_view_->bounds().x() + kXOffset,
- y() + height() + kYOffset);
- // If the UI layout is RTL, the coordinate system is not transformed and
- // therefore we need to adjust the X coordinate so that bubble appears on the
- // right hand side of the location bar.
- if (base::i18n::IsRTL())
- origin.set_x(width() - origin.x());
- views::View::ConvertPointToScreen(this, &origin);
- FirstRunBubble::Show(browser_->profile(), GetWidget(),
- gfx::Rect(origin, gfx::Size()),
- views::BubbleBorder::TOP_LEFT, bubble_type);
+#if !defined(OS_CHROMEOS)
+ // First run bubble doesn't make sense for Chrome OS.
+ FirstRunBubble::ShowBubble(browser_->profile(),
+ location_icon_view_,
+ views::BubbleBorder::TOP_LEFT,
+ bubble_type);
#endif
}
« no previous file with comments | « chrome/browser/ui/views/first_run_bubble_unittest.cc ('k') | chrome/browser/ui/views/stubs_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698