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 | 9 |
10 #include "ash/accelerators/focus_manager_factory.h" | 10 #include "ash/accelerators/focus_manager_factory.h" |
11 #include "ash/ash_switches.h" | 11 #include "ash/ash_switches.h" |
12 #include "ash/caps_lock_delegate.h" | 12 #include "ash/caps_lock_delegate.h" |
13 #include "ash/desktop_background/desktop_background_controller.h" | 13 #include "ash/desktop_background/desktop_background_controller.h" |
14 #include "ash/desktop_background/desktop_background_view.h" | 14 #include "ash/desktop_background/desktop_background_view.h" |
15 #include "ash/desktop_background/user_wallpaper_delegate.h" | 15 #include "ash/desktop_background/user_wallpaper_delegate.h" |
16 #include "ash/display/display_controller.h" | 16 #include "ash/display/display_controller.h" |
17 #include "ash/display/display_manager.h" | 17 #include "ash/display/display_manager.h" |
| 18 #include "ash/display/event_transformation_handler.h" |
18 #include "ash/display/mouse_cursor_event_filter.h" | 19 #include "ash/display/mouse_cursor_event_filter.h" |
19 #include "ash/display/screen_position_controller.h" | 20 #include "ash/display/screen_position_controller.h" |
20 #include "ash/drag_drop/drag_drop_controller.h" | 21 #include "ash/drag_drop/drag_drop_controller.h" |
21 #include "ash/focus_cycler.h" | 22 #include "ash/focus_cycler.h" |
22 #include "ash/high_contrast/high_contrast_controller.h" | 23 #include "ash/high_contrast/high_contrast_controller.h" |
23 #include "ash/host/root_window_host_factory.h" | 24 #include "ash/host/root_window_host_factory.h" |
24 #include "ash/launcher/launcher_delegate.h" | 25 #include "ash/launcher/launcher_delegate.h" |
25 #include "ash/launcher/launcher_model.h" | 26 #include "ash/launcher/launcher_model.h" |
26 #include "ash/magnifier/magnification_controller.h" | 27 #include "ash/magnifier/magnification_controller.h" |
27 #include "ash/magnifier/partial_magnification_controller.h" | 28 #include "ash/magnifier/partial_magnification_controller.h" |
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 | 463 |
463 input_method_filter_.reset(new views::corewm::InputMethodEventFilter( | 464 input_method_filter_.reset(new views::corewm::InputMethodEventFilter( |
464 root_window->GetAcceleratedWidget())); | 465 root_window->GetAcceleratedWidget())); |
465 AddPreTargetHandler(input_method_filter_.get()); | 466 AddPreTargetHandler(input_method_filter_.get()); |
466 | 467 |
467 #if !defined(OS_MACOSX) | 468 #if !defined(OS_MACOSX) |
468 accelerator_filter_.reset(new internal::AcceleratorFilter); | 469 accelerator_filter_.reset(new internal::AcceleratorFilter); |
469 AddPreTargetHandler(accelerator_filter_.get()); | 470 AddPreTargetHandler(accelerator_filter_.get()); |
470 #endif | 471 #endif |
471 | 472 |
| 473 event_transformation_handler_.reset(new internal::EventTransformationHandler); |
| 474 AddPreTargetHandler(event_transformation_handler_.get()); |
| 475 |
472 system_gesture_filter_.reset(new internal::SystemGestureEventFilter); | 476 system_gesture_filter_.reset(new internal::SystemGestureEventFilter); |
473 AddPreTargetHandler(system_gesture_filter_.get()); | 477 AddPreTargetHandler(system_gesture_filter_.get()); |
474 | 478 |
475 capture_controller_.reset(new internal::CaptureController); | 479 capture_controller_.reset(new internal::CaptureController); |
476 | 480 |
477 internal::RootWindowController* root_window_controller = | 481 internal::RootWindowController* root_window_controller = |
478 new internal::RootWindowController(root_window); | 482 new internal::RootWindowController(root_window); |
479 root_window_controller->CreateContainers(); | 483 root_window_controller->CreateContainers(); |
480 root_window_controller->CreateSystemBackground( | 484 root_window_controller->CreateSystemBackground( |
481 delegate_->IsFirstRunAfterBoot()); | 485 delegate_->IsFirstRunAfterBoot()); |
(...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
922 //////////////////////////////////////////////////////////////////////////////// | 926 //////////////////////////////////////////////////////////////////////////////// |
923 // Shell, aura::client::ActivationChangeObserver implementation: | 927 // Shell, aura::client::ActivationChangeObserver implementation: |
924 | 928 |
925 void Shell::OnWindowActivated(aura::Window* gained_active, | 929 void Shell::OnWindowActivated(aura::Window* gained_active, |
926 aura::Window* lost_active) { | 930 aura::Window* lost_active) { |
927 if (gained_active) | 931 if (gained_active) |
928 active_root_window_ = gained_active->GetRootWindow(); | 932 active_root_window_ = gained_active->GetRootWindow(); |
929 } | 933 } |
930 | 934 |
931 } // namespace ash | 935 } // namespace ash |
OLD | NEW |