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/bind_helpers.h" | 82 #include "base/bind_helpers.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/env.h" | 85 #include "ui/aura/env.h" |
87 #include "ui/aura/layout_manager.h" | 86 #include "ui/aura/layout_manager.h" |
(...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
692 // deleted because it's observing video activity through | 691 // deleted because it's observing video activity through |
693 // VideoDetectorObserver interface. | 692 // VideoDetectorObserver interface. |
694 video_activity_notifier_.reset(); | 693 video_activity_notifier_.reset(); |
695 #endif // defined(OS_CHROMEOS) | 694 #endif // defined(OS_CHROMEOS) |
696 video_detector_.reset(); | 695 video_detector_.reset(); |
697 | 696 |
698 shadow_controller_.reset(); | 697 shadow_controller_.reset(); |
699 resize_shadow_controller_.reset(); | 698 resize_shadow_controller_.reset(); |
700 | 699 |
701 window_selector_controller_.reset(); | 700 window_selector_controller_.reset(); |
702 window_cycle_controller_.reset(); | |
703 mru_window_tracker_.reset(); | 701 mru_window_tracker_.reset(); |
704 | 702 |
705 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 703 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
706 // and has window observers. | 704 // and has window observers. |
707 shelf_window_watcher_.reset(); | 705 shelf_window_watcher_.reset(); |
708 | 706 |
709 // Destroy all child windows including widgets. | 707 // Destroy all child windows including widgets. |
710 display_controller_->CloseChildWindows(); | 708 display_controller_->CloseChildWindows(); |
711 display_controller_->CloseNonDesktopDisplay(); | 709 display_controller_->CloseNonDesktopDisplay(); |
712 | 710 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 MagnificationController::CreateInstance()); | 923 MagnificationController::CreateInstance()); |
926 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); | 924 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); |
927 | 925 |
928 partial_magnification_controller_.reset( | 926 partial_magnification_controller_.reset( |
929 new PartialMagnificationController()); | 927 new PartialMagnificationController()); |
930 | 928 |
931 autoclick_controller_.reset(AutoclickController::CreateInstance()); | 929 autoclick_controller_.reset(AutoclickController::CreateInstance()); |
932 | 930 |
933 high_contrast_controller_.reset(new HighContrastController); | 931 high_contrast_controller_.reset(new HighContrastController); |
934 video_detector_.reset(new VideoDetector); | 932 video_detector_.reset(new VideoDetector); |
935 window_cycle_controller_.reset(new WindowCycleController()); | |
936 window_selector_controller_.reset(new WindowSelectorController()); | 933 window_selector_controller_.reset(new WindowSelectorController()); |
937 | 934 |
938 tooltip_controller_.reset( | 935 tooltip_controller_.reset( |
939 new views::corewm::TooltipController( | 936 new views::corewm::TooltipController( |
940 scoped_ptr<views::corewm::Tooltip>( | 937 scoped_ptr<views::corewm::Tooltip>( |
941 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); | 938 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); |
942 AddPreTargetHandler(tooltip_controller_.get()); | 939 AddPreTargetHandler(tooltip_controller_.get()); |
943 | 940 |
944 event_client_.reset(new internal::EventClientImpl); | 941 event_client_.reset(new internal::EventClientImpl); |
945 | 942 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1034 delegate_->CreateKeyboardControllerProxy(); | 1031 delegate_->CreateKeyboardControllerProxy(); |
1035 keyboard_controller_.reset( | 1032 keyboard_controller_.reset( |
1036 new keyboard::KeyboardController(proxy)); | 1033 new keyboard::KeyboardController(proxy)); |
1037 } | 1034 } |
1038 } | 1035 } |
1039 | 1036 |
1040 void Shell::InitRootWindow(aura::Window* root_window) { | 1037 void Shell::InitRootWindow(aura::Window* root_window) { |
1041 DCHECK(activation_client_); | 1038 DCHECK(activation_client_); |
1042 DCHECK(visibility_controller_.get()); | 1039 DCHECK(visibility_controller_.get()); |
1043 DCHECK(drag_drop_controller_.get()); | 1040 DCHECK(drag_drop_controller_.get()); |
1044 DCHECK(window_cycle_controller_.get()); | |
1045 | 1041 |
1046 aura::client::SetFocusClient(root_window, focus_client_.get()); | 1042 aura::client::SetFocusClient(root_window, focus_client_.get()); |
1047 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); | 1043 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); |
1048 aura::client::SetActivationClient(root_window, activation_client_); | 1044 aura::client::SetActivationClient(root_window, activation_client_); |
1049 views::corewm::FocusController* focus_controller = | 1045 views::corewm::FocusController* focus_controller = |
1050 static_cast<views::corewm::FocusController*>(activation_client_); | 1046 static_cast<views::corewm::FocusController*>(activation_client_); |
1051 root_window->AddPreTargetHandler(focus_controller); | 1047 root_window->AddPreTargetHandler(focus_controller); |
1052 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); | 1048 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); |
1053 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); | 1049 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); |
1054 aura::client::SetScreenPositionClient(root_window, | 1050 aura::client::SetScreenPositionClient(root_window, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1106 //////////////////////////////////////////////////////////////////////////////// | 1102 //////////////////////////////////////////////////////////////////////////////// |
1107 // Shell, aura::client::ActivationChangeObserver implementation: | 1103 // Shell, aura::client::ActivationChangeObserver implementation: |
1108 | 1104 |
1109 void Shell::OnWindowActivated(aura::Window* gained_active, | 1105 void Shell::OnWindowActivated(aura::Window* gained_active, |
1110 aura::Window* lost_active) { | 1106 aura::Window* lost_active) { |
1111 if (gained_active) | 1107 if (gained_active) |
1112 target_root_window_ = gained_active->GetRootWindow(); | 1108 target_root_window_ = gained_active->GetRootWindow(); |
1113 } | 1109 } |
1114 | 1110 |
1115 } // namespace ash | 1111 } // namespace ash |
OLD | NEW |