| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 #include "ash/shelf/shelf_window_watcher.h" | 50 #include "ash/shelf/shelf_window_watcher.h" |
| 51 #include "ash/shell_delegate.h" | 51 #include "ash/shell_delegate.h" |
| 52 #include "ash/shell_factory.h" | 52 #include "ash/shell_factory.h" |
| 53 #include "ash/shell_init_params.h" | 53 #include "ash/shell_init_params.h" |
| 54 #include "ash/shell_window_ids.h" | 54 #include "ash/shell_window_ids.h" |
| 55 #include "ash/system/locale/locale_notification_controller.h" | 55 #include "ash/system/locale/locale_notification_controller.h" |
| 56 #include "ash/system/status_area_widget.h" | 56 #include "ash/system/status_area_widget.h" |
| 57 #include "ash/system/toast/toast_manager.h" | 57 #include "ash/system/toast/toast_manager.h" |
| 58 #include "ash/system/tray/system_tray_delegate.h" | 58 #include "ash/system/tray/system_tray_delegate.h" |
| 59 #include "ash/system/tray/system_tray_notifier.h" | 59 #include "ash/system/tray/system_tray_notifier.h" |
| 60 #include "ash/utility/partial_screenshot_controller.h" | 60 #include "ash/utility/screenshot_controller.h" |
| 61 #include "ash/wm/ash_focus_rules.h" | 61 #include "ash/wm/ash_focus_rules.h" |
| 62 #include "ash/wm/ash_native_cursor_manager.h" | 62 #include "ash/wm/ash_native_cursor_manager.h" |
| 63 #include "ash/wm/aura/wm_globals_aura.h" | 63 #include "ash/wm/aura/wm_globals_aura.h" |
| 64 #include "ash/wm/aura/wm_window_aura.h" | 64 #include "ash/wm/aura/wm_window_aura.h" |
| 65 #include "ash/wm/common/root_window_finder.h" | 65 #include "ash/wm/common/root_window_finder.h" |
| 66 #include "ash/wm/common/window_positioner.h" | 66 #include "ash/wm/common/window_positioner.h" |
| 67 #include "ash/wm/event_client_impl.h" | 67 #include "ash/wm/event_client_impl.h" |
| 68 #include "ash/wm/lock_state_controller.h" | 68 #include "ash/wm/lock_state_controller.h" |
| 69 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 69 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
| 70 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 70 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 803 shelf_item_delegate_manager_.reset(); | 803 shelf_item_delegate_manager_.reset(); |
| 804 shelf_model_.reset(); | 804 shelf_model_.reset(); |
| 805 | 805 |
| 806 power_button_controller_.reset(); | 806 power_button_controller_.reset(); |
| 807 lock_state_controller_.reset(); | 807 lock_state_controller_.reset(); |
| 808 | 808 |
| 809 #if defined(OS_CHROMEOS) | 809 #if defined(OS_CHROMEOS) |
| 810 resolution_notification_controller_.reset(); | 810 resolution_notification_controller_.reset(); |
| 811 #endif | 811 #endif |
| 812 desktop_background_controller_.reset(); | 812 desktop_background_controller_.reset(); |
| 813 partial_screenshot_controller_.reset(); | 813 screenshot_controller_.reset(); |
| 814 mouse_cursor_filter_.reset(); | 814 mouse_cursor_filter_.reset(); |
| 815 | 815 |
| 816 #if defined(OS_CHROMEOS) | 816 #if defined(OS_CHROMEOS) |
| 817 touch_transformer_controller_.reset(); | 817 touch_transformer_controller_.reset(); |
| 818 #endif // defined(OS_CHROMEOS) | 818 #endif // defined(OS_CHROMEOS) |
| 819 | 819 |
| 820 #if defined(OS_CHROMEOS) | 820 #if defined(OS_CHROMEOS) |
| 821 audio_a11y_controller_.reset(); | 821 audio_a11y_controller_.reset(); |
| 822 #endif // defined(OS_CHROMEOS) | 822 #endif // defined(OS_CHROMEOS) |
| 823 | 823 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1029 power_button_controller_.reset(new PowerButtonController( | 1029 power_button_controller_.reset(new PowerButtonController( |
| 1030 lock_state_controller_.get())); | 1030 lock_state_controller_.get())); |
| 1031 #if defined(OS_CHROMEOS) | 1031 #if defined(OS_CHROMEOS) |
| 1032 // Pass the initial display state to PowerButtonController. | 1032 // Pass the initial display state to PowerButtonController. |
| 1033 power_button_controller_->OnDisplayModeChanged( | 1033 power_button_controller_->OnDisplayModeChanged( |
| 1034 display_configurator_->cached_displays()); | 1034 display_configurator_->cached_displays()); |
| 1035 #endif | 1035 #endif |
| 1036 AddShellObserver(lock_state_controller_.get()); | 1036 AddShellObserver(lock_state_controller_.get()); |
| 1037 | 1037 |
| 1038 drag_drop_controller_.reset(new DragDropController); | 1038 drag_drop_controller_.reset(new DragDropController); |
| 1039 // |partial_screenshot_controller_| needs to be created (and prepended as a | 1039 // |screenshot_controller_| needs to be created (and prepended as a |
| 1040 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to | 1040 // pre-target handler) at this point, because |mouse_cursor_filter_| needs to |
| 1041 // process mouse events prior to partial screenshot session. | 1041 // process mouse events prior to screenshot session. |
| 1042 // See http://crbug.com/459214 | 1042 // See http://crbug.com/459214 |
| 1043 partial_screenshot_controller_.reset(new PartialScreenshotController()); | 1043 screenshot_controller_.reset(new ScreenshotController()); |
| 1044 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); | 1044 mouse_cursor_filter_.reset(new MouseCursorEventFilter()); |
| 1045 PrependPreTargetHandler(mouse_cursor_filter_.get()); | 1045 PrependPreTargetHandler(mouse_cursor_filter_.get()); |
| 1046 | 1046 |
| 1047 // Create Controllers that may need root window. | 1047 // Create Controllers that may need root window. |
| 1048 // TODO(oshima): Move as many controllers before creating | 1048 // TODO(oshima): Move as many controllers before creating |
| 1049 // RootWindowController as possible. | 1049 // RootWindowController as possible. |
| 1050 visibility_controller_.reset(new AshVisibilityController); | 1050 visibility_controller_.reset(new AshVisibilityController); |
| 1051 | 1051 |
| 1052 magnification_controller_.reset( | 1052 magnification_controller_.reset( |
| 1053 MagnificationController::CreateInstance()); | 1053 MagnificationController::CreateInstance()); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1251 | 1251 |
| 1252 void Shell::OnWindowActivated( | 1252 void Shell::OnWindowActivated( |
| 1253 aura::client::ActivationChangeObserver::ActivationReason reason, | 1253 aura::client::ActivationChangeObserver::ActivationReason reason, |
| 1254 aura::Window* gained_active, | 1254 aura::Window* gained_active, |
| 1255 aura::Window* lost_active) { | 1255 aura::Window* lost_active) { |
| 1256 if (gained_active) | 1256 if (gained_active) |
| 1257 target_root_window_ = gained_active->GetRootWindow(); | 1257 target_root_window_ = gained_active->GetRootWindow(); |
| 1258 } | 1258 } |
| 1259 | 1259 |
| 1260 } // namespace ash | 1260 } // namespace ash |
| OLD | NEW |