| 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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 450 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Minimized_Minus")); | 450 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Minimized_Minus")); |
| 451 accelerators::ToggleMinimized(); | 451 accelerators::ToggleMinimized(); |
| 452 } | 452 } |
| 453 | 453 |
| 454 bool CanHandlePositionCenter() { | 454 bool CanHandlePositionCenter() { |
| 455 return wm::GetActiveWindow() != nullptr; | 455 return wm::GetActiveWindow() != nullptr; |
| 456 } | 456 } |
| 457 | 457 |
| 458 void HandlePositionCenter() { | 458 void HandlePositionCenter() { |
| 459 base::RecordAction(UserMetricsAction("Accel_Window_Position_Center")); | 459 base::RecordAction(UserMetricsAction("Accel_Window_Position_Center")); |
| 460 wm::CenterWindow(WmWindow::Get(wm::GetActiveWindow())); | 460 wm::CenterWindow(wm::GetActiveWindow()); |
| 461 } | 461 } |
| 462 | 462 |
| 463 void HandleShowImeMenuBubble() { | 463 void HandleShowImeMenuBubble() { |
| 464 base::RecordAction(UserMetricsAction("Accel_Show_Ime_Menu_Bubble")); | 464 base::RecordAction(UserMetricsAction("Accel_Show_Ime_Menu_Bubble")); |
| 465 | 465 |
| 466 StatusAreaWidget* status_area_widget = | 466 StatusAreaWidget* status_area_widget = |
| 467 WmShelf::ForWindow(Shell::GetPrimaryRootWindow())->GetStatusAreaWidget(); | 467 WmShelf::ForWindow(Shell::GetPrimaryRootWindow())->GetStatusAreaWidget(); |
| 468 if (status_area_widget) { | 468 if (status_area_widget) { |
| 469 ImeMenuTray* ime_menu_tray = status_area_widget->ime_menu_tray(); | 469 ImeMenuTray* ime_menu_tray = status_area_widget->ime_menu_tray(); |
| 470 if (ime_menu_tray && ime_menu_tray->visible() && | 470 if (ime_menu_tray && ime_menu_tray->visible() && |
| (...skipping 840 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1311 data->uma_histogram_name, data->notification_message_id, | 1311 data->uma_histogram_name, data->notification_message_id, |
| 1312 data->old_shortcut_id, data->new_shortcut_id); | 1312 data->old_shortcut_id, data->new_shortcut_id); |
| 1313 | 1313 |
| 1314 if (!data->deprecated_enabled) | 1314 if (!data->deprecated_enabled) |
| 1315 return AcceleratorProcessingStatus::STOP; | 1315 return AcceleratorProcessingStatus::STOP; |
| 1316 | 1316 |
| 1317 return AcceleratorProcessingStatus::PROCEED; | 1317 return AcceleratorProcessingStatus::PROCEED; |
| 1318 } | 1318 } |
| 1319 | 1319 |
| 1320 } // namespace ash | 1320 } // namespace ash |
| OLD | NEW |