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

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

Issue 2171493002: Moves ToastManager from Shell to WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove include 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/mus/bridge/wm_shell_mus.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 <utility> 7 #include <utility>
8 8
9 #include "ash/common/accessibility_delegate.h" 9 #include "ash/common/accessibility_delegate.h"
10 #include "ash/common/focus_cycler.h" 10 #include "ash/common/focus_cycler.h"
11 #include "ash/common/keyboard/keyboard_ui.h" 11 #include "ash/common/keyboard/keyboard_ui.h"
12 #include "ash/common/shell_delegate.h" 12 #include "ash/common/shell_delegate.h"
13 #include "ash/common/shell_window_ids.h" 13 #include "ash/common/shell_window_ids.h"
14 #include "ash/common/system/brightness_control_delegate.h" 14 #include "ash/common/system/brightness_control_delegate.h"
15 #include "ash/common/system/keyboard_brightness_control_delegate.h" 15 #include "ash/common/system/keyboard_brightness_control_delegate.h"
16 #include "ash/common/system/toast/toast_manager.h"
16 #include "ash/common/system/tray/system_tray_delegate.h" 17 #include "ash/common/system/tray/system_tray_delegate.h"
17 #include "ash/common/system/tray/system_tray_notifier.h" 18 #include "ash/common/system/tray/system_tray_notifier.h"
18 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" 19 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h"
19 #include "ash/common/wm/mru_window_tracker.h" 20 #include "ash/common/wm/mru_window_tracker.h"
20 #include "ash/common/wm/overview/window_selector_controller.h" 21 #include "ash/common/wm/overview/window_selector_controller.h"
21 #include "ash/common/wm/window_cycle_controller.h" 22 #include "ash/common/wm/window_cycle_controller.h"
22 #include "ash/common/wm_window.h" 23 #include "ash/common/wm_window.h"
23 #include "base/bind.h" 24 #include "base/bind.h"
24 #include "base/logging.h" 25 #include "base/logging.h"
25 26
(...skipping 16 matching lines...) Expand all
42 // static 43 // static
43 WmShell* WmShell::Get() { 44 WmShell* WmShell::Get() {
44 return instance_; 45 return instance_;
45 } 46 }
46 47
47 void WmShell::Initialize() { 48 void WmShell::Initialize() {
48 // Some delegates access WmShell during their construction. Create them here 49 // Some delegates access WmShell during their construction. Create them here
49 // instead of the WmShell constructor. 50 // instead of the WmShell constructor.
50 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate()); 51 accessibility_delegate_.reset(delegate_->CreateAccessibilityDelegate());
51 media_delegate_.reset(delegate_->CreateMediaDelegate()); 52 media_delegate_.reset(delegate_->CreateMediaDelegate());
53 toast_manager_.reset(new ToastManager);
52 } 54 }
53 55
54 void WmShell::Shutdown() { 56 void WmShell::Shutdown() {
55 // Accesses WmShell in its destructor. 57 // Accesses WmShell in its destructor.
56 accessibility_delegate_.reset(); 58 accessibility_delegate_.reset();
57 } 59 }
58 60
59 void WmShell::OnMaximizeModeStarted() { 61 void WmShell::OnMaximizeModeStarted() {
60 FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeStarted()); 62 FOR_EACH_OBSERVER(ShellObserver, shell_observers_, OnMaximizeModeStarted());
61 } 63 }
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 } 161 }
160 162
161 void WmShell::CreateMruWindowTracker() { 163 void WmShell::CreateMruWindowTracker() {
162 mru_window_tracker_.reset(new MruWindowTracker); 164 mru_window_tracker_.reset(new MruWindowTracker);
163 } 165 }
164 166
165 void WmShell::DeleteMruWindowTracker() { 167 void WmShell::DeleteMruWindowTracker() {
166 mru_window_tracker_.reset(); 168 mru_window_tracker_.reset();
167 } 169 }
168 170
171 void WmShell::DeleteToastManager() {
172 toast_manager_.reset();
173 }
174
169 } // namespace ash 175 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm_shell.h ('k') | ash/mus/bridge/wm_shell_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698