| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebAXObject_h | 31 #ifndef WebAXObject_h |
| 32 #define WebAXObject_h | 32 #define WebAXObject_h |
| 33 | 33 |
| 34 #include "../platform/WebCommon.h" | 34 #include "../platform/WebCommon.h" |
| 35 #include "../platform/WebPrivateOwnPtr.h" |
| 35 #include "../platform/WebPrivatePtr.h" | 36 #include "../platform/WebPrivatePtr.h" |
| 36 #include "../platform/WebVector.h" | 37 #include "../platform/WebVector.h" |
| 37 #include "WebAXEnums.h" | 38 #include "WebAXEnums.h" |
| 38 | 39 |
| 39 #if BLINK_IMPLEMENTATION | 40 #if BLINK_IMPLEMENTATION |
| 40 namespace WTF { template <typename T> class PassRefPtr; } | 41 namespace WTF { template <typename T> class PassRefPtr; } |
| 41 #endif | 42 #endif |
| 42 | 43 |
| 43 namespace blink { | 44 namespace blink { |
| 44 | 45 |
| 45 class AXObject; | 46 class AXObject; |
| 46 class ScopedAXObjectCache; | 47 class ScopedAXObjectCache; |
| 47 class WebAXObject; | 48 class WebAXObject; |
| 48 class WebNode; | 49 class WebNode; |
| 49 class WebDocument; | 50 class WebDocument; |
| 50 class WebString; | 51 class WebString; |
| 51 class WebURL; | 52 class WebURL; |
| 52 struct WebPoint; | 53 struct WebPoint; |
| 53 struct WebRect; | 54 struct WebRect; |
| 54 | 55 |
| 55 // An instance of this class, while kept alive, indicates that accessibility | 56 // An instance of this class, while kept alive, indicates that accessibility |
| 56 // should be temporarily enabled. If accessibility was enabled globally | 57 // should be temporarily enabled. If accessibility was enabled globally |
| 57 // (WebSettings::setAccessibilityEnabled), this will have no effect. | 58 // (WebSettings::setAccessibilityEnabled), this will have no effect. |
| 58 class WebScopedAXContext { | 59 class WebScopedAXContext { |
| 59 public: | 60 public: |
| 60 BLINK_EXPORT WebScopedAXContext(WebDocument& rootDocument); | 61 BLINK_EXPORT WebScopedAXContext(WebDocument& rootDocument); |
| 61 BLINK_EXPORT ~WebScopedAXContext(); | |
| 62 | 62 |
| 63 BLINK_EXPORT WebAXObject root() const; | 63 BLINK_EXPORT WebAXObject root() const; |
| 64 | 64 |
| 65 private: | 65 private: |
| 66 WebPrivatePtr<ScopedAXObjectCache> m_private; | 66 WebPrivateOwnPtr<ScopedAXObjectCache> m_private; |
| 67 }; | 67 }; |
| 68 | 68 |
| 69 // A container for passing around a reference to AXObject. | 69 // A container for passing around a reference to AXObject. |
| 70 class WebAXObject { | 70 class WebAXObject { |
| 71 public: | 71 public: |
| 72 ~WebAXObject() { reset(); } | 72 ~WebAXObject() { reset(); } |
| 73 | 73 |
| 74 WebAXObject() { } | 74 WebAXObject() { } |
| 75 WebAXObject(const WebAXObject& o) { assign(o); } | 75 WebAXObject(const WebAXObject& o) { assign(o); } |
| 76 WebAXObject& operator=(const WebAXObject& o) | 76 WebAXObject& operator=(const WebAXObject& o) |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 BLINK_EXPORT void wordBoundaries(WebVector<int>& starts, WebVector<int>& end
s) const; | 272 BLINK_EXPORT void wordBoundaries(WebVector<int>& starts, WebVector<int>& end
s) const; |
| 273 | 273 |
| 274 // Make this object visible by scrolling as many nested scrollable views as
needed. | 274 // Make this object visible by scrolling as many nested scrollable views as
needed. |
| 275 BLINK_EXPORT void scrollToMakeVisible() const; | 275 BLINK_EXPORT void scrollToMakeVisible() const; |
| 276 // Same, but if the whole object can't be made visible, try for this subrect
, in local coordinates. | 276 // Same, but if the whole object can't be made visible, try for this subrect
, in local coordinates. |
| 277 BLINK_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const; | 277 BLINK_EXPORT void scrollToMakeVisibleWithSubFocus(const WebRect&) const; |
| 278 // Scroll this object to a given point in global coordinates of the top-leve
l window. | 278 // Scroll this object to a given point in global coordinates of the top-leve
l window. |
| 279 BLINK_EXPORT void scrollToGlobalPoint(const WebPoint&) const; | 279 BLINK_EXPORT void scrollToGlobalPoint(const WebPoint&) const; |
| 280 | 280 |
| 281 #if BLINK_IMPLEMENTATION | 281 #if BLINK_IMPLEMENTATION |
| 282 WebAXObject(const WTF::PassRefPtr<AXObject>&); | 282 WebAXObject(const PassRefPtrWillBeRawPtr<AXObject>&); |
| 283 WebAXObject& operator=(const WTF::PassRefPtr<AXObject>&); | 283 WebAXObject& operator=(const PassRefPtrWillBeRawPtr<AXObject>&); |
| 284 operator WTF::PassRefPtr<AXObject>() const; | 284 operator PassRefPtrWillBeRawPtr<AXObject>() const; |
| 285 #endif | 285 #endif |
| 286 | 286 |
| 287 private: | 287 private: |
| 288 WebPrivatePtr<AXObject> m_private; | 288 WebPrivatePtr<AXObject> m_private; |
| 289 }; | 289 }; |
| 290 | 290 |
| 291 } // namespace blink | 291 } // namespace blink |
| 292 | 292 |
| 293 #endif | 293 #endif |
| OLD | NEW |