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

Side by Side Diff: ui/accessibility/platform/ax_platform_node_win.cc

Issue 2422073002: Reduce FOR_EACH_OBSERVER usage in ui/ (Closed)
Patch Set: remove space 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 | « no previous file | ui/android/window_android.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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <atlbase.h> 5 #include <atlbase.h>
6 #include <atlcom.h> 6 #include <atlcom.h>
7 #include <limits.h> 7 #include <limits.h>
8 #include <oleacc.h> 8 #include <oleacc.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 881 matching lines...) Expand 10 before | Expand all | Expand 10 after
892 892
893 // 893 //
894 // IServiceProvider implementation. 894 // IServiceProvider implementation.
895 // 895 //
896 896
897 STDMETHODIMP AXPlatformNodeWin::QueryService( 897 STDMETHODIMP AXPlatformNodeWin::QueryService(
898 REFGUID guidService, REFIID riid, void** object) { 898 REFGUID guidService, REFIID riid, void** object) {
899 COM_OBJECT_VALIDATE_1_ARG(object); 899 COM_OBJECT_VALIDATE_1_ARG(object);
900 900
901 if (riid == IID_IAccessible2) { 901 if (riid == IID_IAccessible2) {
902 FOR_EACH_OBSERVER(IAccessible2UsageObserver, 902 for (IAccessible2UsageObserver& observer :
903 GetIAccessible2UsageObserverList(), 903 GetIAccessible2UsageObserverList()) {
904 OnIAccessible2Used()); 904 observer.OnIAccessible2Used();
905 }
905 } 906 }
906 907
907 if (guidService == IID_IAccessible || 908 if (guidService == IID_IAccessible ||
908 guidService == IID_IAccessible2 || 909 guidService == IID_IAccessible2 ||
909 guidService == IID_IAccessible2_2 || 910 guidService == IID_IAccessible2_2 ||
910 guidService == IID_IAccessibleText) { 911 guidService == IID_IAccessibleText) {
911 return QueryInterface(riid, object); 912 return QueryInterface(riid, object);
912 } 913 }
913 914
914 *object = nullptr; 915 *object = nullptr;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 ui::TextBoundaryDirection direction) { 1147 ui::TextBoundaryDirection direction) {
1147 HandleSpecialTextOffset(text, &start_offset); 1148 HandleSpecialTextOffset(text, &start_offset);
1148 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1149 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1149 std::vector<int32_t> line_breaks; 1150 std::vector<int32_t> line_breaks;
1150 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1151 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1151 text, line_breaks, boundary, start_offset, direction, 1152 text, line_breaks, boundary, start_offset, direction,
1152 AX_TEXT_AFFINITY_DOWNSTREAM)); 1153 AX_TEXT_AFFINITY_DOWNSTREAM));
1153 } 1154 }
1154 1155
1155 } // namespace ui 1156 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/android/window_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698