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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 #include "ash/shelf/shelf_widget.h" | 46 #include "ash/shelf/shelf_widget.h" |
47 #include "ash/shelf/shelf_window_watcher.h" | 47 #include "ash/shelf/shelf_window_watcher.h" |
48 #include "ash/shell_delegate.h" | 48 #include "ash/shell_delegate.h" |
49 #include "ash/shell_factory.h" | 49 #include "ash/shell_factory.h" |
50 #include "ash/shell_init_params.h" | 50 #include "ash/shell_init_params.h" |
51 #include "ash/shell_window_ids.h" | 51 #include "ash/shell_window_ids.h" |
52 #include "ash/system/locale/locale_notification_controller.h" | 52 #include "ash/system/locale/locale_notification_controller.h" |
53 #include "ash/system/status_area_widget.h" | 53 #include "ash/system/status_area_widget.h" |
54 #include "ash/system/tray/system_tray_delegate.h" | 54 #include "ash/system/tray/system_tray_delegate.h" |
55 #include "ash/system/tray/system_tray_notifier.h" | 55 #include "ash/system/tray/system_tray_notifier.h" |
| 56 #include "ash/virtual_keyboard_controller.h" |
56 #include "ash/wm/app_list_controller.h" | 57 #include "ash/wm/app_list_controller.h" |
57 #include "ash/wm/ash_focus_rules.h" | 58 #include "ash/wm/ash_focus_rules.h" |
58 #include "ash/wm/ash_native_cursor_manager.h" | 59 #include "ash/wm/ash_native_cursor_manager.h" |
59 #include "ash/wm/coordinate_conversion.h" | 60 #include "ash/wm/coordinate_conversion.h" |
60 #include "ash/wm/event_client_impl.h" | 61 #include "ash/wm/event_client_impl.h" |
61 #include "ash/wm/lock_state_controller.h" | 62 #include "ash/wm/lock_state_controller.h" |
62 #include "ash/wm/maximize_mode/maximize_mode_controller.h" | 63 #include "ash/wm/maximize_mode/maximize_mode_controller.h" |
63 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" | 64 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
64 #include "ash/wm/mru_window_tracker.h" | 65 #include "ash/wm/mru_window_tracker.h" |
65 #include "ash/wm/overlay_event_filter.h" | 66 #include "ash/wm/overlay_event_filter.h" |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 #if defined(OS_CHROMEOS) && defined(USE_X11) | 787 #if defined(OS_CHROMEOS) && defined(USE_X11) |
787 touch_transformer_controller_.reset(); | 788 touch_transformer_controller_.reset(); |
788 #endif // defined(OS_CHROMEOS) && defined(USE_X11) | 789 #endif // defined(OS_CHROMEOS) && defined(USE_X11) |
789 | 790 |
790 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 791 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
791 // DisplayController before resetting |display_controller_|, since destruction | 792 // DisplayController before resetting |display_controller_|, since destruction |
792 // of its owned RootWindowControllers relies on the value. | 793 // of its owned RootWindowControllers relies on the value. |
793 display_manager_->CreateScreenForShutdown(); | 794 display_manager_->CreateScreenForShutdown(); |
794 display_controller_->Shutdown(); | 795 display_controller_->Shutdown(); |
795 display_controller_.reset(); | 796 display_controller_.reset(); |
| 797 virtual_keyboard_controller_.reset(); |
796 screen_position_controller_.reset(); | 798 screen_position_controller_.reset(); |
797 accessibility_delegate_.reset(); | 799 accessibility_delegate_.reset(); |
798 new_window_delegate_.reset(); | 800 new_window_delegate_.reset(); |
799 media_delegate_.reset(); | 801 media_delegate_.reset(); |
800 | 802 |
801 keyboard::KeyboardController::ResetInstance(NULL); | 803 keyboard::KeyboardController::ResetInstance(NULL); |
802 | 804 |
803 #if defined(OS_CHROMEOS) | 805 #if defined(OS_CHROMEOS) |
804 if (display_change_observer_) | 806 if (display_change_observer_) |
805 display_configurator_->RemoveObserver(display_change_observer_.get()); | 807 display_configurator_->RemoveObserver(display_change_observer_.get()); |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
872 focus_client_.reset(focus_controller); | 874 focus_client_.reset(focus_controller); |
873 activation_client_ = focus_controller; | 875 activation_client_ = focus_controller; |
874 activation_client_->AddObserver(this); | 876 activation_client_->AddObserver(this); |
875 focus_cycler_.reset(new FocusCycler()); | 877 focus_cycler_.reset(new FocusCycler()); |
876 | 878 |
877 screen_position_controller_.reset(new ScreenPositionController); | 879 screen_position_controller_.reset(new ScreenPositionController); |
878 | 880 |
879 display_controller_->Start(); | 881 display_controller_->Start(); |
880 display_controller_->CreatePrimaryHost( | 882 display_controller_->CreatePrimaryHost( |
881 ShellInitParamsToAshWindowTreeHostInitParams(init_params)); | 883 ShellInitParamsToAshWindowTreeHostInitParams(init_params)); |
| 884 virtual_keyboard_controller_.reset(new VirtualKeyboardController); |
882 aura::Window* root_window = display_controller_->GetPrimaryRootWindow(); | 885 aura::Window* root_window = display_controller_->GetPrimaryRootWindow(); |
883 target_root_window_ = root_window; | 886 target_root_window_ = root_window; |
884 | 887 |
885 #if defined(OS_CHROMEOS) | 888 #if defined(OS_CHROMEOS) |
886 resolution_notification_controller_.reset( | 889 resolution_notification_controller_.reset( |
887 new ResolutionNotificationController); | 890 new ResolutionNotificationController); |
888 #endif | 891 #endif |
889 | 892 |
890 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); | 893 cursor_manager_.SetDisplay(GetScreen()->GetPrimaryDisplay()); |
891 | 894 |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 //////////////////////////////////////////////////////////////////////////////// | 1153 //////////////////////////////////////////////////////////////////////////////// |
1151 // Shell, aura::client::ActivationChangeObserver implementation: | 1154 // Shell, aura::client::ActivationChangeObserver implementation: |
1152 | 1155 |
1153 void Shell::OnWindowActivated(aura::Window* gained_active, | 1156 void Shell::OnWindowActivated(aura::Window* gained_active, |
1154 aura::Window* lost_active) { | 1157 aura::Window* lost_active) { |
1155 if (gained_active) | 1158 if (gained_active) |
1156 target_root_window_ = gained_active->GetRootWindow(); | 1159 target_root_window_ = gained_active->GetRootWindow(); |
1157 } | 1160 } |
1158 | 1161 |
1159 } // namespace ash | 1162 } // namespace ash |
OLD | NEW |