Chromium Code Reviews| Index: ash/common/system/tray/tray_notification_view.cc |
| diff --git a/ash/common/system/tray/tray_notification_view.cc b/ash/common/system/tray/tray_notification_view.cc |
| index 0d7fe29d14c065fc3c240538e1e91220f846fb9e..89aaac524c79866d6311c9ff8cb070f7bad95eed 100644 |
| --- a/ash/common/system/tray/tray_notification_view.cc |
| +++ b/ash/common/system/tray/tray_notification_view.cc |
| @@ -7,11 +7,11 @@ |
| #include "ash/common/material_design/material_design_controller.h" |
| #include "ash/common/system/tray/system_tray_item.h" |
| #include "ash/common/system/tray/tray_constants.h" |
| +#include "ash/resources/vector_icons/vector_icons.h" |
| #include "grit/ash_resources.h" |
| #include "ui/base/resource/resource_bundle.h" |
| #include "ui/gfx/image/image_skia.h" |
| #include "ui/gfx/paint_vector_icon.h" |
| -#include "ui/gfx/vector_icons_public.h" |
| #include "ui/resources/grit/ui_resources.h" |
| #include "ui/views/background.h" |
| #include "ui/views/controls/button/image_button.h" |
| @@ -25,21 +25,20 @@ namespace { |
| // Maps a non-MD PNG resource id to its corresponding MD vector icon id. |
|
tdanderson
2016/09/07 22:36:13
same as previous comment
Evan Stade
2016/09/07 22:41:52
Done.
|
| // TODO(tdanderson): Remove this once material design is enabled by |
| // default. See crbug.com/614453. |
| -gfx::VectorIconId ResourceIdToVectorIconId(int resource_id) { |
| - gfx::VectorIconId vector_id = gfx::VectorIconId::VECTOR_ICON_NONE; |
| +const gfx::VectorIcon& ResourceIdToVectorIcon(int resource_id) { |
| switch (resource_id) { |
| case IDR_AURA_UBER_TRAY_ACCESSIBILITY_DARK: |
| - return gfx::VectorIconId::SYSTEM_MENU_ACCESSIBILITY; |
| + return kSystemMenuAccessibilityIcon; |
| #if defined(OS_CHROMEOS) |
| case IDR_AURA_UBER_TRAY_SMS: |
| - return gfx::VectorIconId::SYSTEM_MENU_SMS; |
| + return kSystemMenuSmsIcon; |
| #endif |
| default: |
| NOTREACHED(); |
| break; |
| } |
| - return vector_id; |
| + return gfx::kNoneIcon; |
| } |
| } // namespace |
| @@ -65,7 +64,7 @@ void TrayNotificationView::InitView(views::View* contents) { |
| icon_ = new views::ImageView; |
| if (icon_id_ != 0) { |
| if (MaterialDesignController::UseMaterialDesignSystemIcons()) { |
| - icon_->SetImage(gfx::CreateVectorIcon(ResourceIdToVectorIconId(icon_id_), |
| + icon_->SetImage(gfx::CreateVectorIcon(ResourceIdToVectorIcon(icon_id_), |
| kMenuIconColor)); |
| } else { |
| icon_->SetImage( |