| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ | 5 #ifndef VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ |
| 6 #define VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ | 6 #define VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ |
| 7 | 7 |
| 8 #include <atlcomcli.h> | 8 #include <atlcomcli.h> |
| 9 #include <oleacc.h> | 9 #include <oleacc.h> |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 // implementations, for instance. | 25 // implementations, for instance. |
| 26 // | 26 // |
| 27 //////////////////////////////////////////////////////////////////////////////// | 27 //////////////////////////////////////////////////////////////////////////////// |
| 28 class ViewAccessibilityWrapper { | 28 class ViewAccessibilityWrapper { |
| 29 public: | 29 public: |
| 30 explicit ViewAccessibilityWrapper(views::View* view); | 30 explicit ViewAccessibilityWrapper(views::View* view); |
| 31 ~ViewAccessibilityWrapper() {} | 31 ~ViewAccessibilityWrapper() {} |
| 32 | 32 |
| 33 STDMETHODIMP CreateDefaultInstance(REFIID iid); | 33 STDMETHODIMP CreateDefaultInstance(REFIID iid); |
| 34 | 34 |
| 35 HRESULT Uninitialize(); |
| 36 |
| 35 // Returns a pointer to a specified interface on an object to which a client | 37 // Returns a pointer to a specified interface on an object to which a client |
| 36 // currently holds an interface pointer. If pointer exists, it is reused, | 38 // currently holds an interface pointer. If pointer exists, it is reused, |
| 37 // otherwise a new pointer is created. Used by accessibility implementation to | 39 // otherwise a new pointer is created. Used by accessibility implementation to |
| 38 // retrieve MSAA implementation for child or parent, when navigating MSAA | 40 // retrieve MSAA implementation for child or parent, when navigating MSAA |
| 39 // hierarchy. | 41 // hierarchy. |
| 40 STDMETHODIMP GetInstance(REFIID iid, void** interface_ptr); | 42 STDMETHODIMP GetInstance(REFIID iid, void** interface_ptr); |
| 41 | 43 |
| 42 // Sets the accessibility interface implementation of this wrapper to be | 44 // Sets the accessibility interface implementation of this wrapper to be |
| 43 // anything the user specifies. | 45 // anything the user specifies. |
| 44 STDMETHODIMP SetInstance(IAccessible* interface_ptr); | 46 STDMETHODIMP SetInstance(IAccessible* interface_ptr); |
| 45 | 47 |
| 46 private: | 48 private: |
| 47 // Instance of accessibility information and handling for a View. | 49 // Instance of accessibility information and handling for a View. |
| 48 ScopedComPtr<IAccessible> accessibility_info_; | 50 ScopedComPtr<IAccessible> accessibility_info_; |
| 49 | 51 |
| 50 // View needed to initialize IAccessible. | 52 // View needed to initialize IAccessible. |
| 51 views::View* view_; | 53 views::View* view_; |
| 52 | 54 |
| 53 DISALLOW_COPY_AND_ASSIGN(ViewAccessibilityWrapper); | 55 DISALLOW_COPY_AND_ASSIGN(ViewAccessibilityWrapper); |
| 54 }; | 56 }; |
| 55 | 57 |
| 56 #endif // VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ | 58 #endif // VIEWS_ACCESSIBILITY_VIEW_ACCESSIBILITY_WRAPPER_H_ |
| OLD | NEW |