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

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

Issue 2141013004: Mac a11y: Add Help, TopLevelUIElement, and Window accessibility attributes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add null check for NVA::GetTopLevelWidget(). 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
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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. 57 // The view's placeholder value, used only for views with editable text.
58 base::string16 placeholder; 58 base::string16 placeholder;
59 59
60 // The view's help text, set to the view's tooltip text (if any).
61 base::string16 help_text;
62
60 // The selection start and end. Only applies to views with text content, 63 // The selection start and end. Only applies to views with text content,
61 // such as a text box or combo box; start and end should be -1 otherwise. 64 // such as a text box or combo box; start and end should be -1 otherwise.
62 int selection_start; 65 int selection_start;
63 int selection_end; 66 int selection_end;
64 67
65 // The selected item's index and the count of the number of items. 68 // The selected item's index and the count of the number of items.
66 // Only applies to views with multiple choices like a listbox; both 69 // Only applies to views with multiple choices like a listbox; both
67 // index and count should be -1 otherwise. 70 // index and count should be -1 otherwise.
68 int index; 71 int index;
69 int count; 72 int count;
70 73
71 // An optional callback that can be used by accessibility clients to 74 // An optional callback that can be used by accessibility clients to
72 // set the string value of this view. This only applies to roles where 75 // set the string value of this view. This only applies to roles where
73 // setting the value makes sense, like a text box. Not often used by 76 // setting the value makes sense, like a text box. Not often used by
74 // screen readers, but often used by automation software to script 77 // screen readers, but often used by automation software to script
75 // things like logging into portals or filling forms. 78 // things like logging into portals or filling forms.
76 // 79 //
77 // This callback is only valid for the lifetime of the view, and should 80 // This callback is only valid for the lifetime of the view, and should
78 // be a safe no-op if the view is deleted. Typically, accessible views 81 // be a safe no-op if the view is deleted. Typically, accessible views
79 // should use a WeakPtr when binding the callback. 82 // should use a WeakPtr when binding the callback.
80 base::Callback<void(const base::string16&)> set_value_callback; 83 base::Callback<void(const base::string16&)> set_value_callback;
81 84
82 private: 85 private:
83 uint32_t state_; 86 uint32_t state_;
84 }; 87 };
85 88
86 } // namespace ui 89 } // namespace ui
87 90
88 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ 91 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698