Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(310)

Side by Side Diff: ash/common/system/tray/tray_item_more.cc

Issue 2457393006: [ash-md] Added ink drop to system menu rows that inherit from ActionableView. (Closed)
Patch Set: Fixed the failing test: 'SpokenFeedbackTest.NavigateSystemTray' Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/system/tray/tray_constants.h ('k') | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ash/common/system/tray/tray_constants.h ('k') | ash/common/system/tray/tray_popup_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698