diff options
author | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 00:12:01 +0000 |
---|---|---|
committer | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 00:12:01 +0000 |
commit | e92070ac9982489502180c006fe7911889c8fbee (patch) | |
tree | 577f25e7a8b61fd5b497886f57d89770f19f60cb /chrome/common | |
parent | ec7690fc03aef949ea4eece3c17b3f78b265006e (diff) | |
download | chromium_src-e92070ac9982489502180c006fe7911889c8fbee.zip chromium_src-e92070ac9982489502180c006fe7911889c8fbee.tar.gz chromium_src-e92070ac9982489502180c006fe7911889c8fbee.tar.bz2 |
Removes the use of Windows-specific types for accessibility roles and states in Views and Browser\Views. Helps with the porting effort, and makes for a cleaner implementation.
Review URL: http://codereview.chromium.org/93085
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14689 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/accessibility_types.h | 48 | ||||
-rw-r--r-- | chrome/common/common.vcproj | 4 |
2 files changed, 52 insertions, 0 deletions
diff --git a/chrome/common/accessibility_types.h b/chrome/common/accessibility_types.h new file mode 100644 index 0000000..b1e6e2e --- /dev/null +++ b/chrome/common/accessibility_types.h @@ -0,0 +1,48 @@ +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef CHROME_COMMON_ACCESSIBILITY_TYPES_H_ +#define CHROME_COMMON_ACCESSIBILITY_TYPES_H_ + +//////////////////////////////////////////////////////////////////////////////// +// +// AccessibilityTypes +// +// Provides enumerations used to preserve platform-independence in accessibility +// functions used in various Views, both in Browser\Views and Views. +// +//////////////////////////////////////////////////////////////////////////////// +class AccessibilityTypes { + public: + // This defines an enumeration of the supported accessibility roles in our + // Views (e.g. used in View::GetAccessibleRole). Any interface using roles + // must provide a conversion to its own roles (see e.g. + // ViewAccessibility::get_accRole and ViewAccessibility::MSAARole). + enum Role { + ROLE_APPLICATION, + ROLE_BUTTONDROPDOWN, + ROLE_CLIENT, + ROLE_GROUPING, + ROLE_PAGETAB, + ROLE_PUSHBUTTON, + ROLE_TEXT, + ROLE_TOOLBAR + }; + + // This defines an enumeration of the supported accessibility roles in our + // Views (e.g. used in View::GetAccessibleState). Any interface using roles + // must provide a conversion to its own roles (see e.g. + // ViewAccessibility::get_accState and ViewAccessibility::MSAAState). + enum State { + STATE_HASPOPUP, + STATE_READONLY + }; + + private: + // Do not instantiate this class. + AccessibilityTypes() {} + ~AccessibilityTypes() {} +}; + +#endif // CHROME_COMMON_ACCESSIBILITY_TYPES_H_ diff --git a/chrome/common/common.vcproj b/chrome/common/common.vcproj index 5a26a5e..7bf3fed 100644 --- a/chrome/common/common.vcproj +++ b/chrome/common/common.vcproj @@ -358,6 +358,10 @@ </File> </Filter> <File + RelativePath=".\accessibility_types.h" + > + </File> + <File RelativePath=".\animation.cc" > </File> |