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

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

Issue 246433012: Extend AXTreeSourceViews to handle aura::Window and views::Widget. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move files from c/b/u/views/accessibility to c/b/u/ash/accessibility Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | ui/views/accessibility/ax_aura_obj_cache.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 "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 12 matching lines...) Expand all
23 //////////////////////////////////////////////////////////////////////////////// 23 ////////////////////////////////////////////////////////////////////////////////
24 struct AX_EXPORT AXViewState { 24 struct AX_EXPORT AXViewState {
25 public: 25 public:
26 AXViewState(); 26 AXViewState();
27 ~AXViewState(); 27 ~AXViewState();
28 28
29 // Set or check bits in |state_|. 29 // Set or check bits in |state_|.
30 void AddStateFlag(ui::AXState state); 30 void AddStateFlag(ui::AXState state);
31 bool HasStateFlag(ui::AXState state) const; 31 bool HasStateFlag(ui::AXState state) const;
32 32
33 // The view's state, a bitmask containing fields such as checked
34 // (for a checkbox) and protected (for a password text box). This "state"
35 // should not be confused with the class's name.
36 uint32 state() { return state_; }
37
33 // The view's role, like button or list box. 38 // The view's role, like button or list box.
34 AXRole role; 39 AXRole role;
35 40
36 // The view's name / label. 41 // The view's name / label.
37 base::string16 name; 42 base::string16 name;
38 43
39 // The view's value, for example the text content. 44 // The view's value, for example the text content.
40 base::string16 value; 45 base::string16 value;
41 46
42 // The name of the default action if the user clicks on this view. 47 // The name of the default action if the user clicks on this view.
(...skipping 18 matching lines...) Expand all
61 // setting the value makes sense, like a text box. Not often used by 66 // setting the value makes sense, like a text box. Not often used by
62 // screen readers, but often used by automation software to script 67 // screen readers, but often used by automation software to script
63 // things like logging into portals or filling forms. 68 // things like logging into portals or filling forms.
64 // 69 //
65 // This callback is only valid for the lifetime of the view, and should 70 // This callback is only valid for the lifetime of the view, and should
66 // be a safe no-op if the view is deleted. Typically, accessible views 71 // be a safe no-op if the view is deleted. Typically, accessible views
67 // should use a WeakPtr when binding the callback. 72 // should use a WeakPtr when binding the callback.
68 base::Callback<void(const base::string16&)> set_value_callback; 73 base::Callback<void(const base::string16&)> set_value_callback;
69 74
70 private: 75 private:
71 // The view's state, a bitmask containing fields such as checked
72 // (for a checkbox) and protected (for a password text box).
73 uint32 state_; 76 uint32 state_;
74 }; 77 };
75 78
76 } // namespace ui 79 } // namespace ui
77 80
78 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_ 81 #endif // UI_ACCESSIBILITY_AX_VIEW_STATE_H_
OLDNEW
« no previous file with comments | « ui/accessibility/ax_enums.idl ('k') | ui/views/accessibility/ax_aura_obj_cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698