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

Side by Side Diff: ash/aura/wm_shell_aura.cc

Issue 2739763003: Moves maintaining ShellObservers back to Shell (Closed)
Patch Set: merge Created 3 years, 9 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/aura/wm_shell_aura.h ('k') | ash/common/frame/header_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/aura/wm_shell_aura.h" 5 #include "ash/aura/wm_shell_aura.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "ash/aura/key_event_watcher_aura.h" 9 #include "ash/aura/key_event_watcher_aura.h"
10 #include "ash/aura/pointer_watcher_adapter.h" 10 #include "ash/aura/pointer_watcher_adapter.h"
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 217
218 std::unique_ptr<ImmersiveFullscreenController> 218 std::unique_ptr<ImmersiveFullscreenController>
219 WmShellAura::CreateImmersiveFullscreenController() { 219 WmShellAura::CreateImmersiveFullscreenController() {
220 return base::MakeUnique<ImmersiveFullscreenController>(); 220 return base::MakeUnique<ImmersiveFullscreenController>();
221 } 221 }
222 222
223 std::unique_ptr<KeyEventWatcher> WmShellAura::CreateKeyEventWatcher() { 223 std::unique_ptr<KeyEventWatcher> WmShellAura::CreateKeyEventWatcher() {
224 return base::MakeUnique<KeyEventWatcherAura>(); 224 return base::MakeUnique<KeyEventWatcherAura>();
225 } 225 }
226 226
227 void WmShellAura::OnOverviewModeStarting() {
228 for (auto& observer : *shell_observers())
229 observer.OnOverviewModeStarting();
230 }
231
232 void WmShellAura::OnOverviewModeEnded() {
233 for (auto& observer : *shell_observers())
234 observer.OnOverviewModeEnded();
235 }
236
237 SessionStateDelegate* WmShellAura::GetSessionStateDelegate() { 227 SessionStateDelegate* WmShellAura::GetSessionStateDelegate() {
238 return Shell::GetInstance()->session_state_delegate(); 228 return Shell::GetInstance()->session_state_delegate();
239 } 229 }
240 230
241 void WmShellAura::AddDisplayObserver(WmDisplayObserver* observer) { 231 void WmShellAura::AddDisplayObserver(WmDisplayObserver* observer) {
242 if (!added_display_observer_) { 232 if (!added_display_observer_) {
243 added_display_observer_ = true; 233 added_display_observer_ = true;
244 Shell::GetInstance()->window_tree_host_manager()->AddObserver(this); 234 Shell::GetInstance()->window_tree_host_manager()->AddObserver(this);
245 } 235 }
246 display_observers_.AddObserver(observer); 236 display_observers_.AddObserver(observer);
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 for (auto& observer : display_observers_) 295 for (auto& observer : display_observers_)
306 observer.OnDisplayConfigurationChanging(); 296 observer.OnDisplayConfigurationChanging();
307 } 297 }
308 298
309 void WmShellAura::OnDisplayConfigurationChanged() { 299 void WmShellAura::OnDisplayConfigurationChanged() {
310 for (auto& observer : display_observers_) 300 for (auto& observer : display_observers_)
311 observer.OnDisplayConfigurationChanged(); 301 observer.OnDisplayConfigurationChanged();
312 } 302 }
313 303
314 } // namespace ash 304 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/wm_shell_aura.h ('k') | ash/common/frame/header_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698