| OLD | NEW |
| 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 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ | 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ |
| 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ | 6 #define UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlcom.h> | 9 #include <atlcom.h> |
| 10 #include <oleacc.h> | 10 #include <oleacc.h> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 #include "third_party/iaccessible2/ia2_api_all.h" | 14 #include "third_party/iaccessible2/ia2_api_all.h" |
| 14 #include "ui/accessibility/ax_export.h" | 15 #include "ui/accessibility/ax_export.h" |
| 15 #include "ui/accessibility/ax_text_utils.h" | 16 #include "ui/accessibility/ax_text_utils.h" |
| 16 #include "ui/accessibility/platform/ax_platform_node_base.h" | 17 #include "ui/accessibility/platform/ax_platform_node_base.h" |
| 17 | 18 |
| 18 namespace ui { | 19 namespace ui { |
| 19 | 20 |
| 20 // A simple interface for a class that wants to be notified when IAccessible2 | 21 // A simple interface for a class that wants to be notified when IAccessible2 |
| 21 // is used by a client, a strong indication that full accessibility support | 22 // is used by a client, a strong indication that full accessibility support |
| 22 // should be enabled. | 23 // should be enabled. |
| 23 class AX_EXPORT IAccessible2UsageObserver { | 24 class AX_EXPORT IAccessible2UsageObserver { |
| 24 public: | 25 public: |
| 25 IAccessible2UsageObserver(); | 26 IAccessible2UsageObserver(); |
| 26 virtual ~IAccessible2UsageObserver(); | 27 virtual ~IAccessible2UsageObserver(); |
| 27 virtual void OnIAccessible2Used() = 0; | 28 virtual void OnIAccessible2Used() = 0; |
| 28 }; | 29 }; |
| 29 | 30 |
| 30 // Get an observer list that allows modules across the codebase to | 31 // Get an observer list that allows modules across the codebase to |
| 31 // listen to when usage of IAccessible2 is detected. | 32 // listen to when usage of IAccessible2 is detected. |
| 32 extern AX_EXPORT base::ObserverList<IAccessible2UsageObserver>& | 33 extern AX_EXPORT base::ObserverList<IAccessible2UsageObserver>& |
| 33 GetIAccessible2UsageObserverList(); | 34 GetIAccessible2UsageObserverList(); |
| 34 | 35 |
| 35 class __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) | 36 class AX_EXPORT __declspec(uuid("26f5641a-246d-457b-a96d-07f3fae6acf2")) |
| 36 AXPlatformNodeWin | 37 AXPlatformNodeWin |
| 37 : public CComObjectRootEx<CComMultiThreadModel>, | 38 : public NON_EXPORTED_BASE(CComObjectRootEx<CComMultiThreadModel>), |
| 38 public IDispatchImpl<IAccessible2_2, &IID_IAccessible2, | 39 public IDispatchImpl<IAccessible2_2, |
| 39 &LIBID_IAccessible2Lib>, | 40 &IID_IAccessible2, |
| 40 public IAccessibleText, | 41 &LIBID_IAccessible2Lib>, |
| 41 public IServiceProvider, | 42 public IAccessibleText, |
| 42 public AXPlatformNodeBase { | 43 public IServiceProvider, |
| 44 public NON_EXPORTED_BASE(AXPlatformNodeBase) { |
| 43 public: | 45 public: |
| 44 BEGIN_COM_MAP(AXPlatformNodeWin) | 46 BEGIN_COM_MAP(AXPlatformNodeWin) |
| 45 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2_2) | 47 COM_INTERFACE_ENTRY2(IDispatch, IAccessible2_2) |
| 46 COM_INTERFACE_ENTRY(AXPlatformNodeWin) | 48 COM_INTERFACE_ENTRY(AXPlatformNodeWin) |
| 47 COM_INTERFACE_ENTRY(IAccessible) | 49 COM_INTERFACE_ENTRY(IAccessible) |
| 48 COM_INTERFACE_ENTRY(IAccessible2) | 50 COM_INTERFACE_ENTRY(IAccessible2) |
| 49 COM_INTERFACE_ENTRY(IAccessible2_2) | 51 COM_INTERFACE_ENTRY(IAccessible2_2) |
| 50 COM_INTERFACE_ENTRY(IAccessibleText) | 52 COM_INTERFACE_ENTRY(IAccessibleText) |
| 51 COM_INTERFACE_ENTRY(IServiceProvider) | 53 COM_INTERFACE_ENTRY(IServiceProvider) |
| 52 END_COM_MAP() | 54 END_COM_MAP() |
| (...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 298 // return the offset of that boundary. | 300 // return the offset of that boundary. |
| 299 LONG FindBoundary(const base::string16& text, | 301 LONG FindBoundary(const base::string16& text, |
| 300 IA2TextBoundaryType ia2_boundary, | 302 IA2TextBoundaryType ia2_boundary, |
| 301 LONG start_offset, | 303 LONG start_offset, |
| 302 ui::TextBoundaryDirection direction); | 304 ui::TextBoundaryDirection direction); |
| 303 }; | 305 }; |
| 304 | 306 |
| 305 } // namespace ui | 307 } // namespace ui |
| 306 | 308 |
| 307 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ | 309 #endif // UI_ACCESSIBILITY_PLATFORM_AX_PLATFORM_NODE_WIN_H_ |
| OLD | NEW |