| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/tray/tray_item_more.h" | 5 #include "ash/common/system/tray/tray_item_more.h" |
| 6 | 6 |
| 7 #include "ash/common/material_design/material_design_controller.h" | 7 #include "ash/common/material_design/material_design_controller.h" |
| 8 #include "ash/common/system/tray/fixed_sized_image_view.h" | 8 #include "ash/common/system/tray/fixed_sized_image_view.h" |
| 9 #include "ash/common/system/tray/system_tray_item.h" | 9 #include "ash/common/system/tray/system_tray_item.h" |
| 10 #include "ash/common/system/tray/tray_constants.h" | 10 #include "ash/common/system/tray/tray_constants.h" |
| 11 #include "ash/common/system/tray/tray_popup_item_style.h" | 11 #include "ash/common/system/tray/tray_popup_item_style.h" |
| 12 #include "ash/resources/vector_icons/vector_icons.h" | 12 #include "ash/resources/vector_icons/vector_icons.h" |
| 13 #include "base/memory/ptr_util.h" | 13 #include "base/memory/ptr_util.h" |
| 14 #include "grit/ash_resources.h" | 14 #include "grit/ash_resources.h" |
| 15 #include "ui/accessibility/ax_view_state.h" | 15 #include "ui/accessibility/ax_view_state.h" |
| 16 #include "ui/base/resource/resource_bundle.h" | 16 #include "ui/base/resource/resource_bundle.h" |
| 17 #include "ui/gfx/image/image.h" | 17 #include "ui/gfx/image/image.h" |
| 18 #include "ui/gfx/paint_vector_icon.h" | 18 #include "ui/gfx/paint_vector_icon.h" |
| 19 #include "ui/views/controls/image_view.h" | 19 #include "ui/views/controls/image_view.h" |
| 20 #include "ui/views/controls/label.h" | 20 #include "ui/views/controls/label.h" |
| 21 #include "ui/views/layout/box_layout.h" | 21 #include "ui/views/layout/box_layout.h" |
| 22 | 22 |
| 23 namespace ash { | 23 namespace ash { |
| 24 | 24 |
| 25 TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more) | 25 TrayItemMore::TrayItemMore(SystemTrayItem* owner, bool show_more) |
| 26 : owner_(owner), | 26 : ActionableView(owner), |
| 27 show_more_(show_more), | 27 show_more_(show_more), |
| 28 icon_(nullptr), | 28 icon_(nullptr), |
| 29 label_(nullptr), | 29 label_(nullptr), |
| 30 more_(nullptr) { | 30 more_(nullptr) { |
| 31 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, | 31 SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal, |
| 32 kTrayPopupPaddingHorizontal, 0, | 32 kTrayPopupPaddingHorizontal, 0, |
| 33 kTrayPopupPaddingBetweenItems)); | 33 kTrayPopupPaddingBetweenItems)); |
| 34 | 34 |
| 35 icon_ = new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT)); | 35 icon_ = new FixedSizedImageView(0, GetTrayConstant(TRAY_POPUP_ITEM_HEIGHT)); |
| 36 AddChildView(icon_); | 36 AddChildView(icon_); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 if (!accessible_name_.empty()) | 122 if (!accessible_name_.empty()) |
| 123 state->name = accessible_name_; | 123 state->name = accessible_name_; |
| 124 } | 124 } |
| 125 | 125 |
| 126 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 126 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 127 ActionableView::OnNativeThemeChanged(theme); | 127 ActionableView::OnNativeThemeChanged(theme); |
| 128 UpdateStyle(); | 128 UpdateStyle(); |
| 129 } | 129 } |
| 130 | 130 |
| 131 } // namespace ash | 131 } // namespace ash |
| OLD | NEW |