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

Side by Side Diff: ash/common/system/chromeos/settings/tray_settings.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 | « no previous file | ash/common/system/chromeos/tray_caps_lock.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/chromeos/settings/tray_settings.h" 5 #include "ash/common/system/chromeos/settings/tray_settings.h"
6 6
7 #include "ash/common/material_design/material_design_controller.h"
7 #include "ash/common/session/session_state_delegate.h" 8 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/system/chromeos/power/power_status.h" 9 #include "ash/common/system/chromeos/power/power_status.h"
9 #include "ash/common/system/chromeos/power/power_status_view.h" 10 #include "ash/common/system/chromeos/power/power_status_view.h"
10 #include "ash/common/system/tray/actionable_view.h" 11 #include "ash/common/system/tray/actionable_view.h"
11 #include "ash/common/system/tray/fixed_sized_image_view.h" 12 #include "ash/common/system/tray/fixed_sized_image_view.h"
12 #include "ash/common/system/tray/system_tray_controller.h" 13 #include "ash/common/system/tray/system_tray_controller.h"
13 #include "ash/common/system/tray/system_tray_delegate.h" 14 #include "ash/common/system/tray/system_tray_delegate.h"
14 #include "ash/common/system/tray/tray_constants.h" 15 #include "ash/common/system/tray/tray_constants.h"
15 #include "ash/common/wm_shell.h" 16 #include "ash/common/wm_shell.h"
16 #include "base/logging.h" 17 #include "base/logging.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 SetAccessibleName(text); 66 SetAccessibleName(text);
66 67
67 power_view_right_align = true; 68 power_view_right_align = true;
68 } 69 }
69 70
70 if (PowerStatus::Get()->IsBatteryPresent()) { 71 if (PowerStatus::Get()->IsBatteryPresent()) {
71 power_status_view_ = new ash::PowerStatusView(power_view_right_align); 72 power_status_view_ = new ash::PowerStatusView(power_view_right_align);
72 AddChildView(power_status_view_); 73 AddChildView(power_status_view_);
73 OnPowerStatusChanged(); 74 OnPowerStatusChanged();
74 } 75 }
76
77 if (MaterialDesignController::IsSystemTrayMenuMaterial())
78 SetInkDropMode(InkDropHostView::InkDropMode::ON);
75 } 79 }
76 80
77 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); } 81 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); }
78 82
79 // Overridden from ash::ActionableView. 83 // Overridden from ash::ActionableView.
80 bool PerformAction(const ui::Event& event) override { 84 bool PerformAction(const ui::Event& event) override {
81 if (login_status_ == LoginStatus::NOT_LOGGED_IN || 85 if (login_status_ == LoginStatus::NOT_LOGGED_IN ||
82 login_status_ == LoginStatus::LOCKED || 86 login_status_ == LoginStatus::LOCKED ||
83 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { 87 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) {
84 return false; 88 return false;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 166
163 void TraySettings::DestroyDefaultView() { 167 void TraySettings::DestroyDefaultView() {
164 default_view_ = nullptr; 168 default_view_ = nullptr;
165 } 169 }
166 170
167 void TraySettings::DestroyDetailedView() {} 171 void TraySettings::DestroyDetailedView() {}
168 172
169 void TraySettings::UpdateAfterLoginStatusChange(LoginStatus status) {} 173 void TraySettings::UpdateAfterLoginStatusChange(LoginStatus status) {}
170 174
171 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/common/system/chromeos/tray_caps_lock.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698