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

Side by Side Diff: ash/mus/bridge/wm_shell_mus.cc

Issue 2120003002: Fixes mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/mus/bridge/wm_shell_mus.h" 5 #include "ash/mus/bridge/wm_shell_mus.h"
6 6
7 #include "ash/common/default_accessibility_delegate.h" 7 #include "ash/common/default_accessibility_delegate.h"
8 #include "ash/common/display/display_info.h" 8 #include "ash/common/display/display_info.h"
9 #include "ash/common/session/session_state_delegate.h" 9 #include "ash/common/session/session_state_delegate.h"
10 #include "ash/common/shell_observer.h" 10 #include "ash/common/shell_observer.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub); 90 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub);
91 }; 91 };
92 92
93 } // namespace 93 } // namespace
94 94
95 WmShellMus::WmShellMus(::mus::WindowTreeClient* client) 95 WmShellMus::WmShellMus(::mus::WindowTreeClient* client)
96 : client_(client), session_state_delegate_(new SessionStateDelegateStub) { 96 : client_(client), session_state_delegate_(new SessionStateDelegateStub) {
97 client_->AddObserver(this); 97 client_->AddObserver(this);
98 WmShell::Set(this); 98 WmShell::Set(this);
99 99
100 CreateMaximizeModeController();
101
102 CreateMruWindowTracker(); 100 CreateMruWindowTracker();
103 101
104 accessibility_delegate_.reset(new DefaultAccessibilityDelegate); 102 accessibility_delegate_.reset(new DefaultAccessibilityDelegate);
105 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); 103 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate));
106 } 104 }
107 105
108 WmShellMus::~WmShellMus() { 106 WmShellMus::~WmShellMus() {
109 // This order mirrors that of Shell. 107 // This order mirrors that of Shell.
110 108
111 // Destroy maximize mode controller early on since it has some observers which
112 // need to be removed.
113 DeleteMaximizeModeController();
114 DeleteSystemTrayDelegate(); 109 DeleteSystemTrayDelegate();
115 DeleteWindowSelectorController(); 110 DeleteWindowSelectorController();
116 DeleteMruWindowTracker(); 111 DeleteMruWindowTracker();
117 RemoveClientObserver(); 112 RemoveClientObserver();
118 WmShell::Set(nullptr); 113 WmShell::Set(nullptr);
119 } 114 }
120 115
121 // static 116 // static
122 WmShellMus* WmShellMus::Get() { 117 WmShellMus* WmShellMus::Get() {
123 return static_cast<WmShellMus*>(WmShell::Get()); 118 return static_cast<WmShellMus*>(WmShell::Get());
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 OnWindowActivated(gained_active, lost_active)); 323 OnWindowActivated(gained_active, lost_active));
329 } 324 }
330 325
331 void WmShellMus::OnDidDestroyClient(::mus::WindowTreeClient* client) { 326 void WmShellMus::OnDidDestroyClient(::mus::WindowTreeClient* client) {
332 DCHECK_EQ(client, client_); 327 DCHECK_EQ(client, client_);
333 RemoveClientObserver(); 328 RemoveClientObserver();
334 } 329 }
335 330
336 } // namespace mus 331 } // namespace mus
337 } // namespace ash 332 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698