From 4c671e16908c0f60f38aa26051b89d399b5eb0f0 Mon Sep 17 00:00:00 2001 From: "ctguil@chromium.org" Date: Tue, 28 Sep 2010 19:30:23 +0000 Subject: Make accessible getters return values instead of accepting an output parameter. GetAccessibleName still needs to be converted. BUG=none TEST=trybots Review URL: http://codereview.chromium.org/3416033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60828 0039d316-1c4b-4281-b951-d872f2087c98 --- views/view.h | 38 +++++++++++++------------------------- 1 file changed, 13 insertions(+), 25 deletions(-) (limited to 'views/view.h') diff --git a/views/view.h b/views/view.h index 2504667..dbff72b 100644 --- a/views/view.h +++ b/views/view.h @@ -555,7 +555,7 @@ class View : public AcceleratorTarget { virtual bool HasFocus(); // Accessibility support - // TODO(klink): Move all this out to a AccessibleInfo wrapper class. + // TODO(ctguil): Move all this out to a AccessibleInfo wrapper class. // Notify the platform specific accessibility client of changes in the user // interface. This will always raise native notifications. @@ -569,17 +569,13 @@ class View : public AcceleratorTarget { // Returns the MSAA default action of the current view. The string returned // describes the default action that will occur when executing // IAccessible::DoDefaultAction. For instance, default action of a button is - // 'Press'. Sets the input string appropriately, and returns true if - // successful. - virtual bool GetAccessibleDefaultAction(std::wstring* action) { - return false; - } + // 'Press'. + virtual std::wstring GetAccessibleDefaultAction() { return std::wstring(); } // Returns a string containing the mnemonic, or the keyboard shortcut, for a - // given control. Sets the input string appropriately, and returns true if - // successful. - virtual bool GetAccessibleKeyboardShortcut(std::wstring* shortcut) { - return false; + // given control. + virtual std::wstring GetAccessibleKeyboardShortcut() { + return std::wstring(); } // Returns a brief, identifying string, containing a unique, readable name of @@ -589,27 +585,22 @@ class View : public AcceleratorTarget { // Returns the accessibility role of the current view. The role is what // assistive technologies (ATs) use to determine what behavior to expect from - // a given control. Sets the input Role appropriately, and returns true if - // successful. - virtual bool GetAccessibleRole(AccessibilityTypes::Role* role); + // a given control. + virtual AccessibilityTypes::Role GetAccessibleRole(); - // Returns the accessibility state of the current view. Sets the input State - // appropriately, and returns true if successful. - virtual bool GetAccessibleState(AccessibilityTypes::State* state) { - return false; + // Returns the accessibility state of the current view. + virtual AccessibilityTypes::State GetAccessibleState() { + return 0; } - // Returns the current value associated with a view. Sets the input string - // appropriately, and returns true if successful. - virtual bool GetAccessibleValue(std::wstring* value) { return false; } + // Returns the current value associated with a view. + virtual std::wstring GetAccessibleValue() { return std::wstring(); } // Assigns a string name to the given control. Needed as a View does not know // which name will be associated with it until it is created to be a // certain type. void SetAccessibleName(const std::wstring& name); - void SetAccessibleRole(const AccessibilityTypes::Role role); - // Returns an instance of a wrapper class implementing the (platform-specific) // accessibility interface for a given View. If one exists, it will be // re-used, otherwise a new instance will be created. @@ -1305,9 +1296,6 @@ class View : public AcceleratorTarget { // Name for this view, which can be retrieved by accessibility APIs. std::wstring accessible_name_; - // Role for this view, which can be retrieved by accessibility APIs. - AccessibilityTypes::Role accessible_role_; - // Next view to be focused when the Tab key is pressed. View* next_focusable_view_; -- cgit v1.1