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

Side by Side Diff: ui/accessibility/platform/ax_fake_caret_win.h

Issue 2933353002: Forward four more BrowserAccessibility APIs to AXPlatformNode. (Closed)
Patch Set: Use SkColor.h instead Created 3 years, 6 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 | « ui/accessibility/DEPS ('k') | ui/accessibility/platform/ax_fake_caret_win.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 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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_FAKE_CARET_WIN_H_ 5 #ifndef UI_ACCESSIBILITY_PLATFORM_AX_FAKE_CARET_WIN_H_
6 #define UI_ACCESSIBILITY_PLATFORM_AX_FAKE_CARET_WIN_H_ 6 #define UI_ACCESSIBILITY_PLATFORM_AX_FAKE_CARET_WIN_H_
7 7
8 #include <oleacc.h> 8 #include <oleacc.h>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "base/win/scoped_comptr.h" 11 #include "base/win/scoped_comptr.h"
12 #include "ui/accessibility/ax_export.h" 12 #include "ui/accessibility/ax_export.h"
13 #include "ui/accessibility/ax_node_data.h" 13 #include "ui/accessibility/ax_node_data.h"
14 #include "ui/accessibility/ax_tree_data.h"
14 #include "ui/accessibility/platform/ax_platform_node_delegate.h" 15 #include "ui/accessibility/platform/ax_platform_node_delegate.h"
15 #include "ui/gfx/geometry/rect.h" 16 #include "ui/gfx/geometry/rect.h"
16 #include "ui/gfx/native_widget_types.h" 17 #include "ui/gfx/native_widget_types.h"
17 18
18 namespace ui { 19 namespace ui {
19 20
20 class AXPlatformNodeWin; 21 class AXPlatformNodeWin;
21 22
22 // A class representing the position of the caret to assistive software on 23 // A class representing the position of the caret to assistive software on
23 // Windows. This is required because Chrome doesn't use the standard system 24 // Windows. This is required because Chrome doesn't use the standard system
24 // caret and because some assistive software still relies on specific 25 // caret and because some assistive software still relies on specific
25 // accessibility APIs to retrieve the caret position. 26 // accessibility APIs to retrieve the caret position.
26 class AX_EXPORT AXFakeCaretWin : private AXPlatformNodeDelegate { 27 class AX_EXPORT AXFakeCaretWin : private AXPlatformNodeDelegate {
27 public: 28 public:
28 AXFakeCaretWin(gfx::AcceleratedWidget event_target); 29 AXFakeCaretWin(gfx::AcceleratedWidget event_target);
29 virtual ~AXFakeCaretWin(); 30 virtual ~AXFakeCaretWin();
30 31
31 base::win::ScopedComPtr<IAccessible> GetCaret() const; 32 base::win::ScopedComPtr<IAccessible> GetCaret() const;
32 void MoveCaretTo(const gfx::Rect& bounds); 33 void MoveCaretTo(const gfx::Rect& bounds);
33 34
34 private: 35 private:
35 // |AXPlatformNodeDelegate| members. 36 // |AXPlatformNodeDelegate| members.
36 const AXNodeData& GetData() const override; 37 const AXNodeData& GetData() const override;
38 const ui::AXTreeData& GetTreeData() const override;
37 gfx::NativeWindow GetTopLevelWidget() override; 39 gfx::NativeWindow GetTopLevelWidget() override;
38 gfx::NativeViewAccessible GetParent() override; 40 gfx::NativeViewAccessible GetParent() override;
39 int GetChildCount() override; 41 int GetChildCount() override;
40 gfx::NativeViewAccessible ChildAtIndex(int index) override; 42 gfx::NativeViewAccessible ChildAtIndex(int index) override;
41 gfx::Rect GetScreenBoundsRect() const override; 43 gfx::Rect GetScreenBoundsRect() const override;
42 gfx::NativeViewAccessible HitTestSync(int x, int y) override; 44 gfx::NativeViewAccessible HitTestSync(int x, int y) override;
43 gfx::NativeViewAccessible GetFocus() override; 45 gfx::NativeViewAccessible GetFocus() override;
44 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override; 46 gfx::AcceleratedWidget GetTargetForNativeAccessibilityEvent() override;
45 bool AccessibilityPerformAction(const ui::AXActionData& data) override; 47 bool AccessibilityPerformAction(const ui::AXActionData& data) override;
46 48
47 AXPlatformNodeWin* caret_; 49 AXPlatformNodeWin* caret_;
48 gfx::AcceleratedWidget event_target_; 50 gfx::AcceleratedWidget event_target_;
49 AXNodeData data_; 51 AXNodeData data_;
50 52
51 friend class AXPlatformNodeWin; 53 friend class AXPlatformNodeWin;
52 DISALLOW_COPY_AND_ASSIGN(AXFakeCaretWin); 54 DISALLOW_COPY_AND_ASSIGN(AXFakeCaretWin);
53 }; 55 };
54 56
55 } // namespace ui 57 } // namespace ui
56 58
57 #endif // UI_ACCESSIBILITY_PLATFORM_AX_FAKE_CARET_WIN_H_ 59 #endif // UI_ACCESSIBILITY_PLATFORM_AX_FAKE_CARET_WIN_H_
OLDNEW
« no previous file with comments | « ui/accessibility/DEPS ('k') | ui/accessibility/platform/ax_fake_caret_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698