OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 10 matching lines...) Expand all Loading... |
21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 21 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef AXObjectCache_h | 26 #ifndef AXObjectCache_h |
27 #define AXObjectCache_h | 27 #define AXObjectCache_h |
28 | 28 |
29 #include "core/CoreExport.h" | 29 #include "core/CoreExport.h" |
30 #include "core/dom/Document.h" | 30 #include "core/dom/Document.h" |
31 #include <memory> | |
32 | 31 |
33 typedef unsigned AXID; | 32 typedef unsigned AXID; |
34 | 33 |
35 namespace blink { | 34 namespace blink { |
36 | 35 |
37 class AbstractInlineTextBox; | 36 class AbstractInlineTextBox; |
38 class AXObject; | 37 class AXObject; |
39 class FrameView; | 38 class FrameView; |
40 class HTMLOptionElement; | 39 class HTMLOptionElement; |
41 class HTMLSelectElement; | 40 class HTMLSelectElement; |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 AXObjectCache(); | 147 AXObjectCache(); |
149 | 148 |
150 private: | 149 private: |
151 static AXObjectCacheCreateFunction m_createFunction; | 150 static AXObjectCacheCreateFunction m_createFunction; |
152 }; | 151 }; |
153 | 152 |
154 class CORE_EXPORT ScopedAXObjectCache { | 153 class CORE_EXPORT ScopedAXObjectCache { |
155 USING_FAST_MALLOC(ScopedAXObjectCache); | 154 USING_FAST_MALLOC(ScopedAXObjectCache); |
156 WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); | 155 WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); |
157 public: | 156 public: |
158 static std::unique_ptr<ScopedAXObjectCache> create(Document&); | 157 static PassOwnPtr<ScopedAXObjectCache> create(Document&); |
159 ~ScopedAXObjectCache(); | 158 ~ScopedAXObjectCache(); |
160 | 159 |
161 AXObjectCache* get(); | 160 AXObjectCache* get(); |
162 | 161 |
163 private: | 162 private: |
164 explicit ScopedAXObjectCache(Document&); | 163 explicit ScopedAXObjectCache(Document&); |
165 | 164 |
166 Persistent<Document> m_document; | 165 Persistent<Document> m_document; |
167 Persistent<AXObjectCache> m_cache; | 166 Persistent<AXObjectCache> m_cache; |
168 }; | 167 }; |
169 | 168 |
170 } // namespace blink | 169 } // namespace blink |
171 | 170 |
172 #endif | 171 #endif |
OLD | NEW |