Chromium Code Reviews| Index: ash/common/system/tray/tray_item_view.cc |
| diff --git a/ash/common/system/tray/tray_item_view.cc b/ash/common/system/tray/tray_item_view.cc |
| index 65ad50c7385676dbb2f33e8c9d1805e06942f210..83da55f15d77582e27fdcb0f0db803b49d107217 100644 |
| --- a/ash/common/system/tray/tray_item_view.cc |
| +++ b/ash/common/system/tray/tray_item_view.cc |
| @@ -4,7 +4,6 @@ |
| #include "ash/common/system/tray/tray_item_view.h" |
| -#include "ash/common/material_design/material_design_controller.h" |
| #include "ash/common/shelf/wm_shelf_util.h" |
| #include "ash/common/system/tray/system_tray.h" |
| #include "ash/common/system/tray/system_tray_item.h" |
| @@ -77,32 +76,18 @@ void TrayItemView::SetVisible(bool set_visible) { |
| } |
| } |
| -// static |
| -bool TrayItemView::UseMd() { |
| - return MaterialDesignController::UseMaterialDesignSystemIcons(); |
| -} |
| - |
| int TrayItemView::GetAnimationDurationMS() { |
| return kTrayItemAnimationDurationMS; |
| } |
| gfx::Size TrayItemView::GetPreferredSize() const { |
| DCHECK_EQ(1, child_count()); |
| - gfx::Size size; |
| - if (UseMd()) { |
| - gfx::Size inner_size = views::View::GetPreferredSize(); |
| - if (image_view_) |
| - inner_size = gfx::Size(kTrayIconSize, kTrayIconSize); |
| - gfx::Rect rect(inner_size); |
| - rect.Inset(gfx::Insets(-kTrayImageItemPadding)); |
| - size = rect.size(); |
| - } else { |
| - size = views::View::GetPreferredSize(); |
| - if (IsHorizontalAlignment(owner()->system_tray()->shelf_alignment())) |
| - size.set_height(kTrayIconHeight); |
|
tdanderson
2017/03/16 18:01:29
note: kTrayIconHeight and kTrayIconWidth are now u
|
| - else |
| - size.set_width(kTrayIconWidth); |
| - } |
| + gfx::Size inner_size = views::View::GetPreferredSize(); |
| + if (image_view_) |
| + inner_size = gfx::Size(kTrayIconSize, kTrayIconSize); |
| + gfx::Rect rect(inner_size); |
| + rect.Inset(gfx::Insets(-kTrayImageItemPadding)); |
| + gfx::Size size = rect.size(); |
| if (!animation_.get() || !animation_->is_animating()) |
| return size; |
| if (IsHorizontalAlignment(owner()->system_tray()->shelf_alignment())) { |