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

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: removed m_ownedCache init Created 5 years, 6 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
« no previous file with comments | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
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/WebPoint.h" 35 #include "../platform/WebPoint.h"
36 #include "../platform/WebPrivateOwnPtr.h"
36 #include "../platform/WebPrivatePtr.h" 37 #include "../platform/WebPrivatePtr.h"
37 #include "../platform/WebVector.h" 38 #include "../platform/WebVector.h"
38 #include "WebAXEnums.h" 39 #include "WebAXEnums.h"
39 40
40 #if BLINK_IMPLEMENTATION 41 #if BLINK_IMPLEMENTATION
41 namespace WTF { template <typename T> class PassRefPtr; } 42 namespace WTF { template <typename T> class PassRefPtr; }
42 #endif 43 #endif
43 44
44 namespace blink { 45 namespace blink {
45 46
46 class AXObject; 47 class AXObject;
47 class ScopedAXObjectCache; 48 class ScopedAXObjectCache;
48 class WebAXObject; 49 class WebAXObject;
49 class WebNode; 50 class WebNode;
50 class WebDocument; 51 class WebDocument;
51 class WebString; 52 class WebString;
52 class WebURL; 53 class WebURL;
53 struct WebPoint; 54 struct WebPoint;
54 struct WebRect; 55 struct WebRect;
55 56
56 // An instance of this class, while kept alive, indicates that accessibility 57 // An instance of this class, while kept alive, indicates that accessibility
57 // should be temporarily enabled. If accessibility was enabled globally 58 // should be temporarily enabled. If accessibility was enabled globally
58 // (WebSettings::setAccessibilityEnabled), this will have no effect. 59 // (WebSettings::setAccessibilityEnabled), this will have no effect.
59 class WebScopedAXContext { 60 class WebScopedAXContext {
60 public: 61 public:
61 BLINK_EXPORT WebScopedAXContext(WebDocument& rootDocument); 62 BLINK_EXPORT WebScopedAXContext(WebDocument& rootDocument);
62 BLINK_EXPORT ~WebScopedAXContext();
63 63
64 BLINK_EXPORT WebAXObject root() const; 64 BLINK_EXPORT WebAXObject root() const;
65 65
66 private: 66 private:
67 WebPrivatePtr<ScopedAXObjectCache> m_private; 67 WebPrivateOwnPtr<ScopedAXObjectCache> m_private;
68 }; 68 };
69 69
70 // A container for passing around a reference to AXObject. 70 // A container for passing around a reference to AXObject.
71 class WebAXObject { 71 class WebAXObject {
72 public: 72 public:
73 ~WebAXObject() { reset(); } 73 ~WebAXObject() { reset(); }
74 74
75 WebAXObject() { } 75 WebAXObject() { }
76 WebAXObject(const WebAXObject& o) { assign(o); } 76 WebAXObject(const WebAXObject& o) { assign(o); }
77 WebAXObject& operator=(const WebAXObject& o) 77 WebAXObject& operator=(const WebAXObject& o)
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 operator WTF::PassRefPtr<AXObject>() const; 304 operator WTF::PassRefPtr<AXObject>() const;
305 #endif 305 #endif
306 306
307 private: 307 private:
308 WebPrivatePtr<AXObject> m_private; 308 WebPrivatePtr<AXObject> m_private;
309 }; 309 };
310 310
311 } // namespace blink 311 } // namespace blink
312 312
313 #endif 313 #endif
OLDNEW
« no previous file with comments | « Source/web/WebAXObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698