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

Side by Side Diff: ash/root_window_controller.cc

Issue 2247503002: mash: Create and show a shelf in mash. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix WindowManager WmShell::Shutdown; delay PointerWatcherEventRouter teardown; cleanup shutdown wor… Created 4 years, 4 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
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/root_window_controller.h" 5 #include "ash/root_window_controller.h"
6 6
7 #include <queue> 7 #include <queue>
8 #include <vector> 8 #include <vector>
9 9
10 #include "ash/aura/aura_layout_manager_adapter.h" 10 #include "ash/aura/aura_layout_manager_adapter.h"
(...skipping 557 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 if (docked_layout_manager_) { 568 if (docked_layout_manager_) {
569 docked_layout_manager_->Shutdown(); 569 docked_layout_manager_->Shutdown();
570 docked_layout_manager_ = NULL; 570 docked_layout_manager_ = NULL;
571 } 571 }
572 aura::Window* root_window = GetRootWindow(); 572 aura::Window* root_window = GetRootWindow();
573 aura::client::SetDragDropClient(root_window, NULL); 573 aura::client::SetDragDropClient(root_window, NULL);
574 574
575 if (shelf_widget_) 575 if (shelf_widget_)
576 shelf_widget_->Shutdown(); 576 shelf_widget_->Shutdown();
577 577
578 wm_shelf_aura_->Shutdown();
579
580 // Close background widget first as it depends on tooltip. 578 // Close background widget first as it depends on tooltip.
581 wallpaper_controller_.reset(); 579 wallpaper_controller_.reset();
582 animating_wallpaper_controller_.reset(); 580 animating_wallpaper_controller_.reset();
583 581
584 workspace_controller_.reset(); 582 workspace_controller_.reset();
585 aura::client::SetTooltipClient(root_window, NULL); 583 aura::client::SetTooltipClient(root_window, NULL);
586 584
587 // Explicitly destroy top level windows. We do this as during part of 585 // Explicitly destroy top level windows. We do this as during part of
588 // destruction such windows may query the RootWindow for state. 586 // destruction such windows may query the RootWindow for state.
589 aura::WindowTracker non_toplevel_windows; 587 aura::WindowTracker non_toplevel_windows;
(...skipping 19 matching lines...) Expand all
609 while (!root_window->children().empty()) { 607 while (!root_window->children().empty()) {
610 aura::Window* window = root_window->children()[0]; 608 aura::Window* window = root_window->children()[0];
611 if (window->owned_by_parent()) { 609 if (window->owned_by_parent()) {
612 delete window; 610 delete window;
613 } else { 611 } else {
614 root_window->RemoveChild(window); 612 root_window->RemoveChild(window);
615 } 613 }
616 } 614 }
617 615
618 shelf_widget_.reset(); 616 shelf_widget_.reset();
617 // CloseChildWindows may be called twice during the shutdown of ash unittests.
618 // Avoid notifying WmShelf that the Shelf instance has been destroyed twice.
619 if (wm_shelf_aura_->shelf())
620 wm_shelf_aura_->ClearShelf();
619 shelf_.reset(); 621 shelf_.reset();
620 } 622 }
621 623
622 void RootWindowController::MoveWindowsTo(aura::Window* dst) { 624 void RootWindowController::MoveWindowsTo(aura::Window* dst) {
623 // Clear the workspace controller, so it doesn't incorrectly update the shelf. 625 // Clear the workspace controller, so it doesn't incorrectly update the shelf.
624 workspace_controller_.reset(); 626 workspace_controller_.reset();
625 ReparentAllWindows(GetRootWindow(), dst); 627 ReparentAllWindows(GetRootWindow(), dst);
626 } 628 }
627 629
628 ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() { 630 ShelfLayoutManager* RootWindowController::GetShelfLayoutManager() {
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
957 aura::Window* primary_root_window = Shell::GetInstance() 959 aura::Window* primary_root_window = Shell::GetInstance()
958 ->window_tree_host_manager() 960 ->window_tree_host_manager()
959 ->GetPrimaryRootWindow(); 961 ->GetPrimaryRootWindow();
960 return GetRootWindowSettings(primary_root_window)->controller; 962 return GetRootWindowSettings(primary_root_window)->controller;
961 } 963 }
962 964
963 return GetRootWindowSettings(root_window)->controller; 965 return GetRootWindowSettings(root_window)->controller;
964 } 966 }
965 967
966 } // namespace ash 968 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698