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

Side by Side Diff: ash/mus/keyboard_ui_mus.cc

Issue 2421853003: Remove usage of FOR_EACH_OBSERVER macro in ash/ (Closed)
Patch Set: shell_observers 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/mus/bridge/wm_window_mus.cc ('k') | ash/mus/window_manager.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/mus/keyboard_ui_mus.h" 5 #include "ash/mus/keyboard_ui_mus.h"
6 6
7 #include "ash/common/keyboard/keyboard_ui_observer.h" 7 #include "ash/common/keyboard/keyboard_ui_observer.h"
8 #include "base/memory/ptr_util.h" 8 #include "base/memory/ptr_util.h"
9 #include "services/shell/public/cpp/connector.h" 9 #include "services/shell/public/cpp/connector.h"
10 10
(...skipping 29 matching lines...) Expand all
40 } 40 }
41 41
42 void KeyboardUIMus::OnKeyboardStateChanged(bool is_enabled, 42 void KeyboardUIMus::OnKeyboardStateChanged(bool is_enabled,
43 bool is_visible, 43 bool is_visible,
44 uint64_t display_id, 44 uint64_t display_id,
45 const gfx::Rect& bounds) { 45 const gfx::Rect& bounds) {
46 if (is_enabled_ == is_enabled) 46 if (is_enabled_ == is_enabled)
47 return; 47 return;
48 48
49 is_enabled_ = is_enabled; 49 is_enabled_ = is_enabled;
50 FOR_EACH_OBSERVER(KeyboardUIObserver, *observers(), 50 for (auto& observer : *observers())
51 OnKeyboardEnabledStateChanged(is_enabled)); 51 observer.OnKeyboardEnabledStateChanged(is_enabled);
52 } 52 }
53 53
54 } // namespace ash 54 } // namespace ash
OLDNEW
« no previous file with comments | « ash/mus/bridge/wm_window_mus.cc ('k') | ash/mus/window_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698