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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 #include "ash/shelf/shelf_widget.h" | 45 #include "ash/shelf/shelf_widget.h" |
46 #include "ash/shelf/shelf_window_watcher.h" | 46 #include "ash/shelf/shelf_window_watcher.h" |
47 #include "ash/shell_delegate.h" | 47 #include "ash/shell_delegate.h" |
48 #include "ash/shell_factory.h" | 48 #include "ash/shell_factory.h" |
49 #include "ash/shell_window_ids.h" | 49 #include "ash/shell_window_ids.h" |
50 #include "ash/system/locale/locale_notification_controller.h" | 50 #include "ash/system/locale/locale_notification_controller.h" |
51 #include "ash/system/session/logout_confirmation_controller.h" | 51 #include "ash/system/session/logout_confirmation_controller.h" |
52 #include "ash/system/status_area_widget.h" | 52 #include "ash/system/status_area_widget.h" |
53 #include "ash/system/tray/system_tray_delegate.h" | 53 #include "ash/system/tray/system_tray_delegate.h" |
54 #include "ash/system/tray/system_tray_notifier.h" | 54 #include "ash/system/tray/system_tray_notifier.h" |
| 55 #include "ash/touch/touch_ctm_controller.h" |
55 #include "ash/wm/app_list_controller.h" | 56 #include "ash/wm/app_list_controller.h" |
56 #include "ash/wm/ash_focus_rules.h" | 57 #include "ash/wm/ash_focus_rules.h" |
57 #include "ash/wm/ash_native_cursor_manager.h" | 58 #include "ash/wm/ash_native_cursor_manager.h" |
58 #include "ash/wm/coordinate_conversion.h" | 59 #include "ash/wm/coordinate_conversion.h" |
59 #include "ash/wm/custom_frame_view_ash.h" | 60 #include "ash/wm/custom_frame_view_ash.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_window_manager.h" | 63 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" |
63 #include "ash/wm/mru_window_tracker.h" | 64 #include "ash/wm/mru_window_tracker.h" |
64 #include "ash/wm/overlay_event_filter.h" | 65 #include "ash/wm/overlay_event_filter.h" |
(...skipping 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
727 shelf_model_.reset(); | 728 shelf_model_.reset(); |
728 | 729 |
729 power_button_controller_.reset(); | 730 power_button_controller_.reset(); |
730 lock_state_controller_.reset(); | 731 lock_state_controller_.reset(); |
731 | 732 |
732 #if defined(OS_CHROMEOS) | 733 #if defined(OS_CHROMEOS) |
733 resolution_notification_controller_.reset(); | 734 resolution_notification_controller_.reset(); |
734 #endif | 735 #endif |
735 desktop_background_controller_.reset(); | 736 desktop_background_controller_.reset(); |
736 | 737 |
| 738 touch_ctm_controller_.reset(); |
| 739 |
737 // This also deletes all RootWindows. Note that we invoke Shutdown() on | 740 // This also deletes all RootWindows. Note that we invoke Shutdown() on |
738 // DisplayController before resetting |display_controller_|, since destruction | 741 // DisplayController before resetting |display_controller_|, since destruction |
739 // of its owned RootWindowControllers relies on the value. | 742 // of its owned RootWindowControllers relies on the value. |
740 display_manager_->CreateScreenForShutdown(); | 743 display_manager_->CreateScreenForShutdown(); |
741 display_controller_->Shutdown(); | 744 display_controller_->Shutdown(); |
742 display_controller_.reset(); | 745 display_controller_.reset(); |
743 screen_position_controller_.reset(); | 746 screen_position_controller_.reset(); |
744 | 747 |
745 keyboard_controller_.reset(); | 748 keyboard_controller_.reset(); |
746 accessibility_delegate_.reset(); | 749 accessibility_delegate_.reset(); |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
967 base::Bind(&SystemTrayDelegate::SignOut, | 970 base::Bind(&SystemTrayDelegate::SignOut, |
968 base::Unretained(system_tray_delegate_.get())))); | 971 base::Unretained(system_tray_delegate_.get())))); |
969 | 972 |
970 // TODO(oshima): Initialize all RootWindowControllers once, and | 973 // TODO(oshima): Initialize all RootWindowControllers once, and |
971 // initialize controller/delegates above when initializing the | 974 // initialize controller/delegates above when initializing the |
972 // primary root window controller. | 975 // primary root window controller. |
973 internal::RootWindowController::CreateForPrimaryDisplay( | 976 internal::RootWindowController::CreateForPrimaryDisplay( |
974 root_window->GetHost()); | 977 root_window->GetHost()); |
975 | 978 |
976 display_controller_->InitSecondaryDisplays(); | 979 display_controller_->InitSecondaryDisplays(); |
| 980 touch_ctm_controller_.reset(new TouchCTMController()); |
| 981 touch_ctm_controller_->UpdateTouchCTM(); |
977 | 982 |
978 // It needs to be created after RootWindowController has been created | 983 // It needs to be created after RootWindowController has been created |
979 // (which calls OnWindowResized has been called, otherwise the | 984 // (which calls OnWindowResized has been called, otherwise the |
980 // widget will not paint when restoring after a browser crash. Also it needs | 985 // widget will not paint when restoring after a browser crash. Also it needs |
981 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 986 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
982 // the correct size. | 987 // the correct size. |
983 user_wallpaper_delegate_->InitializeWallpaper(); | 988 user_wallpaper_delegate_->InitializeWallpaper(); |
984 | 989 |
985 if (initially_hide_cursor_) | 990 if (initially_hide_cursor_) |
986 cursor_manager_.HideCursor(); | 991 cursor_manager_.HideCursor(); |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 //////////////////////////////////////////////////////////////////////////////// | 1103 //////////////////////////////////////////////////////////////////////////////// |
1099 // Shell, aura::client::ActivationChangeObserver implementation: | 1104 // Shell, aura::client::ActivationChangeObserver implementation: |
1100 | 1105 |
1101 void Shell::OnWindowActivated(aura::Window* gained_active, | 1106 void Shell::OnWindowActivated(aura::Window* gained_active, |
1102 aura::Window* lost_active) { | 1107 aura::Window* lost_active) { |
1103 if (gained_active) | 1108 if (gained_active) |
1104 target_root_window_ = gained_active->GetRootWindow(); | 1109 target_root_window_ = gained_active->GetRootWindow(); |
1105 } | 1110 } |
1106 | 1111 |
1107 } // namespace ash | 1112 } // namespace ash |
OLD | NEW |