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

Unified Diff: ui/views/controls/textfield/textfield.h

Issue 2341633006: MacViews/a11y: Allow accessibility clients to update the selected text. (Closed)
Patch Set: Review comments. 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 side-by-side diff with in-line comments
Download patch
Index: ui/views/controls/textfield/textfield.h
diff --git a/ui/views/controls/textfield/textfield.h b/ui/views/controls/textfield/textfield.h
index 5eb167deedcdbd5ddb0bbcf9fbbe939a8f3d65cb..44b37d2c19e070e2892219a432fe0fe45205e17c 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -365,8 +365,11 @@ class VIEWS_EXPORT Textfield : public View,
// Handles a request to change the value of this text field from software
// using an accessibility API (typically automation software, screen readers
- // don't normally use this). Sets the value and clears the selection.
- void AccessibilitySetValue(const base::string16& new_value);
+ // don't normally use this). If |clear_first| is true, this replaces all text
+ // with the |new_value|. Otherwise this inserts |new_value| at the cursor
+ // position, replacing any selected text. The cursor is placed at the end of
+ // |new_value|.
+ void AccessibilitySetValue(const base::string16& new_value, bool clear_first);
// Updates the painted background color.
void UpdateBackgroundColor();
« no previous file with comments | « ui/views/accessibility/native_view_accessibility_auralinux.cc ('k') | ui/views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698