Chromium Code Reviews| 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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "ash/accelerators/accelerator_commands.h" | 9 #include "ash/accelerators/accelerator_commands.h" |
| 10 #include "ash/accelerators/accelerator_controller_delegate.h" | 10 #include "ash/accelerators/accelerator_controller_delegate.h" |
| (...skipping 502 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 513 Shell::GetWmRootWindowForNewWindows()->GetRootWindowController(); | 513 Shell::GetWmRootWindowForNewWindows()->GetRootWindowController(); |
| 514 StatusAreaWidget* status_area_widget = | 514 StatusAreaWidget* status_area_widget = |
| 515 root_window_controller->GetShelf()->GetStatusAreaWidget(); | 515 root_window_controller->GetShelf()->GetStatusAreaWidget(); |
| 516 // Tests (clusterfuzz) can trigger this before the status area is ready. | 516 // Tests (clusterfuzz) can trigger this before the status area is ready. |
| 517 if (status_area_widget) | 517 if (status_area_widget) |
| 518 status_area_widget->palette_tray()->ShowPalette(); | 518 status_area_widget->palette_tray()->ShowPalette(); |
| 519 } | 519 } |
| 520 | 520 |
| 521 bool CanHandleShowStylusTools() { | 521 bool CanHandleShowStylusTools() { |
| 522 return Shell::Get()->palette_delegate() && | 522 return Shell::Get()->palette_delegate() && |
| 523 Shell::Get()->palette_delegate()->ShouldShowPalette(); | 523 Shell::Get()->palette_delegate()->ShouldShowPalette() && |
| 524 palette_utils::ShouldCreatePalette(); | |
|
jdufault
2017/04/19 22:58:38
Check this first
wutao
2017/04/20 16:17:51
Done.
| |
| 524 } | 525 } |
| 525 | 526 |
| 526 void HandleSuspend() { | 527 void HandleSuspend() { |
| 527 base::RecordAction(UserMetricsAction("Accel_Suspend")); | 528 base::RecordAction(UserMetricsAction("Accel_Suspend")); |
| 528 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestSuspend(); | 529 chromeos::DBusThreadManager::Get()->GetPowerManagerClient()->RequestSuspend(); |
| 529 } | 530 } |
| 530 | 531 |
| 531 bool CanHandleCycleUser() { | 532 bool CanHandleCycleUser() { |
| 532 return Shell::Get()->shell_delegate()->IsMultiProfilesEnabled() && | 533 return Shell::Get()->shell_delegate()->IsMultiProfilesEnabled() && |
| 533 Shell::Get()->session_controller()->NumberOfLoggedInUsers() > 1; | 534 Shell::Get()->session_controller()->NumberOfLoggedInUsers() > 1; |
| (...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1303 data->uma_histogram_name, data->notification_message_id, | 1304 data->uma_histogram_name, data->notification_message_id, |
| 1304 data->old_shortcut_id, data->new_shortcut_id); | 1305 data->old_shortcut_id, data->new_shortcut_id); |
| 1305 | 1306 |
| 1306 if (!data->deprecated_enabled) | 1307 if (!data->deprecated_enabled) |
| 1307 return AcceleratorProcessingStatus::STOP; | 1308 return AcceleratorProcessingStatus::STOP; |
| 1308 | 1309 |
| 1309 return AcceleratorProcessingStatus::PROCEED; | 1310 return AcceleratorProcessingStatus::PROCEED; |
| 1310 } | 1311 } |
| 1311 | 1312 |
| 1312 } // namespace ash | 1313 } // namespace ash |
| OLD | NEW |