| 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" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) { | 45 if (!MaterialDesignController::IsSystemTrayMenuMaterial()) { |
| 46 // The icon doesn't change in non-md. | 46 // The icon doesn't change in non-md. |
| 47 more_->SetImage(ui::ResourceBundle::GetSharedInstance() | 47 more_->SetImage(ui::ResourceBundle::GetSharedInstance() |
| 48 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) | 48 .GetImageNamed(IDR_AURA_UBER_TRAY_MORE) |
| 49 .ToImageSkia()); | 49 .ToImageSkia()); |
| 50 } | 50 } |
| 51 tri_view->AddView(TriView::Container::END, more_); | 51 tri_view->AddView(TriView::Container::END, more_); |
| 52 } else { | 52 } else { |
| 53 tri_view->SetContainerVisible(TriView::Container::END, false); | 53 tri_view->SetContainerVisible(TriView::Container::END, false); |
| 54 } | 54 } |
| 55 |
| 56 if (MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 57 SetInkDropMode(InkDropHostView::InkDropMode::ON); |
| 55 } | 58 } |
| 56 | 59 |
| 57 TrayItemMore::~TrayItemMore() {} | 60 TrayItemMore::~TrayItemMore() {} |
| 58 | 61 |
| 59 void TrayItemMore::SetLabel(const base::string16& label) { | 62 void TrayItemMore::SetLabel(const base::string16& label) { |
| 60 label_->SetText(label); | 63 label_->SetText(label); |
| 61 Layout(); | 64 Layout(); |
| 62 SchedulePaint(); | 65 SchedulePaint(); |
| 63 } | 66 } |
| 64 | 67 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 if (!accessible_name_.empty()) | 104 if (!accessible_name_.empty()) |
| 102 state->name = accessible_name_; | 105 state->name = accessible_name_; |
| 103 } | 106 } |
| 104 | 107 |
| 105 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { | 108 void TrayItemMore::OnNativeThemeChanged(const ui::NativeTheme* theme) { |
| 106 ActionableView::OnNativeThemeChanged(theme); | 109 ActionableView::OnNativeThemeChanged(theme); |
| 107 UpdateStyle(); | 110 UpdateStyle(); |
| 108 } | 111 } |
| 109 | 112 |
| 110 } // namespace ash | 113 } // namespace ash |
| OLD | NEW |