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

Unified Diff: ash/mus/window_manager.cc

Issue 2886253002: mash: remove more shell/shelf WmWindow usage. (Closed)
Patch Set: Fix WmShelf::ForWindow. Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/mus/window_manager.cc
diff --git a/ash/mus/window_manager.cc b/ash/mus/window_manager.cc
index 6c9e65887aa198bd0649d277cd10a618b1b985cb..dbda2e19a80e7a8daf29e4baa0182fea7cf9da1d 100644
--- a/ash/mus/window_manager.cc
+++ b/ash/mus/window_manager.cc
@@ -172,7 +172,7 @@ bool WindowManager::WaitForInitialDisplays() {
void WindowManager::DeleteAllRootWindowControllers() {
// Primary RootWindowController must be destroyed last.
RootWindowController* primary_root_window_controller =
- GetPrimaryRootWindowController();
+ Shell::GetPrimaryRootWindowController();
std::set<RootWindowController*> secondary_root_window_controllers;
for (auto& root_window_controller_ptr : root_window_controllers_) {
if (root_window_controller_ptr.get() != primary_root_window_controller) {
@@ -235,10 +235,10 @@ void WindowManager::CreateShell(
DCHECK(!created_shell_);
created_shell_ = true;
ShellInitParams init_params;
- ShellPortMash* shell_port = new ShellPortMash(
- window_tree_host ? WmWindow::Get(window_tree_host->window()) : nullptr,
- this, pointer_watcher_event_router_.get(),
- create_session_state_delegate_stub_for_test_);
+ ShellPortMash* shell_port =
+ new ShellPortMash(window_tree_host ? window_tree_host->window() : nullptr,
+ this, pointer_watcher_event_router_.get(),
+ create_session_state_delegate_stub_for_test_);
// Shell::CreateInstance() takes ownership of ShellDelegate.
init_params.delegate = shell_delegate_ ? shell_delegate_.release()
: new ShellDelegateMus(connector_);
@@ -265,9 +265,8 @@ void WindowManager::DestroyRootWindowController(
RootWindowController* root_window_controller,
bool in_shutdown) {
if (!in_shutdown && root_window_controllers_.size() > 1) {
- DCHECK_NE(root_window_controller, GetPrimaryRootWindowController());
- root_window_controller->MoveWindowsTo(
- GetPrimaryRootWindowController()->GetRootWindow());
+ DCHECK_NE(root_window_controller, Shell::GetPrimaryRootWindowController());
+ root_window_controller->MoveWindowsTo(Shell::GetPrimaryRootWindow());
}
root_window_controller->Shutdown();
@@ -298,13 +297,6 @@ void WindowManager::Shutdown() {
window_manager_client_ = nullptr;
}
-RootWindowController* WindowManager::GetPrimaryRootWindowController() {
- return RootWindowController::ForWindow(ShellPort::Get()
- ->GetPrimaryRootWindowController()
- ->GetWindow()
- ->aura_window());
-}
-
void WindowManager::OnEmbed(
std::unique_ptr<aura::WindowTreeHostMus> window_tree_host) {
// WindowManager should never see this, instead OnWmNewDisplay() is called.
« no previous file with comments | « ash/mus/window_manager.h ('k') | ash/root_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698