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

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

Issue 2041423002: Moves MruWindowTracker to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_mru_window_tracker
Patch Set: merge Created 4 years, 6 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/mus/bridge/wm_shell_mus.h ('k') | ash/shell.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 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/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm/window_resizer.h" 9 #include "ash/common/wm/window_resizer.h"
10 #include "ash/common/wm_activation_observer.h" 10 #include "ash/common/wm_activation_observer.h"
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub); 83 DISALLOW_COPY_AND_ASSIGN(SessionStateDelegateStub);
84 }; 84 };
85 85
86 } // namespace 86 } // namespace
87 87
88 WmShellMus::WmShellMus(::mus::WindowTreeClient* client) 88 WmShellMus::WmShellMus(::mus::WindowTreeClient* client)
89 : client_(client), session_state_delegate_(new SessionStateDelegateStub) { 89 : client_(client), session_state_delegate_(new SessionStateDelegateStub) {
90 client_->AddObserver(this); 90 client_->AddObserver(this);
91 WmShell::Set(this); 91 WmShell::Set(this);
92
93 CreateMruWindowTracker();
92 } 94 }
93 95
94 WmShellMus::~WmShellMus() { 96 WmShellMus::~WmShellMus() {
97 DeleteMruWindowTracker();
95 RemoveClientObserver(); 98 RemoveClientObserver();
96 WmShell::Set(nullptr); 99 WmShell::Set(nullptr);
97 } 100 }
98 101
99 // static 102 // static
100 WmShellMus* WmShellMus::Get() { 103 WmShellMus* WmShellMus::Get() {
101 return static_cast<WmShellMus*>(WmShell::Get()); 104 return static_cast<WmShellMus*>(WmShell::Get());
102 } 105 }
103 106
104 void WmShellMus::AddRootWindowController( 107 void WmShellMus::AddRootWindowController(
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 156
154 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) { 157 WmWindow* WmShellMus::GetRootWindowForDisplayId(int64_t display_id) {
155 return GetRootWindowControllerWithDisplayId(display_id)->GetWindow(); 158 return GetRootWindowControllerWithDisplayId(display_id)->GetWindow();
156 } 159 }
157 160
158 WmWindow* WmShellMus::GetRootWindowForNewWindows() { 161 WmWindow* WmShellMus::GetRootWindowForNewWindows() {
159 NOTIMPLEMENTED(); 162 NOTIMPLEMENTED();
160 return root_window_controllers_[0]->GetWindow(); 163 return root_window_controllers_[0]->GetWindow();
161 } 164 }
162 165
163 std::vector<WmWindow*> WmShellMus::GetMruWindowList() {
164 NOTIMPLEMENTED();
165 return std::vector<WmWindow*>();
166 }
167
168 std::vector<WmWindow*> WmShellMus::GetMruWindowListIgnoreModals() {
169 NOTIMPLEMENTED();
170 return std::vector<WmWindow*>();
171 }
172
173 bool WmShellMus::IsForceMaximizeOnFirstRun() { 166 bool WmShellMus::IsForceMaximizeOnFirstRun() {
174 NOTIMPLEMENTED(); 167 NOTIMPLEMENTED();
175 return false; 168 return false;
176 } 169 }
177 170
178 bool WmShellMus::CanShowWindowForUser(WmWindow* window) { 171 bool WmShellMus::CanShowWindowForUser(WmWindow* window) {
179 NOTIMPLEMENTED(); 172 NOTIMPLEMENTED();
180 return true; 173 return true;
181 } 174 }
182 175
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 OnWindowActivated(gained_active, lost_active)); 263 OnWindowActivated(gained_active, lost_active));
271 } 264 }
272 265
273 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { 266 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) {
274 DCHECK_EQ(client, client_); 267 DCHECK_EQ(client, client_);
275 RemoveClientObserver(); 268 RemoveClientObserver();
276 } 269 }
277 270
278 } // namespace mus 271 } // namespace mus
279 } // namespace ash 272 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698