| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/accelerators/debug_commands.h" | 5 #include "ash/common/accelerators/debug_commands.h" |
| 6 | 6 |
| 7 #include "ash/common/accelerators/accelerator_commands.h" | 7 #include "ash/common/accelerators/accelerator_commands.h" |
| 8 #include "ash/common/ash_switches.h" | 8 #include "ash/common/ash_switches.h" |
| 9 #include "ash/common/shell_delegate.h" | 9 #include "ash/common/shell_delegate.h" |
| 10 #include "ash/common/system/toast/toast_data.h" | 10 #include "ash/common/system/toast/toast_data.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 void HandleToggleTouchscreen() { | 135 void HandleToggleTouchscreen() { |
| 136 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen")); | 136 base::RecordAction(base::UserMetricsAction("Accel_Toggle_Touchscreen")); |
| 137 ShellDelegate* delegate = Shell::Get()->shell_delegate(); | 137 ShellDelegate* delegate = Shell::Get()->shell_delegate(); |
| 138 delegate->SetTouchscreenEnabledInPrefs( | 138 delegate->SetTouchscreenEnabledInPrefs( |
| 139 !delegate->IsTouchscreenEnabledInPrefs(false /* use_local_state */), | 139 !delegate->IsTouchscreenEnabledInPrefs(false /* use_local_state */), |
| 140 false /* use_local_state */); | 140 false /* use_local_state */); |
| 141 delegate->UpdateTouchscreenStatusFromPrefs(); | 141 delegate->UpdateTouchscreenStatusFromPrefs(); |
| 142 } | 142 } |
| 143 | 143 |
| 144 void HandleToggleTouchView() { | 144 void HandleToggleTouchView() { |
| 145 MaximizeModeController* controller = | 145 MaximizeModeController* controller = Shell::Get()->maximize_mode_controller(); |
| 146 WmShell::Get()->maximize_mode_controller(); | |
| 147 controller->EnableMaximizeModeWindowManager( | 146 controller->EnableMaximizeModeWindowManager( |
| 148 !controller->IsMaximizeModeWindowManagerEnabled()); | 147 !controller->IsMaximizeModeWindowManagerEnabled()); |
| 149 } | 148 } |
| 150 | 149 |
| 151 void HandleTriggerCrash() { | 150 void HandleTriggerCrash() { |
| 152 CHECK(false) << "Intentional crash via debug accelerator."; | 151 CHECK(false) << "Intentional crash via debug accelerator."; |
| 153 } | 152 } |
| 154 | 153 |
| 155 } // namespace | 154 } // namespace |
| 156 | 155 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 case DEBUG_TRIGGER_CRASH: | 206 case DEBUG_TRIGGER_CRASH: |
| 208 HandleTriggerCrash(); | 207 HandleTriggerCrash(); |
| 209 break; | 208 break; |
| 210 default: | 209 default: |
| 211 break; | 210 break; |
| 212 } | 211 } |
| 213 } | 212 } |
| 214 | 213 |
| 215 } // namespace debug | 214 } // namespace debug |
| 216 } // namespace ash | 215 } // namespace ash |
| OLD | NEW |