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

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

Issue 1234593002: Changed omnibox rendering to use a single asset. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Moved LocationBarView::CreateBorderPainter() method inline. Created 5 years, 5 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
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | 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 ede1d761ed54513840d4a84c86fb6dc2fb0f6608..873b54bdf835fb16b6bb76f828523d6bcb325ceb 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -178,11 +178,17 @@ void LocationBarView::Init() {
// not prepared for that.
DCHECK(GetWidget());
- const int kOmniboxPopupBorderImages[] =
- IMAGE_GRID(IDR_OMNIBOX_POPUP_BORDER_AND_SHADOW);
- const int kOmniboxBorderImages[] = IMAGE_GRID(IDR_TEXTFIELD);
- border_painter_.reset(views::Painter::CreateImageGridPainter(
- is_popup_mode_ ? kOmniboxPopupBorderImages : kOmniboxBorderImages));
+ if (is_popup_mode_) {
+ const int kOmniboxPopupBorderImages[] =
+ IMAGE_GRID(IDR_OMNIBOX_POPUP_BORDER_AND_SHADOW);
+ border_painter_.reset(
+ views::Painter::CreateImageGridPainter(kOmniboxPopupBorderImages));
+ } else {
+ ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
+ const gfx::Insets omnibox_border_insets(14, 9, 14, 9);
+ border_painter_.reset(views::Painter::CreateImagePainter(
+ *rb.GetImageSkiaNamed(IDR_OMNIBOX_BORDER), omnibox_border_insets));
+ }
location_icon_view_ = new LocationIconView(this);
location_icon_view_->set_drag_controller(this);
« no previous file with comments | « chrome/app/theme/theme_resources.grd ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698