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

Side by Side Diff: content/browser/accessibility/browser_accessibility_manager.h

Issue 681503002: Add Android AX functions to set the value and selection of a text field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@link_text_from_image
Patch Set: Add to supported actions Created 6 years, 1 month 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_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 5 #ifndef CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 6 #define CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_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"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 virtual ~BrowserAccessibilityDelegate() {} 54 virtual ~BrowserAccessibilityDelegate() {}
55 virtual void AccessibilitySetFocus(int acc_obj_id) = 0; 55 virtual void AccessibilitySetFocus(int acc_obj_id) = 0;
56 virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0; 56 virtual void AccessibilityDoDefaultAction(int acc_obj_id) = 0;
57 virtual void AccessibilityShowMenu(const gfx::Point& global_point) = 0; 57 virtual void AccessibilityShowMenu(const gfx::Point& global_point) = 0;
58 virtual void AccessibilityScrollToMakeVisible( 58 virtual void AccessibilityScrollToMakeVisible(
59 int acc_obj_id, const gfx::Rect& subfocus) = 0; 59 int acc_obj_id, const gfx::Rect& subfocus) = 0;
60 virtual void AccessibilityScrollToPoint( 60 virtual void AccessibilityScrollToPoint(
61 int acc_obj_id, const gfx::Point& point) = 0; 61 int acc_obj_id, const gfx::Point& point) = 0;
62 virtual void AccessibilitySetTextSelection( 62 virtual void AccessibilitySetTextSelection(
63 int acc_obj_id, int start_offset, int end_offset) = 0; 63 int acc_obj_id, int start_offset, int end_offset) = 0;
64 virtual void AccessibilitySetValue(
65 int acc_obj_id, const base::string16& value) = 0;
64 virtual bool AccessibilityViewHasFocus() const = 0; 66 virtual bool AccessibilityViewHasFocus() const = 0;
65 virtual gfx::Rect AccessibilityGetViewBounds() const = 0; 67 virtual gfx::Rect AccessibilityGetViewBounds() const = 0;
66 virtual gfx::Point AccessibilityOriginInScreen( 68 virtual gfx::Point AccessibilityOriginInScreen(
67 const gfx::Rect& bounds) const = 0; 69 const gfx::Rect& bounds) const = 0;
68 virtual void AccessibilityHitTest( 70 virtual void AccessibilityHitTest(
69 const gfx::Point& point) = 0; 71 const gfx::Point& point) = 0;
70 virtual void AccessibilityFatalError() = 0; 72 virtual void AccessibilityFatalError() = 0;
71 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0; 73 virtual gfx::AcceleratedWidget AccessibilityGetAcceleratedWidget() = 0;
72 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0; 74 virtual gfx::NativeViewAccessible AccessibilityGetNativeViewAccessible() = 0;
73 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame( 75 virtual BrowserAccessibilityManager* AccessibilityGetChildFrame(
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 // scroll so that the |subfocus| rect is visible at least. The subfocus 141 // scroll so that the |subfocus| rect is visible at least. The subfocus
140 // rect is in local coordinates of the object itself. 142 // rect is in local coordinates of the object itself.
141 void ScrollToMakeVisible( 143 void ScrollToMakeVisible(
142 const BrowserAccessibility& node, gfx::Rect subfocus); 144 const BrowserAccessibility& node, gfx::Rect subfocus);
143 145
144 // Tell the renderer to scroll such that |node| is at |point|, 146 // Tell the renderer to scroll such that |node| is at |point|,
145 // where |point| is in global coordinates of the WebContents. 147 // where |point| is in global coordinates of the WebContents.
146 void ScrollToPoint( 148 void ScrollToPoint(
147 const BrowserAccessibility& node, gfx::Point point); 149 const BrowserAccessibility& node, gfx::Point point);
148 150
151 // Tell the renderer to set the value of an editable text node.
152 void SetValue(
153 const BrowserAccessibility& node, const base::string16& value);
154
149 // Tell the renderer to set the text selection on a node. 155 // Tell the renderer to set the text selection on a node.
150 void SetTextSelection( 156 void SetTextSelection(
151 const BrowserAccessibility& node, int start_offset, int end_offset); 157 const BrowserAccessibility& node, int start_offset, int end_offset);
152 158
153 // Retrieve the bounds of the parent View in screen coordinates. 159 // Retrieve the bounds of the parent View in screen coordinates.
154 gfx::Rect GetViewBounds(); 160 gfx::Rect GetViewBounds();
155 161
156 // Called when the renderer process has notified us of about tree changes. 162 // Called when the renderer process has notified us of about tree changes.
157 void OnAccessibilityEvents( 163 void OnAccessibilityEvents(
158 const std::vector<AccessibilityHostMsg_EventParams>& params); 164 const std::vector<AccessibilityHostMsg_EventParams>& params);
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 262
257 // The on-screen keyboard state. 263 // The on-screen keyboard state.
258 OnScreenKeyboardState osk_state_; 264 OnScreenKeyboardState osk_state_;
259 265
260 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager); 266 DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManager);
261 }; 267 };
262 268
263 } // namespace content 269 } // namespace content
264 270
265 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_ 271 #endif // CONTENT_BROWSER_ACCESSIBILITY_BROWSER_ACCESSIBILITY_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698