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

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
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shell/content_client/shell_browser_main_parts.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 846 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/shell/content_client/shell_browser_main_parts.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698