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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
857 // UserActivityDetector passes events to observers, so let them get | 857 // UserActivityDetector passes events to observers, so let them get |
858 // rewritten first. | 858 // rewritten first. |
859 user_activity_detector_.reset(new UserActivityDetector); | 859 user_activity_detector_.reset(new UserActivityDetector); |
860 AddPreTargetHandler(user_activity_detector_.get()); | 860 AddPreTargetHandler(user_activity_detector_.get()); |
861 | 861 |
862 overlay_filter_.reset(new internal::OverlayEventFilter); | 862 overlay_filter_.reset(new internal::OverlayEventFilter); |
863 AddPreTargetHandler(overlay_filter_.get()); | 863 AddPreTargetHandler(overlay_filter_.get()); |
864 AddShellObserver(overlay_filter_.get()); | 864 AddShellObserver(overlay_filter_.get()); |
865 | 865 |
866 input_method_filter_.reset(new views::corewm::InputMethodEventFilter( | 866 input_method_filter_.reset(new views::corewm::InputMethodEventFilter( |
867 root_window->GetDispatcher()->host()->GetAcceleratedWidget())); | 867 root_window->GetHost()->GetAcceleratedWidget())); |
868 AddPreTargetHandler(input_method_filter_.get()); | 868 AddPreTargetHandler(input_method_filter_.get()); |
869 | 869 |
870 accelerator_filter_.reset(new internal::AcceleratorFilter); | 870 accelerator_filter_.reset(new internal::AcceleratorFilter); |
871 AddPreTargetHandler(accelerator_filter_.get()); | 871 AddPreTargetHandler(accelerator_filter_.get()); |
872 | 872 |
873 event_transformation_handler_.reset(new internal::EventTransformationHandler); | 873 event_transformation_handler_.reset(new internal::EventTransformationHandler); |
874 AddPreTargetHandler(event_transformation_handler_.get()); | 874 AddPreTargetHandler(event_transformation_handler_.get()); |
875 | 875 |
876 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); | 876 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); |
877 | 877 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
957 locale_notification_controller_.reset( | 957 locale_notification_controller_.reset( |
958 new internal::LocaleNotificationController); | 958 new internal::LocaleNotificationController); |
959 | 959 |
960 // Initialize system_tray_delegate_ after StatusAreaWidget is created. | 960 // Initialize system_tray_delegate_ after StatusAreaWidget is created. |
961 system_tray_delegate_->Initialize(); | 961 system_tray_delegate_->Initialize(); |
962 | 962 |
963 // TODO(oshima): Initialize all RootWindowControllers once, and | 963 // TODO(oshima): Initialize all RootWindowControllers once, and |
964 // initialize controller/delegates above when initializing the | 964 // initialize controller/delegates above when initializing the |
965 // primary root window controller. | 965 // primary root window controller. |
966 internal::RootWindowController::CreateForPrimaryDisplay( | 966 internal::RootWindowController::CreateForPrimaryDisplay( |
967 root_window->GetDispatcher()->host()); | 967 root_window->GetHost()); |
968 | 968 |
969 display_controller_->InitSecondaryDisplays(); | 969 display_controller_->InitSecondaryDisplays(); |
970 | 970 |
971 // It needs to be created after RootWindowController has been created | 971 // It needs to be created after RootWindowController has been created |
972 // (which calls OnWindowResized has been called, otherwise the | 972 // (which calls OnWindowResized has been called, otherwise the |
973 // widget will not paint when restoring after a browser crash. Also it needs | 973 // widget will not paint when restoring after a browser crash. Also it needs |
974 // to be created after InitSecondaryDisplays() to initialize the wallpapers in | 974 // to be created after InitSecondaryDisplays() to initialize the wallpapers in |
975 // the correct size. | 975 // the correct size. |
976 user_wallpaper_delegate_->InitializeWallpaper(); | 976 user_wallpaper_delegate_->InitializeWallpaper(); |
977 | 977 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1091 //////////////////////////////////////////////////////////////////////////////// | 1091 //////////////////////////////////////////////////////////////////////////////// |
1092 // Shell, aura::client::ActivationChangeObserver implementation: | 1092 // Shell, aura::client::ActivationChangeObserver implementation: |
1093 | 1093 |
1094 void Shell::OnWindowActivated(aura::Window* gained_active, | 1094 void Shell::OnWindowActivated(aura::Window* gained_active, |
1095 aura::Window* lost_active) { | 1095 aura::Window* lost_active) { |
1096 if (gained_active) | 1096 if (gained_active) |
1097 target_root_window_ = gained_active->GetRootWindow(); | 1097 target_root_window_ = gained_active->GetRootWindow(); |
1098 } | 1098 } |
1099 | 1099 |
1100 } // namespace ash | 1100 } // namespace ash |
OLD | NEW |