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_stub.h" | 12 #include "ash/caps_lock_delegate_stub.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_resources.h" | 14 #include "ash/desktop_background/desktop_background_resources.h" |
15 #include "ash/desktop_background/desktop_background_view.h" | 15 #include "ash/desktop_background/desktop_background_view.h" |
16 #include "ash/display/display_controller.h" | 16 #include "ash/display/display_controller.h" |
17 #include "ash/display/mouse_cursor_event_filter.h" | 17 #include "ash/display/mouse_cursor_event_filter.h" |
18 #include "ash/display/multi_display_manager.h" | 18 #include "ash/display/multi_display_manager.h" |
19 #include "ash/display/screen_position_controller.h" | 19 #include "ash/display/screen_position_controller.h" |
20 #include "ash/display/secondary_display_view.h" | 20 #include "ash/display/secondary_display_view.h" |
21 #include "ash/drag_drop/drag_drop_controller.h" | 21 #include "ash/drag_drop/drag_drop_controller.h" |
22 #include "ash/focus_cycler.h" | 22 #include "ash/focus_cycler.h" |
23 #include "ash/high_contrast/high_contrast_controller.h" | 23 #include "ash/high_contrast/high_contrast_controller.h" |
24 #include "ash/launcher/launcher.h" | 24 #include "ash/launcher/launcher.h" |
25 #include "ash/magnifier/magnification_controller.h" | 25 #include "ash/magnifier/magnification_controller.h" |
| 26 #include "ash/magnifier/partial_magnification_controller.h" |
26 #include "ash/root_window_controller.h" | 27 #include "ash/root_window_controller.h" |
27 #include "ash/screen_ash.h" | 28 #include "ash/screen_ash.h" |
28 #include "ash/shell_context_menu.h" | 29 #include "ash/shell_context_menu.h" |
29 #include "ash/shell_delegate.h" | 30 #include "ash/shell_delegate.h" |
30 #include "ash/shell_factory.h" | 31 #include "ash/shell_factory.h" |
31 #include "ash/shell_window_ids.h" | 32 #include "ash/shell_window_ids.h" |
32 #include "ash/system/status_area_widget.h" | 33 #include "ash/system/status_area_widget.h" |
33 #include "ash/system/tray/system_tray.h" | 34 #include "ash/system/tray/system_tray.h" |
34 #include "ash/tooltips/tooltip_controller.h" | 35 #include "ash/tooltips/tooltip_controller.h" |
35 #include "ash/touch/touch_observer_hud.h" | 36 #include "ash/touch/touch_observer_hud.h" |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 // Closing the windows frees the workspace controller. | 246 // Closing the windows frees the workspace controller. |
246 shelf_->set_workspace_controller(NULL); | 247 shelf_->set_workspace_controller(NULL); |
247 // Destroy all child windows including widgets. | 248 // Destroy all child windows including widgets. |
248 display_controller_->CloseChildWindows(); | 249 display_controller_->CloseChildWindows(); |
249 | 250 |
250 // These need a valid Shell instance to clean up properly, so explicitly | 251 // These need a valid Shell instance to clean up properly, so explicitly |
251 // delete them before invalidating the instance. | 252 // delete them before invalidating the instance. |
252 // Alphabetical. | 253 // Alphabetical. |
253 drag_drop_controller_.reset(); | 254 drag_drop_controller_.reset(); |
254 magnification_controller_.reset(); | 255 magnification_controller_.reset(); |
| 256 partial_magnification_controller_.reset(); |
255 power_button_controller_.reset(); | 257 power_button_controller_.reset(); |
256 resize_shadow_controller_.reset(); | 258 resize_shadow_controller_.reset(); |
257 shadow_controller_.reset(); | 259 shadow_controller_.reset(); |
258 tooltip_controller_.reset(); | 260 tooltip_controller_.reset(); |
259 event_client_.reset(); | 261 event_client_.reset(); |
260 window_cycle_controller_.reset(); | 262 window_cycle_controller_.reset(); |
261 capture_controller_.reset(); | 263 capture_controller_.reset(); |
262 nested_dispatcher_controller_.reset(); | 264 nested_dispatcher_controller_.reset(); |
263 user_action_client_.reset(); | 265 user_action_client_.reset(); |
264 visibility_controller_.reset(); | 266 visibility_controller_.reset(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
439 visibility_controller_.reset(new internal::VisibilityController); | 441 visibility_controller_.reset(new internal::VisibilityController); |
440 drag_drop_controller_.reset(new internal::DragDropController); | 442 drag_drop_controller_.reset(new internal::DragDropController); |
441 if (delegate_.get()) | 443 if (delegate_.get()) |
442 user_action_client_.reset(delegate_->CreateUserActionClient()); | 444 user_action_client_.reset(delegate_->CreateUserActionClient()); |
443 window_modality_controller_.reset(new internal::WindowModalityController); | 445 window_modality_controller_.reset(new internal::WindowModalityController); |
444 AddEnvEventFilter(window_modality_controller_.get()); | 446 AddEnvEventFilter(window_modality_controller_.get()); |
445 | 447 |
446 magnification_controller_.reset( | 448 magnification_controller_.reset( |
447 internal::MagnificationController::CreateInstance()); | 449 internal::MagnificationController::CreateInstance()); |
448 | 450 |
| 451 partial_magnification_controller_.reset( |
| 452 internal::PartialMagnificationController::CreateInstance()); |
| 453 |
449 high_contrast_controller_.reset(new HighContrastController); | 454 high_contrast_controller_.reset(new HighContrastController); |
450 video_detector_.reset(new VideoDetector); | 455 video_detector_.reset(new VideoDetector); |
451 window_cycle_controller_.reset( | 456 window_cycle_controller_.reset( |
452 new WindowCycleController(activation_controller_.get())); | 457 new WindowCycleController(activation_controller_.get())); |
453 | 458 |
454 tooltip_controller_.reset(new internal::TooltipController( | 459 tooltip_controller_.reset(new internal::TooltipController( |
455 drag_drop_controller_.get())); | 460 drag_drop_controller_.get())); |
456 AddEnvEventFilter(tooltip_controller_.get()); | 461 AddEnvEventFilter(tooltip_controller_.get()); |
457 | 462 |
458 event_client_.reset(new internal::EventClientImpl); | 463 event_client_.reset(new internal::EventClientImpl); |
(...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
825 iter != controllers.end(); ++iter) { | 830 iter != controllers.end(); ++iter) { |
826 if ((*iter)->GetSystemModalLayoutManager()-> | 831 if ((*iter)->GetSystemModalLayoutManager()-> |
827 CanWindowReceiveEvents(window)) { | 832 CanWindowReceiveEvents(window)) { |
828 return true; | 833 return true; |
829 } | 834 } |
830 } | 835 } |
831 return false; | 836 return false; |
832 } | 837 } |
833 | 838 |
834 } // namespace ash | 839 } // namespace ash |
OLD | NEW |