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

Side by Side Diff: ui/accessibility/ax_view_state.h

Issue 2106953005: Mac: Add new accessibility attributes for textfields (and some for all views). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ax-attrs
Patch Set: Address review comments. Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/platform/ax_platform_node_mac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_ACCESSIBILITY_AX_VIEW_STATE_H_ 5 #ifndef UI_ACCESSIBILITY_AX_VIEW_STATE_H_
6 #define UI_ACCESSIBILITY_AX_VIEW_STATE_H_ 6 #define UI_ACCESSIBILITY_AX_VIEW_STATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 47
48 // The view's value, for example the text content. 48 // The view's value, for example the text content.
49 base::string16 value; 49 base::string16 value;
50 50
51 // The name of the default action if the user clicks on this view. 51 // The name of the default action if the user clicks on this view.
52 base::string16 default_action; 52 base::string16 default_action;
53 53
54 // The keyboard shortcut to activate this view, if any. 54 // The keyboard shortcut to activate this view, if any.
55 base::string16 keyboard_shortcut; 55 base::string16 keyboard_shortcut;
56 56
57 // The view's placeholder value, used only for views with editable text.
58 base::string16 placeholder;
59
57 // The selection start and end. Only applies to views with text content, 60 // The selection start and end. Only applies to views with text content,
58 // such as a text box or combo box; start and end should be -1 otherwise. 61 // such as a text box or combo box; start and end should be -1 otherwise.
59 int selection_start; 62 int selection_start;
60 int selection_end; 63 int selection_end;
61 64
62 // The selected item's index and the count of the number of items. 65 // The selected item's index and the count of the number of items.
63 // Only applies to views with multiple choices like a listbox; both 66 // Only applies to views with multiple choices like a listbox; both
64 // index and count should be -1 otherwise. 67 // index and count should be -1 otherwise.
65 int index; 68 int index;
66 int count; 69 int count;
67 70
68 // An optional callback that can be used by accessibility clients to 71 // An optional callback that can be used by accessibility clients to
69 // set the string value of this view. This only applies to roles where 72 // set the string value of this view. This only applies to roles where
70 // setting the value makes sense, like a text box. Not often used by 73 // setting the value makes sense, like a text box. Not often used by
71 // screen readers, but often used by automation software to script 74 // screen readers, but often used by automation software to script
72 // things like logging into portals or filling forms. 75 // things like logging into portals or filling forms.
73 // 76 //
74 // This callback is only valid for the lifetime of the view, and should 77 // This callback is only valid for the lifetime of the view, and should
75 // be a safe no-op if the view is deleted. Typically, accessible views 78 // be a safe no-op if the view is deleted. Typically, accessible views
76 // should use a WeakPtr when binding the callback. 79 // should use a WeakPtr when binding the callback.
77 base::Callback<void(const base::string16&)> set_value_callback; 80 base::Callback<void(const base::string16&)> set_value_callback;
78 81
79 private: 82 private:
80 uint32_t state_; 83 uint32_t state_;
81 }; 84 };
82 85
83 } // namespace ui 86 } // namespace ui
84 87
85 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ 88 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_
OLDNEW
« no previous file with comments | « ui/accessibility/ax_node_data.h ('k') | ui/accessibility/platform/ax_platform_node_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698