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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 #include "ash/wm/resize_shadow_controller.h" | 68 #include "ash/wm/resize_shadow_controller.h" |
69 #include "ash/wm/root_window_layout_manager.h" | 69 #include "ash/wm/root_window_layout_manager.h" |
70 #include "ash/wm/screen_dimmer.h" | 70 #include "ash/wm/screen_dimmer.h" |
71 #include "ash/wm/system_gesture_event_filter.h" | 71 #include "ash/wm/system_gesture_event_filter.h" |
72 #include "ash/wm/system_modal_container_event_filter.h" | 72 #include "ash/wm/system_modal_container_event_filter.h" |
73 #include "ash/wm/system_modal_container_layout_manager.h" | 73 #include "ash/wm/system_modal_container_layout_manager.h" |
74 #include "ash/wm/toplevel_window_event_handler.h" | 74 #include "ash/wm/toplevel_window_event_handler.h" |
75 #include "ash/wm/user_activity_detector.h" | 75 #include "ash/wm/user_activity_detector.h" |
76 #include "ash/wm/video_detector.h" | 76 #include "ash/wm/video_detector.h" |
77 #include "ash/wm/window_animations.h" | 77 #include "ash/wm/window_animations.h" |
78 #include "ash/wm/window_cycle_controller.h" | |
79 #include "ash/wm/window_positioner.h" | 78 #include "ash/wm/window_positioner.h" |
80 #include "ash/wm/window_properties.h" | 79 #include "ash/wm/window_properties.h" |
81 #include "ash/wm/window_util.h" | 80 #include "ash/wm/window_util.h" |
82 #include "ash/wm/workspace_controller.h" | 81 #include "ash/wm/workspace_controller.h" |
83 #include "base/bind.h" | 82 #include "base/bind.h" |
84 #include "base/bind_helpers.h" | 83 #include "base/bind_helpers.h" |
85 #include "base/debug/trace_event.h" | 84 #include "base/debug/trace_event.h" |
86 #include "ui/aura/client/aura_constants.h" | 85 #include "ui/aura/client/aura_constants.h" |
87 #include "ui/aura/env.h" | 86 #include "ui/aura/env.h" |
88 #include "ui/aura/layout_manager.h" | 87 #include "ui/aura/layout_manager.h" |
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
686 // deleted because it's observing video activity through | 685 // deleted because it's observing video activity through |
687 // VideoDetectorObserver interface. | 686 // VideoDetectorObserver interface. |
688 video_activity_notifier_.reset(); | 687 video_activity_notifier_.reset(); |
689 #endif // defined(OS_CHROMEOS) | 688 #endif // defined(OS_CHROMEOS) |
690 video_detector_.reset(); | 689 video_detector_.reset(); |
691 | 690 |
692 shadow_controller_.reset(); | 691 shadow_controller_.reset(); |
693 resize_shadow_controller_.reset(); | 692 resize_shadow_controller_.reset(); |
694 | 693 |
695 window_selector_controller_.reset(); | 694 window_selector_controller_.reset(); |
696 window_cycle_controller_.reset(); | |
697 mru_window_tracker_.reset(); | 695 mru_window_tracker_.reset(); |
698 | 696 |
699 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| | 697 // |shelf_window_watcher_| has a weak pointer to |shelf_Model_| |
700 // and has window observers. | 698 // and has window observers. |
701 shelf_window_watcher_.reset(); | 699 shelf_window_watcher_.reset(); |
702 | 700 |
703 // Destroy all child windows including widgets. | 701 // Destroy all child windows including widgets. |
704 display_controller_->CloseChildWindows(); | 702 display_controller_->CloseChildWindows(); |
705 display_controller_->CloseNonDesktopDisplay(); | 703 display_controller_->CloseNonDesktopDisplay(); |
706 | 704 |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
919 MagnificationController::CreateInstance()); | 917 MagnificationController::CreateInstance()); |
920 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); | 918 mru_window_tracker_.reset(new MruWindowTracker(activation_client_)); |
921 | 919 |
922 partial_magnification_controller_.reset( | 920 partial_magnification_controller_.reset( |
923 new PartialMagnificationController()); | 921 new PartialMagnificationController()); |
924 | 922 |
925 autoclick_controller_.reset(AutoclickController::CreateInstance()); | 923 autoclick_controller_.reset(AutoclickController::CreateInstance()); |
926 | 924 |
927 high_contrast_controller_.reset(new HighContrastController); | 925 high_contrast_controller_.reset(new HighContrastController); |
928 video_detector_.reset(new VideoDetector); | 926 video_detector_.reset(new VideoDetector); |
929 window_cycle_controller_.reset(new WindowCycleController()); | |
930 window_selector_controller_.reset(new WindowSelectorController()); | 927 window_selector_controller_.reset(new WindowSelectorController()); |
931 | 928 |
932 tooltip_controller_.reset( | 929 tooltip_controller_.reset( |
933 new views::corewm::TooltipController( | 930 new views::corewm::TooltipController( |
934 scoped_ptr<views::corewm::Tooltip>( | 931 scoped_ptr<views::corewm::Tooltip>( |
935 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); | 932 new views::corewm::TooltipAura(gfx::SCREEN_TYPE_ALTERNATE)))); |
936 AddPreTargetHandler(tooltip_controller_.get()); | 933 AddPreTargetHandler(tooltip_controller_.get()); |
937 | 934 |
938 event_client_.reset(new internal::EventClientImpl); | 935 event_client_.reset(new internal::EventClientImpl); |
939 | 936 |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1031 delegate_->CreateKeyboardControllerProxy(); | 1028 delegate_->CreateKeyboardControllerProxy(); |
1032 keyboard_controller_.reset( | 1029 keyboard_controller_.reset( |
1033 new keyboard::KeyboardController(proxy)); | 1030 new keyboard::KeyboardController(proxy)); |
1034 } | 1031 } |
1035 } | 1032 } |
1036 | 1033 |
1037 void Shell::InitRootWindow(aura::Window* root_window) { | 1034 void Shell::InitRootWindow(aura::Window* root_window) { |
1038 DCHECK(activation_client_); | 1035 DCHECK(activation_client_); |
1039 DCHECK(visibility_controller_.get()); | 1036 DCHECK(visibility_controller_.get()); |
1040 DCHECK(drag_drop_controller_.get()); | 1037 DCHECK(drag_drop_controller_.get()); |
1041 DCHECK(window_cycle_controller_.get()); | |
1042 | 1038 |
1043 aura::client::SetFocusClient(root_window, focus_client_.get()); | 1039 aura::client::SetFocusClient(root_window, focus_client_.get()); |
1044 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); | 1040 input_method_filter_->SetInputMethodPropertyInRootWindow(root_window); |
1045 aura::client::SetActivationClient(root_window, activation_client_); | 1041 aura::client::SetActivationClient(root_window, activation_client_); |
1046 views::corewm::FocusController* focus_controller = | 1042 views::corewm::FocusController* focus_controller = |
1047 static_cast<views::corewm::FocusController*>(activation_client_); | 1043 static_cast<views::corewm::FocusController*>(activation_client_); |
1048 root_window->AddPreTargetHandler(focus_controller); | 1044 root_window->AddPreTargetHandler(focus_controller); |
1049 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); | 1045 aura::client::SetVisibilityClient(root_window, visibility_controller_.get()); |
1050 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); | 1046 aura::client::SetDragDropClient(root_window, drag_drop_controller_.get()); |
1051 aura::client::SetScreenPositionClient(root_window, | 1047 aura::client::SetScreenPositionClient(root_window, |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1103 //////////////////////////////////////////////////////////////////////////////// | 1099 //////////////////////////////////////////////////////////////////////////////// |
1104 // Shell, aura::client::ActivationChangeObserver implementation: | 1100 // Shell, aura::client::ActivationChangeObserver implementation: |
1105 | 1101 |
1106 void Shell::OnWindowActivated(aura::Window* gained_active, | 1102 void Shell::OnWindowActivated(aura::Window* gained_active, |
1107 aura::Window* lost_active) { | 1103 aura::Window* lost_active) { |
1108 if (gained_active) | 1104 if (gained_active) |
1109 target_root_window_ = gained_active->GetRootWindow(); | 1105 target_root_window_ = gained_active->GetRootWindow(); |
1110 } | 1106 } |
1111 | 1107 |
1112 } // namespace ash | 1108 } // namespace ash |
OLD | NEW |