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

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

Issue 2084503007: Moves WindowSelectorController onto WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_overview
Patch Set: fix mash 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/common/wm_shell.h ('k') | ash/desktop_background/desktop_background_view.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/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/wm_system_tray_notifier.h"
11 #include "ash/common/wm/overview/window_selector_controller.h"
11 #include "ash/common/wm_window.h" 12 #include "ash/common/wm_window.h"
12 #include "base/logging.h" 13 #include "base/logging.h"
13 14
14 namespace ash { 15 namespace ash {
15 16
16 // static 17 // static
17 WmShell* WmShell::instance_ = nullptr; 18 WmShell* WmShell::instance_ = nullptr;
18 19
19 // static 20 // static
20 void WmShell::Set(WmShell* instance) { 21 void WmShell::Set(WmShell* instance) {
21 instance_ = instance; 22 instance_ = instance;
22 } 23 }
23 24
24 // static 25 // static
25 WmShell* WmShell::Get() { 26 WmShell* WmShell::Get() {
26 return instance_; 27 return instance_;
27 } 28 }
28 29
29 WmShell::WmShell() 30 WmShell::WmShell()
30 : focus_cycler_(new FocusCycler), 31 : focus_cycler_(new FocusCycler),
31 system_tray_notifier_(new WmSystemTrayNotifier) {} 32 system_tray_notifier_(new WmSystemTrayNotifier),
33 window_selector_controller_(new WindowSelectorController()) {}
32 34
33 WmShell::~WmShell() {} 35 WmShell::~WmShell() {}
34 36
35 bool WmShell::IsSystemModalWindowOpen() { 37 bool WmShell::IsSystemModalWindowOpen() {
36 if (simulate_modal_window_open_for_testing_) 38 if (simulate_modal_window_open_for_testing_)
37 return true; 39 return true;
38 40
39 // Traverse all system modal containers, and find its direct child window 41 // Traverse all system modal containers, and find its direct child window
40 // with "SystemModal" setting, and visible. 42 // with "SystemModal" setting, and visible.
41 for (WmWindow* root : GetAllRootWindows()) { 43 for (WmWindow* root : GetAllRootWindows()) {
(...skipping 17 matching lines...) Expand all
59 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common. 61 // TODO(jamescook): Create via ShellDelegate once it moves to //ash/common.
60 system_tray_delegate_ = std::move(delegate); 62 system_tray_delegate_ = std::move(delegate);
61 system_tray_delegate_->Initialize(); 63 system_tray_delegate_->Initialize();
62 } else { 64 } else {
63 DCHECK(system_tray_delegate_); 65 DCHECK(system_tray_delegate_);
64 system_tray_delegate_->Shutdown(); 66 system_tray_delegate_->Shutdown();
65 system_tray_delegate_.reset(); 67 system_tray_delegate_.reset();
66 } 68 }
67 } 69 }
68 70
71 void WmShell::DeleteWindowSelectorController() {
72 window_selector_controller_.reset();
73 }
74
69 } // namespace ash 75 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/desktop_background/desktop_background_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698