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

Side by Side Diff: ash/shell.cc

Issue 1907863002: Converts DockedWindowLayoutManager to common ash/wm types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comment Created 4 years, 8 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
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/aura/aura_layout_manager_adapter.h » ('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 #include <utility> 9 #include <utility>
10 10
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 } 214 }
215 215
216 // static 216 // static
217 bool Shell::HasInstance() { 217 bool Shell::HasInstance() {
218 return !!instance_; 218 return !!instance_;
219 } 219 }
220 220
221 // static 221 // static
222 void Shell::DeleteInstance() { 222 void Shell::DeleteInstance() {
223 delete instance_; 223 delete instance_;
224 instance_ = nullptr;
225 } 224 }
226 225
227 // static 226 // static
228 RootWindowController* Shell::GetPrimaryRootWindowController() { 227 RootWindowController* Shell::GetPrimaryRootWindowController() {
229 CHECK(HasInstance()); 228 CHECK(HasInstance());
230 return GetRootWindowController(GetPrimaryRootWindow()); 229 return GetRootWindowController(GetPrimaryRootWindow());
231 } 230 }
232 231
233 // static 232 // static
234 Shell::RootWindowControllerList Shell::GetAllRootWindowControllers() { 233 Shell::RootWindowControllerList Shell::GetAllRootWindowControllers() {
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 audio_a11y_controller_.reset(); 809 audio_a11y_controller_.reset();
811 #endif // defined(OS_CHROMEOS) 810 #endif // defined(OS_CHROMEOS)
812 811
813 // This also deletes all RootWindows. Note that we invoke Shutdown() on 812 // This also deletes all RootWindows. Note that we invoke Shutdown() on
814 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since 813 // WindowTreeHostManager before resetting |window_tree_host_manager_|, since
815 // destruction 814 // destruction
816 // of its owned RootWindowControllers relies on the value. 815 // of its owned RootWindowControllers relies on the value.
817 display_manager_->CreateScreenForShutdown(); 816 display_manager_->CreateScreenForShutdown();
818 display_configuration_controller_.reset(); 817 display_configuration_controller_.reset();
819 818
819 // Needs to happen before |window_tree_host_manager_|. Calls back to Shell, so
820 // also needs to be destroyed before |instance_| reset to null.
821 wm_globals_.reset();
822
820 // Depends on |focus_client_|, so must be destroyed before. 823 // Depends on |focus_client_|, so must be destroyed before.
821 window_tree_host_manager_->Shutdown(); 824 window_tree_host_manager_->Shutdown();
822 window_tree_host_manager_.reset(); 825 window_tree_host_manager_.reset();
823 focus_client_.reset(); 826 focus_client_.reset();
824 screen_position_controller_.reset(); 827 screen_position_controller_.reset();
825 accessibility_delegate_.reset(); 828 accessibility_delegate_.reset();
826 new_window_delegate_.reset(); 829 new_window_delegate_.reset();
827 media_delegate_.reset(); 830 media_delegate_.reset();
828 831
829 keyboard::KeyboardController::ResetInstance(nullptr); 832 keyboard::KeyboardController::ResetInstance(nullptr);
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 1232
1230 void Shell::OnWindowActivated( 1233 void Shell::OnWindowActivated(
1231 aura::client::ActivationChangeObserver::ActivationReason reason, 1234 aura::client::ActivationChangeObserver::ActivationReason reason,
1232 aura::Window* gained_active, 1235 aura::Window* gained_active,
1233 aura::Window* lost_active) { 1236 aura::Window* lost_active) {
1234 if (gained_active) 1237 if (gained_active)
1235 target_root_window_ = gained_active->GetRootWindow(); 1238 target_root_window_ = gained_active->GetRootWindow();
1236 } 1239 }
1237 1240
1238 } // namespace ash 1241 } // namespace ash
OLDNEW
« no previous file with comments | « ash/root_window_controller.cc ('k') | ash/wm/aura/aura_layout_manager_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698