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

Unified Diff: chrome/browser/ui/cocoa/location_bar/content_setting_decoration.mm

Issue 1313603003: Vectorize website settings icons in omnibox (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change DCHECK Created 5 years, 4 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 | « no previous file | chrome/browser/ui/content_settings/content_setting_image_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+ 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()));
« no previous file with comments | « no previous file | chrome/browser/ui/content_settings/content_setting_image_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698