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

Side by Side 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, 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 UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 5 #ifndef UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 6 #define UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 int GetDragSelectionDelay() const override; 358 int GetDragSelectionDelay() const override;
359 void OnBeforePointerAction() override; 359 void OnBeforePointerAction() override;
360 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; 360 void OnAfterPointerAction(bool text_changed, bool selection_changed) override;
361 // Callers within Textfield should call UpdateAfterChange depending on the 361 // Callers within Textfield should call UpdateAfterChange depending on the
362 // return value. 362 // return value.
363 bool PasteSelectionClipboard() override; 363 bool PasteSelectionClipboard() override;
364 void UpdateSelectionClipboard() override; 364 void UpdateSelectionClipboard() override;
365 365
366 // Handles a request to change the value of this text field from software 366 // Handles a request to change the value of this text field from software
367 // using an accessibility API (typically automation software, screen readers 367 // using an accessibility API (typically automation software, screen readers
368 // don't normally use this). Sets the value and clears the selection. 368 // don't normally use this). If |clear_first| is true, this replaces all text
369 void AccessibilitySetValue(const base::string16& new_value); 369 // with the |new_value|. Otherwise this inserts |new_value| at the cursor
370 // position, replacing any selected text. The cursor is placed at the end of
371 // |new_value|.
372 void AccessibilitySetValue(const base::string16& new_value, bool clear_first);
370 373
371 // Updates the painted background color. 374 // Updates the painted background color.
372 void UpdateBackgroundColor(); 375 void UpdateBackgroundColor();
373 376
374 // Updates the border per the state of |invalid_|. 377 // Updates the border per the state of |invalid_|.
375 void UpdateBorder(); 378 void UpdateBorder();
376 379
377 // Does necessary updates when the text and/or cursor position changes. 380 // Does necessary updates when the text and/or cursor position changes.
378 void UpdateAfterChange(bool text_changed, bool cursor_changed); 381 void UpdateAfterChange(bool text_changed, bool cursor_changed);
379 382
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
533 536
534 // Used to bind callback functions to this object. 537 // Used to bind callback functions to this object.
535 base::WeakPtrFactory<Textfield> weak_ptr_factory_; 538 base::WeakPtrFactory<Textfield> weak_ptr_factory_;
536 539
537 DISALLOW_COPY_AND_ASSIGN(Textfield); 540 DISALLOW_COPY_AND_ASSIGN(Textfield);
538 }; 541 };
539 542
540 } // namespace views 543 } // namespace views
541 544
542 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_ 545 #endif // UI_VIEWS_CONTROLS_TEXTFIELD_TEXTFIELD_H_
OLDNEW
« 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