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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 #include "ash/wm/resize_shadow_controller.h" | 67 #include "ash/wm/resize_shadow_controller.h" |
68 #include "ash/wm/root_window_layout_manager.h" | 68 #include "ash/wm/root_window_layout_manager.h" |
69 #include "ash/wm/screen_dimmer.h" | 69 #include "ash/wm/screen_dimmer.h" |
70 #include "ash/wm/system_gesture_event_filter.h" | 70 #include "ash/wm/system_gesture_event_filter.h" |
71 #include "ash/wm/system_modal_container_event_filter.h" | 71 #include "ash/wm/system_modal_container_event_filter.h" |
72 #include "ash/wm/system_modal_container_layout_manager.h" | 72 #include "ash/wm/system_modal_container_layout_manager.h" |
73 #include "ash/wm/toplevel_window_event_handler.h" | 73 #include "ash/wm/toplevel_window_event_handler.h" |
74 #include "ash/wm/user_activity_detector.h" | 74 #include "ash/wm/user_activity_detector.h" |
75 #include "ash/wm/video_detector.h" | 75 #include "ash/wm/video_detector.h" |
76 #include "ash/wm/window_animations.h" | 76 #include "ash/wm/window_animations.h" |
77 #include "ash/wm/window_cycle_controller.h" | |
78 #include "ash/wm/window_positioner.h" | 77 #include "ash/wm/window_positioner.h" |
79 #include "ash/wm/window_properties.h" | 78 #include "ash/wm/window_properties.h" |
80 #include "ash/wm/window_util.h" | 79 #include "ash/wm/window_util.h" |
81 #include "ash/wm/workspace_controller.h" | 80 #include "ash/wm/workspace_controller.h" |
82 #include "base/bind.h" | 81 #include "base/bind.h" |
83 #include "base/command_line.h" | 82 #include "base/command_line.h" |
84 #include "base/debug/trace_event.h" | 83 #include "base/debug/trace_event.h" |
85 #include "ui/aura/client/aura_constants.h" | 84 #include "ui/aura/client/aura_constants.h" |
86 #include "ui/aura/client/user_action_client.h" | 85 #include "ui/aura/client/user_action_client.h" |
87 #include "ui/aura/env.h" | 86 #include "ui/aura/env.h" |
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
672 // deleted because it's observing video activity through | 671 // deleted because it's observing video activity through |
673 // VideoDetectorObserver interface. | 672 // VideoDetectorObserver interface. |
674 video_activity_notifier_.reset(); | 673 video_activity_notifier_.reset(); |
675 #endif // defined(OS_CHROMEOS) | 674 #endif // defined(OS_CHROMEOS) |
676 video_detector_.reset(); | 675 video_detector_.reset(); |
677 | 676 |
678 shadow_controller_.reset(); | 677 shadow_controller_.reset(); |
679 resize_shadow_controller_.reset(); | 678 resize_shadow_controller_.reset(); |
680 | 679 |
681 window_selector_controller_.reset(); | 680 window_selector_controller_.reset(); |
682 window_cycle_controller_.reset(); | |
683 mru_window_tracker_.reset(); | 681 mru_window_tracker_.reset(); |
684 | 682 |
685 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 683 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
686 // and has window observers. | 684 // and has window observers. |
687 shelf_window_watcher_.reset(); | 685 shelf_window_watcher_.reset(); |
688 | 686 |
689 // Destroy all child windows including widgets. | 687 // Destroy all child windows including widgets. |
690 display_controller_->CloseChildWindows(); | 688 display_controller_->CloseChildWindows(); |
691 display_controller_->CloseNonDesktopDisplay(); | 689 display_controller_->CloseNonDesktopDisplay(); |
692 | 690 |
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
908 MagnificationController::CreateInstance()); | 906 MagnificationController::CreateInstance()); |
909 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); | 907 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); |
910 | 908 |
911 partial_magnification_controller_.reset( | 909 partial_magnification_controller_.reset( |
912 new PartialMagnificationController()); | 910 new PartialMagnificationController()); |
913 | 911 |
914 autoclick_controller_.reset(AutoclickController::CreateInstance()); | 912 autoclick_controller_.reset(AutoclickController::CreateInstance()); |
915 | 913 |
916 high_contrast_controller_.reset(new HighContrastController); | 914 high_contrast_controller_.reset(new HighContrastController); |
917 video_detector_.reset(new VideoDetector); | 915 video_detector_.reset(new VideoDetector); |
918 window_cycle_controller_.reset(new WindowCycleController()); | |
919 window_selector_controller_.reset(new WindowSelectorController()); | 916 window_selector_controller_.reset(new WindowSelectorController()); |
920 | 917 |
921 tooltip_controller_.reset( | 918 tooltip_controller_.reset( |
922 new views::corewm::TooltipController( | 919 new views::corewm::TooltipController( |
923 scoped_ptr<views::corewm::Tooltip>( | 920 scoped_ptr<views::corewm::Tooltip>( |
924 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); | 921 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); |
925 AddPreTargetHandler(tooltip_controller_.get()); | 922 AddPreTargetHandler(tooltip_controller_.get()); |
926 | 923 |
927 event_client_.reset(new internal::EventClientImpl); | 924 event_client_.reset(new internal::EventClientImpl); |
928 | 925 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1014 delegate_->CreateKeyboardControllerProxy(); | 1011 delegate_->CreateKeyboardControllerProxy(); |
1015 keyboard_controller_.reset( | 1012 keyboard_controller_.reset( |
1016 new keyboard::KeyboardController(proxy)); | 1013 new keyboard::KeyboardController(proxy)); |
1017 } | 1014 } |
1018 } | 1015 } |
1019 | 1016 |
1020 void Shell::InitRootWindow(aura::Window* root_window) { | 1017 void Shell::InitRootWindow(aura::Window* root_window) { |
1021 DCHECK(activation_client_); | 1018 DCHECK(activation_client_); |
1022 DCHECK(visibility_controller_.get()); | 1019 DCHECK(visibility_controller_.get()); |
1023 DCHECK(drag_drop_controller_.get()); | 1020 DCHECK(drag_drop_controller_.get()); |
1024 DCHECK(window_cycle_controller_.get()); | |
1025 | 1021 |
1026 aura::client::SetFocusClient(root_window, focus_client_.get()); | 1022 aura::client::SetFocusClient(root_window, focus_client_.get()); |
1027 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); | 1023 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); |
1028 aura::client::SetActivationClient(root_window, activation_client_); | 1024 aura::client::SetActivationClient(root_window, activation_client_); |
1029 views::corewm::FocusController* focus_controller = | 1025 views::corewm::FocusController* focus_controller = |
1030 static_cast<views::corewm::FocusController*>(activation_client_); | 1026 static_cast<views::corewm::FocusController*>(activation_client_); |
1031 root_window->AddPreTargetHandler(focus_controller); | 1027 root_window->AddPreTargetHandler(focus_controller); |
1032 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); | 1028 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); |
1033 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); | 1029 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); |
1034 aura::client::SetScreenPositionClient(root_window, | 1030 aura::client::SetScreenPositionClient(root_window, |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1088 //////////////////////////////////////////////////////////////////////////////// | 1084 //////////////////////////////////////////////////////////////////////////////// |
1089 // Shell, aura::client::ActivationChangeObserver implementation: | 1085 // Shell, aura::client::ActivationChangeObserver implementation: |
1090 | 1086 |
1091 void Shell::OnWindowActivated(aura::Window* gained_active, | 1087 void Shell::OnWindowActivated(aura::Window* gained_active, |
1092 aura::Window* lost_active) { | 1088 aura::Window* lost_active) { |
1093 if (gained_active) | 1089 if (gained_active) |
1094 target_root_window_ = gained_active->GetRootWindow(); | 1090 target_root_window_ = gained_active->GetRootWindow(); |
1095 } | 1091 } |
1096 | 1092 |
1097 } // namespace ash | 1093 } // namespace ash |
OLD | NEW |