 Chromium Code Reviews
 Chromium Code Reviews Issue 1313603003:
  Vectorize website settings icons in omnibox  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 1313603003:
  Vectorize website settings icons in omnibox  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm | 
| diff --git a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm | 
| index f896a4b0763316f00c5673f28fa945ffa819427b..f53be8829075d3e320c2948fbd7b2cf2607a903f 100644 | 
| --- a/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm | 
| +++ b/chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm | 
| @@ -23,7 +23,6 @@ | 
| #include "net/base/net_util.h" | 
| #include "ui/base/cocoa/appkit_utils.h" | 
| #include "ui/base/l10n/l10n_util.h" | 
| -#include "ui/base/resource/resource_bundle.h" | 
| #include "ui/gfx/image/image.h" | 
| #include "ui/gfx/scoped_ns_graphics_context_save_gstate_mac.h" | 
| @@ -178,17 +177,13 @@ ContentSettingDecoration::~ContentSettingDecoration() { | 
| bool ContentSettingDecoration::UpdateFromWebContents( | 
| WebContents* web_contents) { | 
| bool was_visible = IsVisible(); | 
| - int old_icon = content_setting_image_model_->get_icon(); | 
| 
Evan Stade
2015/08/26 22:57:53
osx needs the icon id to determine if the image ha
 | 
| + int old_icon = content_setting_image_model_->icon_id(); | 
| content_setting_image_model_->UpdateFromWebContents(web_contents); | 
| SetVisible(content_setting_image_model_->is_visible()); | 
| bool decoration_changed = was_visible != IsVisible() || | 
| - old_icon != content_setting_image_model_->get_icon(); | 
| + old_icon != content_setting_image_model_->icon_id(); | 
| if (IsVisible()) { | 
| - // TODO(thakis): We should use pdfs for these icons on OSX. | 
| - // http://crbug.com/35847 | 
| - ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 
| - SetImage(rb.GetNativeImageNamed( | 
| - content_setting_image_model_->get_icon()).ToNSImage()); | 
| + SetImage(content_setting_image_model_->icon().ToNSImage()); | 
| SetToolTip(base::SysUTF8ToNSString( | 
| content_setting_image_model_->get_tooltip())); |