| 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 |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 #include "ash/wm/aura/wm_globals_aura.h" | 64 #include "ash/wm/aura/wm_globals_aura.h" |
| 65 #include "ash/wm/aura/wm_window_aura.h" | 65 #include "ash/wm/aura/wm_window_aura.h" |
| 66 #include "ash/wm/common/root_window_finder.h" | 66 #include "ash/wm/common/root_window_finder.h" |
| 67 #include "ash/wm/common/window_positioner.h" | 67 #include "ash/wm/common/window_positioner.h" |
| 68 #include "ash/wm/event_client_impl.h" | 68 #include "ash/wm/event_client_impl.h" |
| 69 #include "ash/wm/lock_state_controller.h" | 69 #include "ash/wm/lock_state_controller.h" |
| 70 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 70 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 71 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 71 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| 72 #include "ash/wm/mru_window_tracker.h" | 72 #include "ash/wm/mru_window_tracker.h" |
| 73 #include "ash/wm/overlay_event_filter.h" | 73 #include "ash/wm/overlay_event_filter.h" |
| 74 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" |
| 74 #include "ash/wm/overview/window_selector_controller.h" | 75 #include "ash/wm/overview/window_selector_controller.h" |
| 75 #include "ash/wm/power_button_controller.h" | 76 #include "ash/wm/power_button_controller.h" |
| 76 #include "ash/wm/resize_shadow_controller.h" | 77 #include "ash/wm/resize_shadow_controller.h" |
| 77 #include "ash/wm/root_window_layout_manager.h" | 78 #include "ash/wm/root_window_layout_manager.h" |
| 78 #include "ash/wm/system_gesture_event_filter.h" | 79 #include "ash/wm/system_gesture_event_filter.h" |
| 79 #include "ash/wm/system_modal_container_event_filter.h" | 80 #include "ash/wm/system_modal_container_event_filter.h" |
| 80 #include "ash/wm/system_modal_container_layout_manager.h" | 81 #include "ash/wm/system_modal_container_layout_manager.h" |
| 81 #include "ash/wm/toplevel_window_event_handler.h" | 82 #include "ash/wm/toplevel_window_event_handler.h" |
| 82 #include "ash/wm/video_detector.h" | 83 #include "ash/wm/video_detector.h" |
| 83 #include "ash/wm/window_animations.h" | 84 #include "ash/wm/window_animations.h" |
| (...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 881 } | 882 } |
| 882 | 883 |
| 883 void Shell::Init(const ShellInitParams& init_params) { | 884 void Shell::Init(const ShellInitParams& init_params) { |
| 884 in_mus_ = init_params.in_mus; | 885 in_mus_ = init_params.in_mus; |
| 885 | 886 |
| 886 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) | 887 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| 887 DCHECK(in_mus_) << "linux desktop does not support ash."; | 888 DCHECK(in_mus_) << "linux desktop does not support ash."; |
| 888 #endif | 889 #endif |
| 889 | 890 |
| 890 wm_globals_.reset(new wm::WmGlobalsAura); | 891 wm_globals_.reset(new wm::WmGlobalsAura); |
| 892 scoped_overview_animation_settings_factory_.reset( |
| 893 new ScopedOverviewAnimationSettingsFactoryAura); |
| 891 window_positioner_.reset(new WindowPositioner(wm_globals_.get())); | 894 window_positioner_.reset(new WindowPositioner(wm_globals_.get())); |
| 892 | 895 |
| 893 if (!in_mus_) { | 896 if (!in_mus_) { |
| 894 native_cursor_manager_ = new AshNativeCursorManager; | 897 native_cursor_manager_ = new AshNativeCursorManager; |
| 895 #if defined(OS_CHROMEOS) | 898 #if defined(OS_CHROMEOS) |
| 896 cursor_manager_.reset( | 899 cursor_manager_.reset( |
| 897 new CursorManager(base::WrapUnique(native_cursor_manager_))); | 900 new CursorManager(base::WrapUnique(native_cursor_manager_))); |
| 898 #else | 901 #else |
| 899 cursor_manager_.reset( | 902 cursor_manager_.reset( |
| 900 new ::wm::CursorManager(base::WrapUnique(native_cursor_manager_))); | 903 new ::wm::CursorManager(base::WrapUnique(native_cursor_manager_))); |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1267 | 1270 |
| 1268 void Shell::OnWindowActivated( | 1271 void Shell::OnWindowActivated( |
| 1269 aura::client::ActivationChangeObserver::ActivationReason reason, | 1272 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1270 aura::Window* gained_active, | 1273 aura::Window* gained_active, |
| 1271 aura::Window* lost_active) { | 1274 aura::Window* lost_active) { |
| 1272 if (gained_active) | 1275 if (gained_active) |
| 1273 target_root_window_ = gained_active->GetRootWindow(); | 1276 target_root_window_ = gained_active->GetRootWindow(); |
| 1274 } | 1277 } |
| 1275 | 1278 |
| 1276 } // namespace ash | 1279 } // namespace ash |
| OLD | NEW |