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

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

Issue 2108793002: mash: Convert system tray logout button to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more review comments, fix mash_unittests 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/common/wm_shell.cc ('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/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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 WmShell::Set(this); 97 WmShell::Set(this);
98 98
99 wm_shell_common_.reset(new WmShellCommon); 99 wm_shell_common_.reset(new WmShellCommon);
100 wm_shell_common_->CreateMruWindowTracker(); 100 wm_shell_common_->CreateMruWindowTracker();
101 101
102 accessibility_delegate_.reset(new DefaultAccessibilityDelegate); 102 accessibility_delegate_.reset(new DefaultAccessibilityDelegate);
103 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate)); 103 SetSystemTrayDelegate(base::WrapUnique(new DefaultSystemTrayDelegate));
104 } 104 }
105 105
106 WmShellMus::~WmShellMus() { 106 WmShellMus::~WmShellMus() {
107 SetSystemTrayDelegate(nullptr); 107 DeleteSystemTrayDelegate();
108 DeleteWindowSelectorController(); 108 DeleteWindowSelectorController();
109 wm_shell_common_->DeleteMruWindowTracker(); 109 wm_shell_common_->DeleteMruWindowTracker();
110 RemoveClientObserver(); 110 RemoveClientObserver();
111 WmShell::Set(nullptr); 111 WmShell::Set(nullptr);
112 } 112 }
113 113
114 // static 114 // static
115 WmShellMus* WmShellMus::Get() { 115 WmShellMus* WmShellMus::Get() {
116 return static_cast<WmShellMus*>(WmShell::Get()); 116 return static_cast<WmShellMus*>(WmShell::Get());
117 } 117 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 OnWindowActivated(gained_active, lost_active)); 313 OnWindowActivated(gained_active, lost_active));
314 } 314 }
315 315
316 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) { 316 void WmShellMus::OnWillDestroyClient(::mus::WindowTreeClient* client) {
317 DCHECK_EQ(client, client_); 317 DCHECK_EQ(client, client_);
318 RemoveClientObserver(); 318 RemoveClientObserver();
319 } 319 }
320 320
321 } // namespace mus 321 } // namespace mus
322 } // namespace ash 322 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.cc ('k') | ash/shell.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698