| 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_delegate.h" | 12 #include "ash/accelerators/accelerator_delegate.h" |
| 13 #include "ash/accelerators/focus_manager_factory.h" | 13 #include "ash/accelerators/focus_manager_factory.h" |
| 14 #include "ash/aura/wm_shell_aura.h" | 14 #include "ash/aura/wm_shell_aura.h" |
| 15 #include "ash/aura/wm_window_aura.h" | 15 #include "ash/aura/wm_window_aura.h" |
| 16 #include "ash/autoclick/autoclick_controller.h" | 16 #include "ash/autoclick/autoclick_controller.h" |
| 17 #include "ash/common/accessibility_delegate.h" | 17 #include "ash/common/accessibility_delegate.h" |
| 18 #include "ash/common/ash_switches.h" | 18 #include "ash/common/ash_switches.h" |
| 19 #include "ash/common/keyboard/keyboard_ui.h" | 19 #include "ash/common/keyboard/keyboard_ui.h" |
| 20 #include "ash/common/login_status.h" | 20 #include "ash/common/login_status.h" |
| 21 #include "ash/common/session/session_state_delegate.h" | 21 #include "ash/common/session/session_state_delegate.h" |
| 22 #include "ash/common/shelf/shelf_item_delegate.h" | 22 #include "ash/common/shelf/shelf_item_delegate.h" |
| 23 #include "ash/common/shelf/shelf_item_delegate_manager.h" | 23 #include "ash/common/shelf/shelf_item_delegate_manager.h" |
| 24 #include "ash/common/shelf/shelf_model.h" | 24 #include "ash/common/shelf/shelf_model.h" |
| 25 #include "ash/common/shell_window_ids.h" | 25 #include "ash/common/shell_window_ids.h" |
| 26 #include "ash/common/system/locale/locale_notification_controller.h" | 26 #include "ash/common/system/locale/locale_notification_controller.h" |
| 27 #include "ash/common/system/tray/system_tray_delegate.h" | 27 #include "ash/common/system/tray/system_tray_delegate.h" |
| 28 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 28 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" | 29 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" |
| 29 #include "ash/common/wm/mru_window_tracker.h" | 30 #include "ash/common/wm/mru_window_tracker.h" |
| 30 #include "ash/common/wm/root_window_finder.h" | 31 #include "ash/common/wm/root_window_finder.h" |
| 31 #include "ash/common/wm/window_positioner.h" | 32 #include "ash/common/wm/window_positioner.h" |
| 32 #include "ash/common/wm_shell.h" | 33 #include "ash/common/wm_shell.h" |
| 33 #include "ash/desktop_background/desktop_background_controller.h" | 34 #include "ash/desktop_background/desktop_background_controller.h" |
| 34 #include "ash/desktop_background/desktop_background_view.h" | 35 #include "ash/desktop_background/desktop_background_view.h" |
| 35 #include "ash/desktop_background/user_wallpaper_delegate.h" | 36 #include "ash/desktop_background/user_wallpaper_delegate.h" |
| 36 #include "ash/display/cursor_window_controller.h" | 37 #include "ash/display/cursor_window_controller.h" |
| 37 #include "ash/display/display_configuration_controller.h" | 38 #include "ash/display/display_configuration_controller.h" |
| (...skipping 23 matching lines...) Expand all Loading... |
| 61 #include "ash/shell_delegate.h" | 62 #include "ash/shell_delegate.h" |
| 62 #include "ash/shell_factory.h" | 63 #include "ash/shell_factory.h" |
| 63 #include "ash/shell_init_params.h" | 64 #include "ash/shell_init_params.h" |
| 64 #include "ash/system/status_area_widget.h" | 65 #include "ash/system/status_area_widget.h" |
| 65 #include "ash/system/toast/toast_manager.h" | 66 #include "ash/system/toast/toast_manager.h" |
| 66 #include "ash/utility/screenshot_controller.h" | 67 #include "ash/utility/screenshot_controller.h" |
| 67 #include "ash/wm/ash_focus_rules.h" | 68 #include "ash/wm/ash_focus_rules.h" |
| 68 #include "ash/wm/ash_native_cursor_manager.h" | 69 #include "ash/wm/ash_native_cursor_manager.h" |
| 69 #include "ash/wm/event_client_impl.h" | 70 #include "ash/wm/event_client_impl.h" |
| 70 #include "ash/wm/lock_state_controller.h" | 71 #include "ash/wm/lock_state_controller.h" |
| 71 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | |
| 72 #include "ash/wm/overlay_event_filter.h" | 72 #include "ash/wm/overlay_event_filter.h" |
| 73 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" | 73 #include "ash/wm/overview/scoped_overview_animation_settings_factory_aura.h" |
| 74 #include "ash/wm/power_button_controller.h" | 74 #include "ash/wm/power_button_controller.h" |
| 75 #include "ash/wm/resize_shadow_controller.h" | 75 #include "ash/wm/resize_shadow_controller.h" |
| 76 #include "ash/wm/screen_pinning_controller.h" | 76 #include "ash/wm/screen_pinning_controller.h" |
| 77 #include "ash/wm/system_gesture_event_filter.h" | 77 #include "ash/wm/system_gesture_event_filter.h" |
| 78 #include "ash/wm/system_modal_container_event_filter.h" | 78 #include "ash/wm/system_modal_container_event_filter.h" |
| 79 #include "ash/wm/system_modal_container_layout_manager.h" | 79 #include "ash/wm/system_modal_container_layout_manager.h" |
| 80 #include "ash/wm/toplevel_window_event_handler.h" | 80 #include "ash/wm/toplevel_window_event_handler.h" |
| 81 #include "ash/wm/video_detector.h" | 81 #include "ash/wm/video_detector.h" |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 391 #endif | 391 #endif |
| 392 } | 392 } |
| 393 | 393 |
| 394 void Shell::OnCastingSessionStartedOrStopped(bool started) { | 394 void Shell::OnCastingSessionStartedOrStopped(bool started) { |
| 395 #if defined(OS_CHROMEOS) | 395 #if defined(OS_CHROMEOS) |
| 396 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), | 396 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), |
| 397 OnCastingSessionStartedOrStopped(started)); | 397 OnCastingSessionStartedOrStopped(started)); |
| 398 #endif | 398 #endif |
| 399 } | 399 } |
| 400 | 400 |
| 401 void Shell::OnMaximizeModeStarted() { | |
| 402 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), | |
| 403 OnMaximizeModeStarted()); | |
| 404 } | |
| 405 | |
| 406 void Shell::OnMaximizeModeEnded() { | |
| 407 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), | |
| 408 OnMaximizeModeEnded()); | |
| 409 } | |
| 410 | |
| 411 void Shell::OnRootWindowAdded(WmWindow* root_window) { | 401 void Shell::OnRootWindowAdded(WmWindow* root_window) { |
| 412 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), | 402 FOR_EACH_OBSERVER(ShellObserver, *wm_shell_->shell_observers(), |
| 413 OnRootWindowAdded(root_window)); | 403 OnRootWindowAdded(root_window)); |
| 414 } | 404 } |
| 415 | 405 |
| 416 void Shell::CreateShelf() { | 406 void Shell::CreateShelf() { |
| 417 RootWindowControllerList controllers = GetAllRootWindowControllers(); | 407 RootWindowControllerList controllers = GetAllRootWindowControllers(); |
| 418 for (RootWindowControllerList::iterator iter = controllers.begin(); | 408 for (RootWindowControllerList::iterator iter = controllers.begin(); |
| 419 iter != controllers.end(); ++iter) | 409 iter != controllers.end(); ++iter) |
| 420 (*iter)->CreateShelf(); | 410 (*iter)->CreateShelf(); |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1175 | 1165 |
| 1176 void Shell::OnWindowActivated( | 1166 void Shell::OnWindowActivated( |
| 1177 aura::client::ActivationChangeObserver::ActivationReason reason, | 1167 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1178 aura::Window* gained_active, | 1168 aura::Window* gained_active, |
| 1179 aura::Window* lost_active) { | 1169 aura::Window* lost_active) { |
| 1180 if (gained_active) | 1170 if (gained_active) |
| 1181 target_root_window_ = gained_active->GetRootWindow(); | 1171 target_root_window_ = gained_active->GetRootWindow(); |
| 1182 } | 1172 } |
| 1183 | 1173 |
| 1184 } // namespace ash | 1174 } // namespace ash |
| OLD | NEW |