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

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

Issue 23441024: Implement put_accvalue for textfields and location bar. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Add test, address feedback Created 7 years, 3 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 4b453cb48a32a5ff59ff05dd7c9aef00cf255c1a..e5b46f03a5c0cbc95a6566f4c9f305f7a4f4d0f6 100644
--- a/ui/views/controls/textfield/textfield.h
+++ b/ui/views/controls/textfield/textfield.h
@@ -9,6 +9,7 @@
#include "base/basictypes.h"
#include "base/compiler_specific.h"
+#include "base/memory/weak_ptr.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -41,7 +42,9 @@ class ImageView;
class TextfieldController;
// This class implements a View that wraps a native text (edit) field.
-class VIEWS_EXPORT Textfield : public View {
+class VIEWS_EXPORT Textfield
+ : public View,
+ public base::SupportsWeakPtr<Textfield> {
public:
// The textfield's class name.
static const char kViewClassName[];
@@ -285,6 +288,11 @@ class VIEWS_EXPORT Textfield : public View {
// Returns the insets to the rectangle where text is actually painted.
gfx::Insets GetTextInsets() const;
+ // 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 string16& new_value);
+
// This is the current listener for events from this Textfield.
TextfieldController* controller_;

Powered by Google App Engine
This is Rietveld 408576698