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

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

Issue 2422073002: Reduce FOR_EACH_OBSERVER usage in ui/ (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 | « 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 (auto& observer : GetIAccessible2UsageObserverList())
sky 2016/10/17 15:30:55 Please do not use auto& in any of these but the re
Eric Willigers 2016/10/18 00:02:50 Done.
903 GetIAccessible2UsageObserverList(), 903 observer.OnIAccessible2Used();
904 OnIAccessible2Used());
905 } 904 }
906 905
907 if (guidService == IID_IAccessible || 906 if (guidService == IID_IAccessible ||
908 guidService == IID_IAccessible2 || 907 guidService == IID_IAccessible2 ||
909 guidService == IID_IAccessible2_2 || 908 guidService == IID_IAccessible2_2 ||
910 guidService == IID_IAccessibleText) { 909 guidService == IID_IAccessibleText) {
911 return QueryInterface(riid, object); 910 return QueryInterface(riid, object);
912 } 911 }
913 912
914 *object = nullptr; 913 *object = nullptr;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 ui::TextBoundaryDirection direction) { 1145 ui::TextBoundaryDirection direction) {
1147 HandleSpecialTextOffset(text, &start_offset); 1146 HandleSpecialTextOffset(text, &start_offset);
1148 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary); 1147 ui::TextBoundaryType boundary = IA2TextBoundaryToTextBoundary(ia2_boundary);
1149 std::vector<int32_t> line_breaks; 1148 std::vector<int32_t> line_breaks;
1150 return static_cast<LONG>(ui::FindAccessibleTextBoundary( 1149 return static_cast<LONG>(ui::FindAccessibleTextBoundary(
1151 text, line_breaks, boundary, start_offset, direction, 1150 text, line_breaks, boundary, start_offset, direction,
1152 AX_TEXT_AFFINITY_DOWNSTREAM)); 1151 AX_TEXT_AFFINITY_DOWNSTREAM));
1153 } 1152 }
1154 1153
1155 } // namespace ui 1154 } // 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