| 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/system_tray_item.h" | 8 #include "ash/common/system/tray/system_tray_item.h" |
| 9 #include "ash/common/system/tray/tray_constants.h" | 9 #include "ash/common/system/tray/tray_constants.h" |
| 10 #include "ash/common/system/tray/tray_popup_item_style.h" | 10 #include "ash/common/system/tray/tray_popup_item_style.h" |
| 11 #include "ash/common/system/tray/tray_popup_utils.h" | 11 #include "ash/common/system/tray/tray_popup_utils.h" |
| 12 #include "ash/common/system/tray/tri_view.h" | 12 #include "ash/common/system/tray/tri_view.h" |
| 13 #include "ash/resources/vector_icons/vector_icons.h" | 13 #include "ash/resources/vector_icons/vector_icons.h" |
| 14 #include "base/memory/ptr_util.h" | 14 #include "base/memory/ptr_util.h" |
| 15 #include "grit/ash_resources.h" | 15 #include "grit/ash_resources.h" |
| 16 #include "ui/accessibility/ax_view_state.h" | 16 #include "ui/accessibility/ax_node_data.h" |
| 17 #include "ui/base/resource/resource_bundle.h" | 17 #include "ui/base/resource/resource_bundle.h" |
| 18 #include "ui/gfx/image/image.h" | 18 #include "ui/gfx/image/image.h" |
| 19 #include "ui/gfx/paint_vector_icon.h" | 19 #include "ui/gfx/paint_vector_icon.h" |
| 20 #include "ui/views/controls/image_view.h" | 20 #include "ui/views/controls/image_view.h" |
| 21 #include "ui/views/controls/label.h" | 21 #include "ui/views/controls/label.h" |
| 22 #include "ui/views/layout/box_layout.h" | 22 #include "ui/views/layout/box_layout.h" |
| 23 #include "ui/views/layout/fill_layout.h" | 23 #include "ui/views/layout/fill_layout.h" |
| 24 | 24 |
| 25 namespace ash { | 25 namespace ash { |
| 26 | 26 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 bool TrayItemMore::PerformAction(const ui::Event& event) { | 94 bool TrayItemMore::PerformAction(const ui::Event& event) { |
| 95 if (!show_more_) | 95 if (!show_more_) |
| 96 return false; | 96 return false; |
| 97 | 97 |
| 98 owner()->TransitionDetailedView(); | 98 owner()->TransitionDetailedView(); |
| 99 return true; | 99 return true; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void TrayItemMore::GetAccessibleState(ui::AXViewState* state) { | 102 void TrayItemMore::GetAccessibleNodeData(ui::AXNodeData* node_data) { |
| 103 ActionableView::GetAccessibleState(state); | 103 ActionableView::GetAccessibleNodeData(node_data); |
| 104 if (!accessible_name_.empty()) | 104 if (!accessible_name_.empty()) |
| 105 state->name = accessible_name_; | 105 node_data->SetName(accessible_name_); |
| 106 } | 106 } |
| 107 | 107 |
| 108 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 108 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 109 ActionableView::OnNativeThemeChanged(theme); | 109 ActionableView::OnNativeThemeChanged(theme); |
| 110 UpdateStyle(); | 110 UpdateStyle(); |
| 111 } | 111 } |
| 112 | 112 |
| 113 } // namespace ash | 113 } // namespace ash |
| OLD | NEW |