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

Side by Side Diff: ash/common/wm_shell.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/common/wm_shell.h ('k') | ash/content/keyboard_overlay/keyboard_overlay_view_unittest.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/keyboard/keyboard_ui.h" 8 #include "ash/common/keyboard/keyboard_ui.h"
9 #include "ash/common/shell_delegate.h"
9 #include "ash/common/shell_window_ids.h" 10 #include "ash/common/shell_window_ids.h"
10 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h" 11 #include "ash/common/system/chromeos/session/logout_confirmation_controller.h"
11 #include "ash/common/system/tray/system_tray_delegate.h" 12 #include "ash/common/system/tray/system_tray_delegate.h"
12 #include "ash/common/system/tray/system_tray_notifier.h" 13 #include "ash/common/system/tray/system_tray_notifier.h"
13 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 14 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
14 #include "ash/common/wm/mru_window_tracker.h" 15 #include "ash/common/wm/mru_window_tracker.h"
15 #include "ash/common/wm/overview/window_selector_controller.h" 16 #include "ash/common/wm/overview/window_selector_controller.h"
16 #include "ash/common/wm_window.h" 17 #include "ash/common/wm_window.h"
17 #include "base/bind.h" 18 #include "base/bind.h"
18 #include "base/logging.h" 19 #include "base/logging.h"
(...skipping 27 matching lines...) Expand all
46 } 47 }
47 48
48 void WmShell::AddShellObserver(ShellObserver* observer) { 49 void WmShell::AddShellObserver(ShellObserver* observer) {
49 shell_observers_.AddObserver(observer); 50 shell_observers_.AddObserver(observer);
50 } 51 }
51 52
52 void WmShell::RemoveShellObserver(ShellObserver* observer) { 53 void WmShell::RemoveShellObserver(ShellObserver* observer) {
53 shell_observers_.RemoveObserver(observer); 54 shell_observers_.RemoveObserver(observer);
54 } 55 }
55 56
56 WmShell::WmShell() 57 WmShell::WmShell(ShellDelegate* delegate)
57 : focus_cycler_(new FocusCycler), 58 : delegate_(delegate),
59 focus_cycler_(new FocusCycler),
58 system_tray_notifier_(new SystemTrayNotifier), 60 system_tray_notifier_(new SystemTrayNotifier),
59 window_selector_controller_(new WindowSelectorController()) {} 61 window_selector_controller_(new WindowSelectorController()) {}
60 62
61 WmShell::~WmShell() {} 63 WmShell::~WmShell() {}
62 64
63 bool WmShell::IsSystemModalWindowOpen() { 65 bool WmShell::IsSystemModalWindowOpen() {
64 if (simulate_modal_window_open_for_testing_) 66 if (simulate_modal_window_open_for_testing_)
65 return true; 67 return true;
66 68
67 // Traverse all system modal containers, and find its direct child window 69 // Traverse all system modal containers, and find its direct child window
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 126
125 void WmShell::CreateMruWindowTracker() { 127 void WmShell::CreateMruWindowTracker() {
126 mru_window_tracker_.reset(new MruWindowTracker); 128 mru_window_tracker_.reset(new MruWindowTracker);
127 } 129 }
128 130
129 void WmShell::DeleteMruWindowTracker() { 131 void WmShell::DeleteMruWindowTracker() {
130 mru_window_tracker_.reset(); 132 mru_window_tracker_.reset();
131 } 133 }
132 134
133 } // namespace ash 135 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/content/keyboard_overlay/keyboard_overlay_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698