Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(400)

Side by Side Diff: ash/shell.cc

Issue 184903003: Window ownership -> WindowTreeHost (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 842 matching lines...) Expand 10 before | Expand all | Expand 10 after
853 // UserActivityDetector passes events to observers, so let them get 853 // UserActivityDetector passes events to observers, so let them get
854 // rewritten first. 854 // rewritten first.
855 user_activity_detector_.reset(new UserActivityDetector); 855 user_activity_detector_.reset(new UserActivityDetector);
856 AddPreTargetHandler(user_activity_detector_.get()); 856 AddPreTargetHandler(user_activity_detector_.get());
857 857
858 overlay_filter_.reset(new internal::OverlayEventFilter); 858 overlay_filter_.reset(new internal::OverlayEventFilter);
859 AddPreTargetHandler(overlay_filter_.get()); 859 AddPreTargetHandler(overlay_filter_.get());
860 AddShellObserver(overlay_filter_.get()); 860 AddShellObserver(overlay_filter_.get());
861 861
862 input_method_filter_.reset(new views::corewm::InputMethodEventFilter( 862 input_method_filter_.reset(new views::corewm::InputMethodEventFilter(
863 root_window->GetDispatcher()->host()->GetAcceleratedWidget())); 863 root_window->GetHost()->GetAcceleratedWidget()));
864 AddPreTargetHandler(input_method_filter_.get()); 864 AddPreTargetHandler(input_method_filter_.get());
865 865
866 accelerator_filter_.reset(new internal::AcceleratorFilter); 866 accelerator_filter_.reset(new internal::AcceleratorFilter);
867 AddPreTargetHandler(accelerator_filter_.get()); 867 AddPreTargetHandler(accelerator_filter_.get());
868 868
869 event_transformation_handler_.reset(new internal::EventTransformationHandler); 869 event_transformation_handler_.reset(new internal::EventTransformationHandler);
870 AddPreTargetHandler(event_transformation_handler_.get()); 870 AddPreTargetHandler(event_transformation_handler_.get());
871 871
872 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler); 872 toplevel_window_event_handler_.reset(new ToplevelWindowEventHandler);
873 873
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 locale_notification_controller_.reset( 953 locale_notification_controller_.reset(
954 new internal::LocaleNotificationController); 954 new internal::LocaleNotificationController);
955 955
956 // Initialize system_tray_delegate_ after StatusAreaWidget is created. 956 // Initialize system_tray_delegate_ after StatusAreaWidget is created.
957 system_tray_delegate_->Initialize(); 957 system_tray_delegate_->Initialize();
958 958
959 // TODO(oshima): Initialize all RootWindowControllers once, and 959 // TODO(oshima): Initialize all RootWindowControllers once, and
960 // initialize controller/delegates above when initializing the 960 // initialize controller/delegates above when initializing the
961 // primary root window controller. 961 // primary root window controller.
962 internal::RootWindowController::CreateForPrimaryDisplay( 962 internal::RootWindowController::CreateForPrimaryDisplay(
963 root_window->GetDispatcher()->host()); 963 root_window->GetHost());
964 964
965 display_controller_->InitSecondaryDisplays(); 965 display_controller_->InitSecondaryDisplays();
966 966
967 // It needs to be created after RootWindowController has been created 967 // It needs to be created after RootWindowController has been created
968 // (which calls OnWindowResized has been called, otherwise the 968 // (which calls OnWindowResized has been called, otherwise the
969 // widget will not paint when restoring after a browser crash. Also it needs 969 // widget will not paint when restoring after a browser crash. Also it needs
970 // to be created after InitSecondaryDisplays() to initialize the wallpapers in 970 // to be created after InitSecondaryDisplays() to initialize the wallpapers in
971 // the correct size. 971 // the correct size.
972 user_wallpaper_delegate_->InitializeWallpaper(); 972 user_wallpaper_delegate_->InitializeWallpaper();
973 973
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 //////////////////////////////////////////////////////////////////////////////// 1087 ////////////////////////////////////////////////////////////////////////////////
1088 // Shell, aura::client::ActivationChangeObserver implementation: 1088 // Shell, aura::client::ActivationChangeObserver implementation:
1089 1089
1090 void Shell::OnWindowActivated(aura::Window* gained_active, 1090 void Shell::OnWindowActivated(aura::Window* gained_active,
1091 aura::Window* lost_active) { 1091 aura::Window* lost_active) {
1092 if (gained_active) 1092 if (gained_active)
1093 target_root_window_ = gained_active->GetRootWindow(); 1093 target_root_window_ = gained_active->GetRootWindow();
1094 } 1094 }
1095 1095
1096 } // namespace ash 1096 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698