diff options
author | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 21:17:04 +0000 |
---|---|---|
committer | klink@chromium.org <klink@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-17 21:17:04 +0000 |
commit | fef1064b514d386bc9bbacf8deaf95f4b0c2ee7e (patch) | |
tree | 0527d66cda0551de4f9e3c156ed1925bfb466354 /chrome/views/accessibility/view_accessibility_wrapper.h | |
parent | ba37f678af7019e1df176a225fe76b57bde18885 (diff) | |
download | chromium_src-fef1064b514d386bc9bbacf8deaf95f4b0c2ee7e.zip chromium_src-fef1064b514d386bc9bbacf8deaf95f4b0c2ee7e.tar.gz chromium_src-fef1064b514d386bc9bbacf8deaf95f4b0c2ee7e.tar.bz2 |
Renames AccessibleWrapper to ViewAccessibilityWrapper for clarity.
Reorders the functions in ViewAccessibility to match the order used in BrowserAccessibility, accessibility.h and in Glue/WebKit.
Review URL: http://codereview.chromium.org/46011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11914 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/accessibility/view_accessibility_wrapper.h')
-rw-r--r-- | chrome/views/accessibility/view_accessibility_wrapper.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/chrome/views/accessibility/view_accessibility_wrapper.h b/chrome/views/accessibility/view_accessibility_wrapper.h new file mode 100644 index 0000000..6d4a842 --- /dev/null +++ b/chrome/views/accessibility/view_accessibility_wrapper.h @@ -0,0 +1,55 @@ +// Copyright (c) 2006-2008 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_VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ +#define CHROME_VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ + +#include <atlcomcli.h> +#include <oleacc.h> + +#include "base/basictypes.h" + +namespace views { +class View; +} + +//////////////////////////////////////////////////////////////////////////////// +// +// ViewAccessibilityWrapper +// +// Wrapper class for returning a pointer to the appropriate (platform-specific) +// accessibility interface for a given View. Needed to keep platform-specific +// code out of the View class, when answering calls for child/parent IAccessible +// implementations, for instance. +// +//////////////////////////////////////////////////////////////////////////////// +class ViewAccessibilityWrapper { + public: + explicit ViewAccessibilityWrapper(views::View* view); + ~ViewAccessibilityWrapper() {} + + STDMETHODIMP CreateDefaultInstance(REFIID iid); + + // Returns a pointer to a specified interface on an object to which a client + // currently holds an interface pointer. If pointer exists, it is reused, + // otherwise a new pointer is created. Used by accessibility implementation to + // retrieve MSAA implementation for child or parent, when navigating MSAA + // hierarchy. + STDMETHODIMP GetInstance(REFIID iid, void** interface_ptr); + + // Sets the accessibility interface implementation of this wrapper to be + // anything the user specifies. + STDMETHODIMP SetInstance(IAccessible* interface_ptr); + + private: + // Instance of accessibility information and handling for a View. + CComPtr<IAccessible> accessibility_info_; + + // View needed to initialize IAccessible. + views::View* view_; + + DISALLOW_COPY_AND_ASSIGN(ViewAccessibilityWrapper); +}; + +#endif // CHROME_VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ |