Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: public/web/WebAXObject.h

Issue 1088473002: Refactor ScopedAXObjectCache to remove ref count (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 operator WTF::PassRefPtr<AXObject>() const; 284 operator WTF::PassRefPtr<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
OLDNEW
« Source/modules/accessibility/InspectorAccessibilityAgent.cpp ('K') | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698