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 <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 26 matching lines...) Expand all Loading... | |
| 37 #include "ash/shell_window_ids.h" | 37 #include "ash/shell_window_ids.h" |
| 38 #include "ash/system/brightness_control_delegate.h" | 38 #include "ash/system/brightness_control_delegate.h" |
| 39 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" | 39 #include "ash/system/keyboard_brightness/keyboard_brightness_control_delegate.h" |
| 40 #include "ash/system/status_area_widget.h" | 40 #include "ash/system/status_area_widget.h" |
| 41 #include "ash/system/tray/system_tray.h" | 41 #include "ash/system/tray/system_tray.h" |
| 42 #include "ash/system/tray/system_tray_delegate.h" | 42 #include "ash/system/tray/system_tray_delegate.h" |
| 43 #include "ash/system/tray/system_tray_notifier.h" | 43 #include "ash/system/tray/system_tray_notifier.h" |
| 44 #include "ash/system/web_notification/web_notification_tray.h" | 44 #include "ash/system/web_notification/web_notification_tray.h" |
| 45 #include "ash/touch/touch_hud_debug.h" | 45 #include "ash/touch/touch_hud_debug.h" |
| 46 #include "ash/volume_control_delegate.h" | 46 #include "ash/volume_control_delegate.h" |
| 47 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | |
| 47 #include "ash/wm/mru_window_tracker.h" | 48 #include "ash/wm/mru_window_tracker.h" |
| 48 #include "ash/wm/overview/window_selector_controller.h" | 49 #include "ash/wm/overview/window_selector_controller.h" |
| 49 #include "ash/wm/partial_screenshot_view.h" | 50 #include "ash/wm/partial_screenshot_view.h" |
| 50 #include "ash/wm/power_button_controller.h" | 51 #include "ash/wm/power_button_controller.h" |
| 51 #include "ash/wm/window_cycle_controller.h" | 52 #include "ash/wm/window_cycle_controller.h" |
| 52 #include "ash/wm/window_state.h" | 53 #include "ash/wm/window_state.h" |
| 53 #include "ash/wm/window_util.h" | 54 #include "ash/wm/window_util.h" |
| 54 #include "ash/wm/wm_event.h" | 55 #include "ash/wm/wm_event.h" |
| 55 #include "base/bind.h" | 56 #include "base/bind.h" |
| 56 #include "base/command_line.h" | 57 #include "base/command_line.h" |
| 57 #include "base/metrics/user_metrics.h" | 58 #include "base/metrics/user_metrics.h" |
| 58 #include "ui/aura/env.h" | 59 #include "ui/aura/env.h" |
| 59 #include "ui/aura/window_event_dispatcher.h" | 60 #include "ui/aura/window_event_dispatcher.h" |
| 60 #include "ui/base/accelerators/accelerator.h" | 61 #include "ui/base/accelerators/accelerator.h" |
| 61 #include "ui/base/accelerators/accelerator_manager.h" | 62 #include "ui/base/accelerators/accelerator_manager.h" |
| 62 #include "ui/compositor/debug_utils.h" | 63 #include "ui/compositor/debug_utils.h" |
| 63 #include "ui/compositor/layer.h" | 64 #include "ui/compositor/layer.h" |
| 64 #include "ui/compositor/layer_animation_sequence.h" | 65 #include "ui/compositor/layer_animation_sequence.h" |
| 65 #include "ui/compositor/layer_animator.h" | 66 #include "ui/compositor/layer_animator.h" |
| 66 #include "ui/events/event.h" | 67 #include "ui/events/event.h" |
| 67 #include "ui/events/keycodes/keyboard_codes.h" | 68 #include "ui/events/keycodes/keyboard_codes.h" |
| 68 #include "ui/gfx/screen.h" | 69 #include "ui/gfx/screen.h" |
| 69 #include "ui/views/controls/webview/webview.h" | 70 #include "ui/views/controls/webview/webview.h" |
| 70 #include "ui/views/debug_utils.h" | 71 #include "ui/views/debug_utils.h" |
| 71 #include "ui/views/widget/widget.h" | 72 #include "ui/views/widget/widget.h" |
| 72 | 73 |
| 73 #if defined(OS_CHROMEOS) | 74 #if defined(OS_CHROMEOS) |
| 74 #include "ash/session/session_state_delegate.h" | |
| 75 #include "ash/system/chromeos/keyboard_brightness_controller.h" | 75 #include "ash/system/chromeos/keyboard_brightness_controller.h" |
| 76 #include "base/sys_info.h" | 76 #include "base/sys_info.h" |
| 77 #include "chromeos/ime/ime_keyboard.h" | 77 #include "chromeos/ime/ime_keyboard.h" |
| 78 #include "chromeos/ime/input_method_manager.h" | 78 #include "chromeos/ime/input_method_manager.h" |
| 79 #endif // defined(OS_CHROMEOS) | 79 #endif // defined(OS_CHROMEOS) |
| 80 | 80 |
| 81 namespace ash { | 81 namespace ash { |
| 82 namespace { | 82 namespace { |
| 83 | 83 |
| 84 using base::UserMetricsAction; | 84 using base::UserMetricsAction; |
| (...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 589 | 589 |
| 590 Shell::GetInstance()->accessibility_delegate()-> | 590 Shell::GetInstance()->accessibility_delegate()-> |
| 591 ToggleSpokenFeedback(A11Y_NOTIFICATION_SHOW); | 591 ToggleSpokenFeedback(A11Y_NOTIFICATION_SHOW); |
| 592 return true; | 592 return true; |
| 593 } | 593 } |
| 594 | 594 |
| 595 bool HandleToggleTouchViewTesting() { | 595 bool HandleToggleTouchViewTesting() { |
| 596 // TODO(skuhne): This is only temporary! Remove this! | 596 // TODO(skuhne): This is only temporary! Remove this! |
| 597 if (CommandLine::ForCurrentProcess()->HasSwitch( | 597 if (CommandLine::ForCurrentProcess()->HasSwitch( |
| 598 switches::kAshEnableTouchViewTesting)) { | 598 switches::kAshEnableTouchViewTesting)) { |
| 599 Shell* shell = Shell::GetInstance(); | 599 Shell* shell = Shell::GetInstance(); |
|
flackr
2014/05/29 16:10:06
nit: Don't bother saving Shell* since it's only us
jonross
2014/05/29 17:40:00
Done.
| |
| 600 shell->EnableMaximizeModeWindowManager( | 600 MaximizeModeController* controller = shell->maximize_mode_controller(); |
| 601 !shell->IsMaximizeModeWindowManagerEnabled()); | 601 controller->EnableMaximizeModeWindowManager( |
| 602 !controller->IsMaximizeModeWindowManagerEnabled()); | |
| 602 return true; | 603 return true; |
| 603 } | 604 } |
| 604 return false; | 605 return false; |
| 605 } | 606 } |
| 606 | 607 |
| 607 bool HandleTouchHudClear() { | 608 bool HandleTouchHudClear() { |
| 608 RootWindowController* controller = | 609 RootWindowController* controller = |
| 609 RootWindowController::ForTargetRootWindow(); | 610 RootWindowController::ForTargetRootWindow(); |
| 610 if (controller->touch_hud_debug()) { | 611 if (controller->touch_hud_debug()) { |
| 611 controller->touch_hud_debug()->Clear(); | 612 controller->touch_hud_debug()->Clear(); |
| (...skipping 572 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1184 keyboard_brightness_control_delegate) { | 1185 keyboard_brightness_control_delegate) { |
| 1185 keyboard_brightness_control_delegate_ = | 1186 keyboard_brightness_control_delegate_ = |
| 1186 keyboard_brightness_control_delegate.Pass(); | 1187 keyboard_brightness_control_delegate.Pass(); |
| 1187 } | 1188 } |
| 1188 | 1189 |
| 1189 bool AcceleratorController::CanHandleAccelerators() const { | 1190 bool AcceleratorController::CanHandleAccelerators() const { |
| 1190 return true; | 1191 return true; |
| 1191 } | 1192 } |
| 1192 | 1193 |
| 1193 } // namespace ash | 1194 } // namespace ash |
| OLD | NEW |