Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |
| 79 // to insert at the cursor or replace the currently selected text. | |
| 79 // | 80 // |
| 80 // This callback is only valid for the lifetime of the view, and should | 81 // 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 | 82 // be a safe no-op if the view is deleted. Typically, accessible views |
| 82 // should use a WeakPtr when binding the callback. | 83 // should use a WeakPtr when binding the callback. |
| 83 base::Callback<void(const base::string16&)> set_value_callback; | 84 base::Callback<void(const base::string16&, bool)> set_value_callback; |
|
dmazzoni
2016/10/25 17:21:49
Maybe the same here, the bool could be replace all
Patti Lor
2016/10/26 00:57:15
Ah, thanks for the FYI - will definitely be needin
| |
| 84 | 85 |
| 85 private: | 86 private: |
| 86 uint32_t state_; | 87 uint32_t state_; |
| 87 }; | 88 }; |
| 88 | 89 |
| 89 } // namespace ui | 90 } // namespace ui |
| 90 | 91 |
| 91 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ | 92 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ |
| OLD | NEW |