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

Side by Side Diff: ash/common/wm_shell.cc

Issue 2098023002: mash: Migrate remaining tray observers and notify functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Sync and rebase. 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
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/common/wm_shell.h" 5 #include "ash/common/wm_shell.h"
6 6
7 #include "ash/common/focus_cycler.h" 7 #include "ash/common/focus_cycler.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/system/tray/system_tray_delegate.h" 9 #include "ash/common/system/tray/system_tray_delegate.h"
10 #include "ash/common/system/tray/wm_system_tray_notifier.h" 10 #include "ash/common/system/tray/system_tray_notifier.h"
11 #include "ash/common/wm/overview/window_selector_controller.h" 11 #include "ash/common/wm/overview/window_selector_controller.h"
12 #include "ash/common/wm_window.h" 12 #include "ash/common/wm_window.h"
13 #include "base/logging.h" 13 #include "base/logging.h"
14 14
15 namespace ash { 15 namespace ash {
16 16
17 // static 17 // static
18 WmShell* WmShell::instance_ = nullptr; 18 WmShell* WmShell::instance_ = nullptr;
19 19
20 // static 20 // static
21 void WmShell::Set(WmShell* instance) { 21 void WmShell::Set(WmShell* instance) {
22 instance_ = instance; 22 instance_ = instance;
23 } 23 }
24 24
25 // static 25 // static
26 WmShell* WmShell::Get() { 26 WmShell* WmShell::Get() {
27 return instance_; 27 return instance_;
28 } 28 }
29 29
30 WmShell::WmShell() 30 WmShell::WmShell()
31 : focus_cycler_(new FocusCycler), 31 : focus_cycler_(new FocusCycler),
32 system_tray_notifier_(new WmSystemTrayNotifier), 32 system_tray_notifier_(new SystemTrayNotifier),
33 window_selector_controller_(new WindowSelectorController()) {} 33 window_selector_controller_(new WindowSelectorController()) {}
34 34
35 WmShell::~WmShell() {} 35 WmShell::~WmShell() {}
36 36
37 bool WmShell::IsSystemModalWindowOpen() { 37 bool WmShell::IsSystemModalWindowOpen() {
38 if (simulate_modal_window_open_for_testing_) 38 if (simulate_modal_window_open_for_testing_)
39 return true; 39 return true;
40 40
41 // Traverse all system modal containers, and find its direct child window 41 // Traverse all system modal containers, and find its direct child window
42 // with "SystemModal" setting, and visible. 42 // with "SystemModal" setting, and visible.
(...skipping 23 matching lines...) Expand all
66 system_tray_delegate_->Shutdown(); 66 system_tray_delegate_->Shutdown();
67 system_tray_delegate_.reset(); 67 system_tray_delegate_.reset();
68 } 68 }
69 } 69 }
70 70
71 void WmShell::DeleteWindowSelectorController() { 71 void WmShell::DeleteWindowSelectorController() {
72 window_selector_controller_.reset(); 72 window_selector_controller_.reset();
73 } 73 }
74 74
75 } // namespace ash 75 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/root_window_controller.cc » ('j') | ash/shell.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698