| 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/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/material_design/material_design_controller.h" |
| 8 #include "ash/common/session/session_state_delegate.h" | 8 #include "ash/common/session/session_state_delegate.h" |
| 9 #include "ash/common/system/chromeos/power/power_status.h" | 9 #include "ash/common/system/chromeos/power/power_status.h" |
| 10 #include "ash/common/system/chromeos/power/power_status_view.h" | 10 #include "ash/common/system/chromeos/power/power_status_view.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 SetAccessibleName(text); | 72 SetAccessibleName(text); |
| 73 | 73 |
| 74 power_view_right_align = true; | 74 power_view_right_align = true; |
| 75 } | 75 } |
| 76 | 76 |
| 77 if (PowerStatus::Get()->IsBatteryPresent()) { | 77 if (PowerStatus::Get()->IsBatteryPresent()) { |
| 78 power_status_view_ = new ash::PowerStatusView(power_view_right_align); | 78 power_status_view_ = new ash::PowerStatusView(power_view_right_align); |
| 79 AddChildView(power_status_view_); | 79 AddChildView(power_status_view_); |
| 80 OnPowerStatusChanged(); | 80 OnPowerStatusChanged(); |
| 81 } | 81 } |
| 82 |
| 83 if (MaterialDesignController::IsSystemTrayMenuMaterial()) |
| 84 SetInkDropMode(InkDropHostView::InkDropMode::ON); |
| 82 } | 85 } |
| 83 | 86 |
| 84 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); } | 87 ~SettingsDefaultView() override { PowerStatus::Get()->RemoveObserver(this); } |
| 85 | 88 |
| 86 // Overridden from ash::ActionableView. | 89 // Overridden from ash::ActionableView. |
| 87 bool PerformAction(const ui::Event& event) override { | 90 bool PerformAction(const ui::Event& event) override { |
| 88 if (login_status_ == LoginStatus::NOT_LOGGED_IN || | 91 if (login_status_ == LoginStatus::NOT_LOGGED_IN || |
| 89 login_status_ == LoginStatus::LOCKED || | 92 login_status_ == LoginStatus::LOCKED || |
| 90 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { | 93 WmShell::Get()->GetSessionStateDelegate()->IsInSecondaryLoginScreen()) { |
| 91 return false; | 94 return false; |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 | 172 |
| 170 void TraySettings::DestroyDefaultView() { | 173 void TraySettings::DestroyDefaultView() { |
| 171 default_view_ = nullptr; | 174 default_view_ = nullptr; |
| 172 } | 175 } |
| 173 | 176 |
| 174 void TraySettings::DestroyDetailedView() {} | 177 void TraySettings::DestroyDetailedView() {} |
| 175 | 178 |
| 176 void TraySettings::UpdateAfterLoginStatusChange(LoginStatus status) {} | 179 void TraySettings::UpdateAfterLoginStatusChange(LoginStatus status) {} |
| 177 | 180 |
| 178 } // namespace ash | 181 } // namespace ash |
| OLD | NEW |