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" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 TrayItemMore::~TrayItemMore() {} | 55 TrayItemMore::~TrayItemMore() {} |
56 | 56 |
57 void TrayItemMore::SetLabel(const base::string16& label) { | 57 void TrayItemMore::SetLabel(const base::string16& label) { |
58 label_->SetText(label); | 58 label_->SetText(label); |
59 Layout(); | 59 Layout(); |
60 SchedulePaint(); | 60 SchedulePaint(); |
61 } | 61 } |
62 | 62 |
63 void TrayItemMore::SetImage(const gfx::ImageSkia* image_skia) { | 63 void TrayItemMore::SetImage(const gfx::ImageSkia& image_skia) { |
64 icon_->SetImage(image_skia); | 64 icon_->SetImage(image_skia); |
65 SchedulePaint(); | 65 SchedulePaint(); |
66 } | 66 } |
67 | 67 |
68 void TrayItemMore::SetAccessibleName(const base::string16& name) { | 68 void TrayItemMore::SetAccessibleName(const base::string16& name) { |
69 accessible_name_ = name; | 69 accessible_name_ = name; |
70 } | 70 } |
71 | 71 |
72 void TrayItemMore::ReplaceIcon(views::View* view) { | 72 void TrayItemMore::ReplaceIcon(views::View* view) { |
73 delete icon_; | 73 delete icon_; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 } | 106 } |
107 } | 107 } |
108 | 108 |
109 void TrayItemMore::GetAccessibleState(ui::AXViewState* state) { | 109 void TrayItemMore::GetAccessibleState(ui::AXViewState* state) { |
110 ActionableView::GetAccessibleState(state); | 110 ActionableView::GetAccessibleState(state); |
111 if (!accessible_name_.empty()) | 111 if (!accessible_name_.empty()) |
112 state->name = accessible_name_; | 112 state->name = accessible_name_; |
113 } | 113 } |
114 | 114 |
115 } // namespace ash | 115 } // namespace ash |
OLD | NEW |