| Index: chrome/browser/ui/content_settings/content_setting_image_model.cc
|
| diff --git a/chrome/browser/ui/content_settings/content_setting_image_model.cc b/chrome/browser/ui/content_settings/content_setting_image_model.cc
|
| index a8b7c2ec4c5a283bf879385c488ba33e4e58fabc..68cf8c8824b375d91b69b5773053bfe0cf72133e 100644
|
| --- a/chrome/browser/ui/content_settings/content_setting_image_model.cc
|
| +++ b/chrome/browser/ui/content_settings/content_setting_image_model.cc
|
| @@ -28,11 +28,7 @@ using content::WebContents;
|
| namespace {
|
|
|
| bool UseVectorGraphics() {
|
| -#if defined(OS_MACOSX)
|
| - return false;
|
| -#else
|
| return ui::MaterialDesignController::IsModeMaterial();
|
| -#endif
|
| }
|
|
|
| } // namespace
|
| @@ -577,3 +573,18 @@ void ContentSettingImageModel::SetIconByResourceId(int id) {
|
| raster_icon_ =
|
| ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(id);
|
| }
|
| +
|
| +bool ContentSettingImageModel::UpdateFromWebContentsAndCheckIfIconChanged(
|
| + content::WebContents* web_contents) {
|
| + if (UseVectorGraphics()) {
|
| + gfx::VectorIconId old_vector_icon = vector_icon_id_;
|
| + gfx::VectorIconId old_badge_icon = vector_icon_badge_id_;
|
| + UpdateFromWebContents(web_contents);
|
| + return old_vector_icon != vector_icon_id_ &&
|
| + old_badge_icon != vector_icon_badge_id_;
|
| + } else {
|
| + int old_icon = raster_icon_id_;
|
| + UpdateFromWebContents(web_contents);
|
| + return old_icon != raster_icon_id_;
|
| + }
|
| +}
|
|
|