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

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: owners,remove assets Created 5 years, 2 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 423a35ded026a266405cc9d08a617d387251c25f..ce813c90384ca6e6c05add4468d1b3d67f7872fb 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.cc
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.cc
@@ -79,9 +79,11 @@
#include "ui/events/event.h"
#include "ui/gfx/animation/slide_animation.h"
#include "ui/gfx/canvas.h"
+#include "ui/gfx/color_palette.h"
#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"
@@ -1374,8 +1376,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)
Peter Kasting 2015/10/21 19:45:47 This has a similar problem to the one I mentioned
Evan Stade 2015/10/21 23:20:01 maybe I should try to figure this one out before p
Evan Stade 2015/11/06 00:15:21 After looking at this a little more, I believe we'
+ : *GetThemeProvider()->GetImageSkiaNamed(omnibox_view_->GetIcon()));
location_icon_view_->ShowTooltip(!GetOmniboxView()->IsEditingOrEmpty());
Layout();

Powered by Google App Engine
This is Rietveld 408576698