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

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

Powered by Google App Engine
This is Rietveld 408576698