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

Side by Side Diff: components/exo/wm_helper.cc

Issue 2407303003: exo: Use WMHelper to access ash accessibility related features. (Closed)
Patch Set: Fix compile errors. 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
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 "components/exo/wm_helper.h" 5 #include "components/exo/wm_helper.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 8
9 namespace exo { 9 namespace exo {
10 namespace { 10 namespace {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 } 55 }
56 56
57 void WMHelper::AddMaximizeModeObserver(MaximizeModeObserver* observer) { 57 void WMHelper::AddMaximizeModeObserver(MaximizeModeObserver* observer) {
58 maximize_mode_observers_.AddObserver(observer); 58 maximize_mode_observers_.AddObserver(observer);
59 } 59 }
60 60
61 void WMHelper::RemoveMaximizeModeObserver(MaximizeModeObserver* observer) { 61 void WMHelper::RemoveMaximizeModeObserver(MaximizeModeObserver* observer) {
62 maximize_mode_observers_.RemoveObserver(observer); 62 maximize_mode_observers_.RemoveObserver(observer);
63 } 63 }
64 64
65 void WMHelper::AddAccessibilityObserver(AccessibilityObserver* observer) {
66 accessibility_observers_.AddObserver(observer);
67 }
68
69 void WMHelper::RemoveAccessibilityObserver(AccessibilityObserver* observer) {
70 accessibility_observers_.RemoveObserver(observer);
71 }
72
65 void WMHelper::NotifyWindowActivated(aura::Window* gained_active, 73 void WMHelper::NotifyWindowActivated(aura::Window* gained_active,
66 aura::Window* lost_active) { 74 aura::Window* lost_active) {
67 FOR_EACH_OBSERVER(ActivationObserver, activation_observers_, 75 FOR_EACH_OBSERVER(ActivationObserver, activation_observers_,
68 OnWindowActivated(gained_active, lost_active)); 76 OnWindowActivated(gained_active, lost_active));
69 } 77 }
70 78
71 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus, 79 void WMHelper::NotifyWindowFocused(aura::Window* gained_focus,
72 aura::Window* lost_focus) { 80 aura::Window* lost_focus) {
73 FOR_EACH_OBSERVER(FocusObserver, focus_observers_, 81 FOR_EACH_OBSERVER(FocusObserver, focus_observers_,
74 OnWindowFocused(gained_focus, lost_focus)); 82 OnWindowFocused(gained_focus, lost_focus));
(...skipping 12 matching lines...) Expand all
87 void WMHelper::NotifyMaximizeModeStarted() { 95 void WMHelper::NotifyMaximizeModeStarted() {
88 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_, 96 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_,
89 OnMaximizeModeStarted()); 97 OnMaximizeModeStarted());
90 } 98 }
91 99
92 void WMHelper::NotifyMaximizeModeEnded() { 100 void WMHelper::NotifyMaximizeModeEnded() {
93 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_, 101 FOR_EACH_OBSERVER(MaximizeModeObserver, maximize_mode_observers_,
94 OnMaximizeModeEnded()); 102 OnMaximizeModeEnded());
95 } 103 }
96 104
105 void WMHelper::NotifyAccessibilityModeChanged() {
106 FOR_EACH_OBSERVER(AccessibilityObserver, accessibility_observers_,
107 OnAccessibilityModeChanged());
108 }
109
97 } // namespace exo 110 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698