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

Side by Side Diff: content/renderer/accessibility/render_accessibility_impl.h

Issue 2430473003: Revert of Create AXAction and AXActionData as a way to simplify accessibility actions (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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ 5 #ifndef CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_ 6 #define CONTENT_RENDERER_ACCESSIBILITY_RENDER_ACCESSIBILITY_IMPL_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/containers/hash_tables.h" 10 #include "base/containers/hash_tables.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "content/common/ax_content_node_data.h" 13 #include "content/common/ax_content_node_data.h"
14 #include "content/public/renderer/render_accessibility.h" 14 #include "content/public/renderer/render_accessibility.h"
15 #include "content/public/renderer/render_frame_observer.h" 15 #include "content/public/renderer/render_frame_observer.h"
16 #include "content/renderer/accessibility/blink_ax_tree_source.h" 16 #include "content/renderer/accessibility/blink_ax_tree_source.h"
17 #include "third_party/WebKit/public/web/WebAXObject.h" 17 #include "third_party/WebKit/public/web/WebAXObject.h"
18 #include "ui/accessibility/ax_relative_bounds.h" 18 #include "ui/accessibility/ax_relative_bounds.h"
19 #include "ui/accessibility/ax_tree.h" 19 #include "ui/accessibility/ax_tree.h"
20 #include "ui/accessibility/ax_tree_serializer.h" 20 #include "ui/accessibility/ax_tree_serializer.h"
21 #include "ui/gfx/geometry/rect_f.h" 21 #include "ui/gfx/geometry/rect_f.h"
22 22
23 struct AccessibilityHostMsg_EventParams; 23 struct AccessibilityHostMsg_EventParams;
24 24
25 namespace blink { 25 namespace blink {
26 class WebDocument; 26 class WebDocument;
27 class WebNode; 27 class WebNode;
28 }; 28 };
29 29
30 namespace ui {
31 struct AXActionData;
32 }
33
34 namespace content { 30 namespace content {
35 class RenderFrameImpl; 31 class RenderFrameImpl;
36 32
37 // The browser process implements native accessibility APIs, allowing 33 // The browser process implements native accessibility APIs, allowing
38 // assistive technology (e.g., screen readers, magnifiers) to access and 34 // assistive technology (e.g., screen readers, magnifiers) to access and
39 // control the web contents with high-level APIs. These APIs are also used 35 // control the web contents with high-level APIs. These APIs are also used
40 // by automation tools, and Windows 8 uses them to determine when the 36 // by automation tools, and Windows 8 uses them to determine when the
41 // on-screen keyboard should be shown. 37 // on-screen keyboard should be shown.
42 // 38 //
43 // An instance of this class belongs to RenderFrameImpl. Accessibility is 39 // An instance of this class belongs to RenderFrameImpl. Accessibility is
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 void SendLocationChanges(); 108 void SendLocationChanges();
113 109
114 // The RenderFrameImpl that owns us. 110 // The RenderFrameImpl that owns us.
115 RenderFrameImpl* render_frame_; 111 RenderFrameImpl* render_frame_;
116 112
117 private: 113 private:
118 // RenderFrameObserver implementation. 114 // RenderFrameObserver implementation.
119 void OnDestruct() override; 115 void OnDestruct() override;
120 116
121 // Handlers for messages from the browser to the renderer. 117 // Handlers for messages from the browser to the renderer.
122 void OnPerformAction(const ui::AXActionData& data); 118 void OnDoDefaultAction(int acc_obj_id);
123 void OnEventsAck(int ack_token); 119 void OnEventsAck(int ack_token);
124 void OnFatalError(); 120 void OnFatalError();
121 void OnHitTest(gfx::Point point);
122 void OnSetAccessibilityFocus(int acc_obj_id);
125 void OnReset(int reset_token); 123 void OnReset(int reset_token);
124 void OnScrollToMakeVisible(int acc_obj_id, gfx::Rect subfocus);
125 void OnScrollToPoint(int acc_obj_id, gfx::Point point);
126 void OnSetScrollOffset(int acc_obj_id, gfx::Point offset);
127 void OnSetFocus(int acc_obj_id);
128 void OnSetSelection(int anchor_acc_obj_id,
129 int anchor_offset,
130 int focus_acc_obj_id,
131 int focus_offset);
132 void OnSetValue(int acc_obj_id, base::string16 value);
133 void OnShowContextMenu(int acc_obj_id);
126 134
127 void OnHitTest(const gfx::Point& point);
128 void OnSetAccessibilityFocus(const blink::WebAXObject& obj);
129 void AddPluginTreeToUpdate(AXContentTreeUpdate* update); 135 void AddPluginTreeToUpdate(AXContentTreeUpdate* update);
130 void ScrollPlugin(int id_to_make_visible); 136 void ScrollPlugin(int id_to_make_visible);
131 137
132 // Events from Blink are collected until they are ready to be 138 // Events from Blink are collected until they are ready to be
133 // sent to the browser. 139 // sent to the browser.
134 std::vector<AccessibilityHostMsg_EventParams> pending_events_; 140 std::vector<AccessibilityHostMsg_EventParams> pending_events_;
135 141
136 // The adapter that exposes Blink's accessibility tree to AXTreeSerializer. 142 // The adapter that exposes Blink's accessibility tree to AXTreeSerializer.
137 BlinkAXTreeSource tree_source_; 143 BlinkAXTreeSource tree_source_;
138 144
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 178
173 // So we can queue up tasks to be executed later. 179 // So we can queue up tasks to be executed later.
174 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_; 180 base::WeakPtrFactory<RenderAccessibilityImpl> weak_factory_;
175 181
176 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl); 182 DISALLOW_COPY_AND_ASSIGN(RenderAccessibilityImpl);
177 }; 183 };
178 184
179 } // namespace content 185 } // namespace content
180 186
181 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_ 187 #endif // CONTENT_RENDERER_ACCESSIBILITY_RENDERER_ACCESSIBILITY_H_
OLDNEW
« no previous file with comments | « content/public/browser/render_frame_host.h ('k') | content/renderer/accessibility/render_accessibility_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698