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

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

Issue 1410293003: Vectorize LocationIconView icons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix android Created 5 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/toolbar/toolbar_model_impl.cc ('k') | components/omnibox/browser/omnibox_view.h » ('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 c5dbfd8a84dbb4d21c9ee3150f8d7dd83f37f002..52a9952facbc5773e7dc98789c08cbfc9d3a3101 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -86,6 +86,7 @@
#include "ui/gfx/color_utils.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_skia_operations.h"
+#include "ui/gfx/paint_vector_icon.h"
#include "ui/gfx/scoped_canvas.h"
#include "ui/gfx/skia_util.h"
#include "ui/gfx/text_utils.h"
@@ -1398,8 +1399,11 @@ void LocationBarView::AnimationEnded(const gfx::Animation* animation) {
// LocationBarView, private OmniboxEditController implementation:
void LocationBarView::OnChanged() {
- int icon_id = omnibox_view_->GetIcon();
- location_icon_view_->SetImage(GetThemeProvider()->GetImageSkiaNamed(icon_id));
+ location_icon_view_->SetImage(
+ ui::MaterialDesignController::IsModeMaterial()
+ ? gfx::CreateVectorIcon(omnibox_view_->GetVectorIcon(), 16,
+ gfx::kChromeIconGrey)
+ : *GetThemeProvider()->GetImageSkiaNamed(omnibox_view_->GetIcon()));
location_icon_view_->ShowTooltip(!GetOmniboxView()->IsEditingOrEmpty());
Layout();
« no previous file with comments | « chrome/browser/ui/toolbar/toolbar_model_impl.cc ('k') | components/omnibox/browser/omnibox_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698