| 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/accelerator_controller.h" | 10 #include "ash/accelerators/accelerator_controller.h" |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 #include "ash/system/tray/system_tray_notifier.h" | 47 #include "ash/system/tray/system_tray_notifier.h" |
| 48 #include "ash/wm/app_list_controller.h" | 48 #include "ash/wm/app_list_controller.h" |
| 49 #include "ash/wm/ash_focus_rules.h" | 49 #include "ash/wm/ash_focus_rules.h" |
| 50 #include "ash/wm/ash_native_cursor_manager.h" | 50 #include "ash/wm/ash_native_cursor_manager.h" |
| 51 #include "ash/wm/base_layout_manager.h" | 51 #include "ash/wm/base_layout_manager.h" |
| 52 #include "ash/wm/coordinate_conversion.h" | 52 #include "ash/wm/coordinate_conversion.h" |
| 53 #include "ash/wm/custom_frame_view_ash.h" | 53 #include "ash/wm/custom_frame_view_ash.h" |
| 54 #include "ash/wm/event_client_impl.h" | 54 #include "ash/wm/event_client_impl.h" |
| 55 #include "ash/wm/event_rewriter_event_filter.h" | 55 #include "ash/wm/event_rewriter_event_filter.h" |
| 56 #include "ash/wm/lock_state_controller.h" | 56 #include "ash/wm/lock_state_controller.h" |
| 57 #include "ash/wm/lock_state_controller_impl2.h" | |
| 58 #include "ash/wm/mru_window_tracker.h" | 57 #include "ash/wm/mru_window_tracker.h" |
| 59 #include "ash/wm/overlay_event_filter.h" | 58 #include "ash/wm/overlay_event_filter.h" |
| 60 #include "ash/wm/overview/window_selector_controller.h" | 59 #include "ash/wm/overview/window_selector_controller.h" |
| 61 #include "ash/wm/power_button_controller.h" | 60 #include "ash/wm/power_button_controller.h" |
| 62 #include "ash/wm/resize_shadow_controller.h" | 61 #include "ash/wm/resize_shadow_controller.h" |
| 63 #include "ash/wm/root_window_layout_manager.h" | 62 #include "ash/wm/root_window_layout_manager.h" |
| 64 #include "ash/wm/screen_dimmer.h" | 63 #include "ash/wm/screen_dimmer.h" |
| 65 #include "ash/wm/session_state_controller_impl.h" | |
| 66 #include "ash/wm/system_gesture_event_filter.h" | 64 #include "ash/wm/system_gesture_event_filter.h" |
| 67 #include "ash/wm/system_modal_container_event_filter.h" | 65 #include "ash/wm/system_modal_container_event_filter.h" |
| 68 #include "ash/wm/system_modal_container_layout_manager.h" | 66 #include "ash/wm/system_modal_container_layout_manager.h" |
| 69 #include "ash/wm/user_activity_detector.h" | 67 #include "ash/wm/user_activity_detector.h" |
| 70 #include "ash/wm/video_detector.h" | 68 #include "ash/wm/video_detector.h" |
| 71 #include "ash/wm/window_animations.h" | 69 #include "ash/wm/window_animations.h" |
| 72 #include "ash/wm/window_cycle_controller.h" | 70 #include "ash/wm/window_cycle_controller.h" |
| 73 #include "ash/wm/window_properties.h" | 71 #include "ash/wm/window_properties.h" |
| 74 #include "ash/wm/window_util.h" | 72 #include "ash/wm/window_util.h" |
| 75 #include "ash/wm/workspace_controller.h" | 73 #include "ash/wm/workspace_controller.h" |
| (...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 AddPreTargetHandler(event_transformation_handler_.get()); | 518 AddPreTargetHandler(event_transformation_handler_.get()); |
| 521 | 519 |
| 522 system_gesture_filter_.reset(new internal::SystemGestureEventFilter); | 520 system_gesture_filter_.reset(new internal::SystemGestureEventFilter); |
| 523 AddPreTargetHandler(system_gesture_filter_.get()); | 521 AddPreTargetHandler(system_gesture_filter_.get()); |
| 524 | 522 |
| 525 // The keyboard system must be initialized before the RootWindowController is | 523 // The keyboard system must be initialized before the RootWindowController is |
| 526 // created. | 524 // created. |
| 527 if (keyboard::IsKeyboardEnabled()) | 525 if (keyboard::IsKeyboardEnabled()) |
| 528 keyboard::InitializeKeyboard(); | 526 keyboard::InitializeKeyboard(); |
| 529 | 527 |
| 530 if (command_line->HasSwitch(ash::switches::kAshDisableNewLockAnimations)) | 528 lock_state_controller_.reset(new LockStateController); |
| 531 lock_state_controller_.reset(new SessionStateControllerImpl); | |
| 532 else | |
| 533 lock_state_controller_.reset(new LockStateControllerImpl2); | |
| 534 power_button_controller_.reset(new PowerButtonController( | 529 power_button_controller_.reset(new PowerButtonController( |
| 535 lock_state_controller_.get())); | 530 lock_state_controller_.get())); |
| 536 AddShellObserver(lock_state_controller_.get()); | 531 AddShellObserver(lock_state_controller_.get()); |
| 537 | 532 |
| 538 drag_drop_controller_.reset(new internal::DragDropController); | 533 drag_drop_controller_.reset(new internal::DragDropController); |
| 539 mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter()); | 534 mouse_cursor_filter_.reset(new internal::MouseCursorEventFilter()); |
| 540 PrependPreTargetHandler(mouse_cursor_filter_.get()); | 535 PrependPreTargetHandler(mouse_cursor_filter_.get()); |
| 541 | 536 |
| 542 // Create Controllers that may need root window. | 537 // Create Controllers that may need root window. |
| 543 // TODO(oshima): Move as many controllers before creating | 538 // TODO(oshima): Move as many controllers before creating |
| (...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 963 //////////////////////////////////////////////////////////////////////////////// | 958 //////////////////////////////////////////////////////////////////////////////// |
| 964 // Shell, aura::client::ActivationChangeObserver implementation: | 959 // Shell, aura::client::ActivationChangeObserver implementation: |
| 965 | 960 |
| 966 void Shell::OnWindowActivated(aura::Window* gained_active, | 961 void Shell::OnWindowActivated(aura::Window* gained_active, |
| 967 aura::Window* lost_active) { | 962 aura::Window* lost_active) { |
| 968 if (gained_active) | 963 if (gained_active) |
| 969 target_root_window_ = gained_active->GetRootWindow(); | 964 target_root_window_ = gained_active->GetRootWindow(); |
| 970 } | 965 } |
| 971 | 966 |
| 972 } // namespace ash | 967 } // namespace ash |
| OLD | NEW |