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

Unified Diff: chrome/browser/accessibility/browser_accessibility_win.h

Issue 3550017: Implement additional IAccessibleText methods to return the nearest... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/accessibility/browser_accessibility_win.h
===================================================================
--- chrome/browser/accessibility/browser_accessibility_win.h (revision 61950)
+++ chrome/browser/accessibility/browser_accessibility_win.h (working copy)
@@ -230,8 +230,6 @@
STDMETHODIMP get_nCharacters(LONG* n_characters);
- STDMETHODIMP get_text(LONG start_offset, LONG end_offset, BSTR* text);
-
STDMETHODIMP get_caretOffset(LONG* offset);
STDMETHODIMP get_nSelections(LONG* n_selections);
@@ -240,7 +238,23 @@
LONG* start_offset,
LONG* end_offset);
+ STDMETHODIMP get_text(LONG start_offset, LONG end_offset, BSTR* text);
+ STDMETHODIMP get_textAtOffset(LONG offset,
+ enum IA2TextBoundaryType boundary_type,
+ LONG* start_offset, LONG* end_offset,
+ BSTR* text);
+
+ STDMETHODIMP get_textBeforeOffset(LONG offset,
+ enum IA2TextBoundaryType boundary_type,
+ LONG* start_offset, LONG* end_offset,
+ BSTR* text);
+
+ STDMETHODIMP get_textAfterOffset(LONG offset,
+ enum IA2TextBoundaryType boundary_type,
+ LONG* start_offset, LONG* end_offset,
+ BSTR* text);
+
// IAccessibleText methods not implemented.
STDMETHODIMP addSelection(LONG start_offset, LONG end_offset) {
return E_NOTIMPL;
@@ -256,28 +270,10 @@
return E_NOTIMPL;
}
STDMETHODIMP get_offsetAtPoint(LONG x, LONG y,
- enum IA2CoordinateType coord_type,
- LONG* offset) {
+ enum IA2CoordinateType coord_type,
+ LONG* offset) {
return E_NOTIMPL;
}
- STDMETHODIMP get_textBeforeOffset(LONG offset,
- enum IA2TextBoundaryType boundary_type,
- LONG* start_offset, LONG* end_offset,
- BSTR* text) {
- return E_NOTIMPL;
- }
- STDMETHODIMP get_textAfterOffset(LONG offset,
- enum IA2TextBoundaryType boundary_type,
- LONG* start_offset, LONG* end_offset,
- BSTR* text) {
- return E_NOTIMPL;
- }
- STDMETHODIMP get_textAtOffset(LONG offset,
- enum IA2TextBoundaryType boundary_type,
- LONG* start_offset, LONG* end_offset,
- BSTR* text) {
- return E_NOTIMPL;
- }
STDMETHODIMP removeSelection(LONG selection_index) {
return E_NOTIMPL;
}
@@ -484,6 +480,18 @@
// Escape a string like it would be escaped for a URL or HTML form.
string16 Escape(string16 str);
+ // Get the text of this node for the purposes of IAccessibleText - it may
+ // be the name, it may be the value, etc. depending on the role.
+ const string16& TextForIAccessibleText();
+
+ // Search forwards (direction == 1) or backwards (direction == -1) from
+ // the given offset until the given IAccessible2 boundary (like word,
+ // sentence) is found, and return its offset.
+ LONG FindBoundary(const string16& text,
+ IA2TextBoundaryType boundary,
+ LONG start_offset,
+ LONG direction);
+
// COM objects are reference-counted. When we're done with this object
// and it's removed from our accessibility tree, a client may still be
// holding onto a pointer to this object, so we mark it as inactive

Powered by Google App Engine
This is Rietveld 408576698