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

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

Issue 2341633006: MacViews/a11y: Allow accessibility clients to update the selected text. (Closed)
Patch Set: Fix Windows. 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) 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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // 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.
69 // Only applies to views with multiple choices like a listbox; both 69 // Only applies to views with multiple choices like a listbox; both
70 // index and count should be -1 otherwise. 70 // index and count should be -1 otherwise.
71 int index; 71 int index;
72 int count; 72 int count;
73 73
74 // An optional callback that can be used by accessibility clients to 74 // An optional callback that can be used by accessibility clients to
75 // 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
76 // 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
77 // screen readers, but often used by automation software to script 77 // screen readers, but often used by automation software to script
78 // things like logging into portals or filling forms. 78 // things like logging into portals or filling forms. Set the second argument
msw 2016/10/27 17:55:09 optional nit: make comments regarding this flag co
Patti Lor 2016/10/31 00:35:05 Done (with some edits because using the variable n
79 // to true to clear the existing value first, false to replace the currently
80 // selected text.
79 // 81 //
80 // This callback is only valid for the lifetime of the view, and should 82 // This callback is only valid for the lifetime of the view, and should
81 // be a safe no-op if the view is deleted. Typically, accessible views 83 // be a safe no-op if the view is deleted. Typically, accessible views
82 // should use a WeakPtr when binding the callback. 84 // should use a WeakPtr when binding the callback.
83 base::Callback<void(const base::string16&)> set_value_callback; 85 base::Callback<void(const base::string16&, bool)> set_value_callback;
84 86
85 private: 87 private:
86 uint32_t state_; 88 uint32_t state_;
87 }; 89 };
88 90
89 } // namespace ui 91 } // namespace ui
90 92
91 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ 93 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698