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

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

Issue 2420863002: Remove usage of FOR_EACH_OBSERVER macro in ash/aura (Closed)
Patch Set: Created 4 years, 2 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/pointer_watcher_adapter.cc ('k') | ash/aura/wm_window_aura.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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 #endif 301 #endif
302 302
303 void WmShellAura::OnWindowActivated( 303 void WmShellAura::OnWindowActivated(
304 aura::client::ActivationChangeObserver::ActivationReason reason, 304 aura::client::ActivationChangeObserver::ActivationReason reason,
305 aura::Window* gained_active, 305 aura::Window* gained_active,
306 aura::Window* lost_active) { 306 aura::Window* lost_active) {
307 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active); 307 WmWindow* gained_active_wm = WmWindowAura::Get(gained_active);
308 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active); 308 WmWindow* lost_active_wm = WmWindowAura::Get(lost_active);
309 if (gained_active_wm) 309 if (gained_active_wm)
310 set_root_window_for_new_windows(gained_active_wm->GetRootWindow()); 310 set_root_window_for_new_windows(gained_active_wm->GetRootWindow());
311 FOR_EACH_OBSERVER(WmActivationObserver, activation_observers_, 311 for (auto& observer : activation_observers_)
312 OnWindowActivated(gained_active_wm, lost_active_wm)); 312 observer.OnWindowActivated(gained_active_wm, lost_active_wm);
313 } 313 }
314 314
315 void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active, 315 void WmShellAura::OnAttemptToReactivateWindow(aura::Window* request_active,
316 aura::Window* actual_active) { 316 aura::Window* actual_active) {
317 FOR_EACH_OBSERVER( 317 for (auto& observer : activation_observers_)
Daniel Erat 2016/10/14 15:18:20 nit: you need to add curly brackets on this one
Eric Willigers 2016/10/14 20:16:50 Done.
318 WmActivationObserver, activation_observers_, 318 observer.OnAttemptToReactivateWindow(WmWindowAura::Get(request_active),
319 OnAttemptToReactivateWindow(WmWindowAura::Get(request_active), 319 WmWindowAura::Get(actual_active));
320 WmWindowAura::Get(actual_active)));
321 } 320 }
322 321
323 void WmShellAura::OnDisplayConfigurationChanging() { 322 void WmShellAura::OnDisplayConfigurationChanging() {
324 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 323 for (auto& observer : display_observers_)
325 OnDisplayConfigurationChanging()); 324 observer.OnDisplayConfigurationChanging();
326 } 325 }
327 326
328 void WmShellAura::OnDisplayConfigurationChanged() { 327 void WmShellAura::OnDisplayConfigurationChanged() {
329 FOR_EACH_OBSERVER(WmDisplayObserver, display_observers_, 328 for (auto& observer : display_observers_)
330 OnDisplayConfigurationChanged()); 329 observer.OnDisplayConfigurationChanged();
331 } 330 }
332 331
333 } // namespace ash 332 } // namespace ash
OLDNEW
« no previous file with comments | « ash/aura/pointer_watcher_adapter.cc ('k') | ash/aura/wm_window_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698