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/shell.h" | 5 #include "ash/shell.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <string> | 8 #include <string> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
11 #include "ash/accelerators/accelerator_controller.h" | 11 #include "ash/accelerators/accelerator_controller.h" |
| 12 #include "ash/accelerators/accelerator_controller_delegate_aura.h" |
12 #include "ash/accelerators/accelerator_delegate.h" | 13 #include "ash/accelerators/accelerator_delegate.h" |
13 #include "ash/accelerators/focus_manager_factory.h" | 14 #include "ash/accelerators/focus_manager_factory.h" |
14 #include "ash/aura/wm_shell_aura.h" | 15 #include "ash/aura/wm_shell_aura.h" |
15 #include "ash/aura/wm_window_aura.h" | 16 #include "ash/aura/wm_window_aura.h" |
16 #include "ash/autoclick/autoclick_controller.h" | 17 #include "ash/autoclick/autoclick_controller.h" |
17 #include "ash/common/ash_switches.h" | 18 #include "ash/common/ash_switches.h" |
18 #include "ash/common/gpu_support.h" | 19 #include "ash/common/gpu_support.h" |
19 #include "ash/common/keyboard/keyboard_ui.h" | 20 #include "ash/common/keyboard/keyboard_ui.h" |
20 #include "ash/common/login_status.h" | 21 #include "ash/common/login_status.h" |
21 #include "ash/common/pointer_watcher_delegate.h" | 22 #include "ash/common/pointer_watcher_delegate.h" |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
909 | 910 |
910 #if defined(OS_CHROMEOS) | 911 #if defined(OS_CHROMEOS) |
911 resolution_notification_controller_.reset( | 912 resolution_notification_controller_.reset( |
912 new ResolutionNotificationController); | 913 new ResolutionNotificationController); |
913 #endif | 914 #endif |
914 | 915 |
915 if (cursor_manager_) | 916 if (cursor_manager_) |
916 cursor_manager_->SetDisplay( | 917 cursor_manager_->SetDisplay( |
917 display::Screen::GetScreen()->GetPrimaryDisplay()); | 918 display::Screen::GetScreen()->GetPrimaryDisplay()); |
918 | 919 |
919 accelerator_controller_.reset(new AcceleratorController); | 920 accelerator_controller_delegate_.reset(new AcceleratorControllerDelegateAura); |
| 921 accelerator_controller_.reset( |
| 922 new AcceleratorController(accelerator_controller_delegate_.get())); |
920 wm_shell_->CreateMaximizeModeController(); | 923 wm_shell_->CreateMaximizeModeController(); |
921 | 924 |
922 AddPreTargetHandler(window_tree_host_manager_->input_method_event_handler()); | 925 AddPreTargetHandler(window_tree_host_manager_->input_method_event_handler()); |
923 | 926 |
924 #if defined(OS_CHROMEOS) | 927 #if defined(OS_CHROMEOS) |
925 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); | 928 magnifier_key_scroll_handler_ = MagnifierKeyScroller::CreateHandler(); |
926 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); | 929 AddPreTargetHandler(magnifier_key_scroll_handler_.get()); |
927 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); | 930 speech_feedback_handler_ = SpokenFeedbackToggler::CreateHandler(); |
928 AddPreTargetHandler(speech_feedback_handler_.get()); | 931 AddPreTargetHandler(speech_feedback_handler_.get()); |
929 #endif | 932 #endif |
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1162 | 1165 |
1163 void Shell::OnWindowActivated( | 1166 void Shell::OnWindowActivated( |
1164 aura::client::ActivationChangeObserver::ActivationReason reason, | 1167 aura::client::ActivationChangeObserver::ActivationReason reason, |
1165 aura::Window* gained_active, | 1168 aura::Window* gained_active, |
1166 aura::Window* lost_active) { | 1169 aura::Window* lost_active) { |
1167 if (gained_active) | 1170 if (gained_active) |
1168 target_root_window_ = gained_active->GetRootWindow(); | 1171 target_root_window_ = gained_active->GetRootWindow(); |
1169 } | 1172 } |
1170 | 1173 |
1171 } // namespace ash | 1174 } // namespace ash |
OLD | NEW |