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

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

Issue 2118593002: mash: Migrate ShellDelegate ownership and access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. 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 | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/window_manager.cc » ('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/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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 bool screen_locked_; 85 bool screen_locked_;
86 86
87 // A pseudo user info. 87 // A pseudo user info.
88 std::unique_ptr<user_manager::UserInfo> user_info_; 88 std::unique_ptr<user_manager::UserInfo> user_info_;
89 89
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(::ui::WindowTreeClient* client) 95 WmShellMus::WmShellMus(ShellDelegate* delegate, ::ui::WindowTreeClient* client)
96 : client_(client), session_state_delegate_(new SessionStateDelegateStub) { 96 : WmShell(delegate),
97 client_(client),
98 session_state_delegate_(new SessionStateDelegateStub) {
97 client_->AddObserver(this); 99 client_->AddObserver(this);
98 WmShell::Set(this); 100 WmShell::Set(this);
99 101
100 CreateMruWindowTracker(); 102 CreateMruWindowTracker();
101 103
102 accessibility_delegate_.reset(new DefaultAccessibilityDelegate); 104 accessibility_delegate_.reset(new DefaultAccessibilityDelegate);
103 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); 105 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate));
104 } 106 }
105 107
106 WmShellMus::~WmShellMus() { 108 WmShellMus::~WmShellMus() {
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 OnWindowActivated(gained_active, lost_active)); 325 OnWindowActivated(gained_active, lost_active));
324 } 326 }
325 327
326 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) { 328 void WmShellMus::OnDidDestroyClient(::ui::WindowTreeClient* client) {
327 DCHECK_EQ(client, client_); 329 DCHECK_EQ(client, client_);
328 RemoveClientObserver(); 330 RemoveClientObserver();
329 } 331 }
330 332
331 } // namespace mus 333 } // namespace mus
332 } // namespace ash 334 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_shell_mus.h ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698