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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 typedef AXObjectCache* (*AXObjectCacheCreateFunction)(Document&); | 134 typedef AXObjectCache* (*AXObjectCacheCreateFunction)(Document&); |
135 static void init(AXObjectCacheCreateFunction); | 135 static void init(AXObjectCacheCreateFunction); |
136 | 136 |
137 protected: | 137 protected: |
138 AXObjectCache(); | 138 AXObjectCache(); |
139 | 139 |
140 private: | 140 private: |
141 static AXObjectCacheCreateFunction m_createFunction; | 141 static AXObjectCacheCreateFunction m_createFunction; |
142 }; | 142 }; |
143 | 143 |
144 class CORE_EXPORT ScopedAXObjectCache { | 144 class CORE_EXPORT ScopedAXObjectCache : public RefCounted<ScopedAXObjectCache> { |
145 WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); | 145 WTF_MAKE_NONCOPYABLE(ScopedAXObjectCache); |
146 public: | 146 public: |
147 explicit ScopedAXObjectCache(Document&); | 147 explicit ScopedAXObjectCache(Document&); |
148 ~ScopedAXObjectCache(); | 148 ~ScopedAXObjectCache(); |
149 | 149 |
150 AXObjectCache* get(); | 150 AXObjectCache* get(); |
151 AXObjectCache* operator->(); | 151 AXObjectCache* operator->(); |
152 | 152 |
153 private: | 153 private: |
154 Document& m_document; | 154 Document& m_document; |
155 AXObjectCache* m_cache; | 155 AXObjectCache* m_cache; |
156 bool m_isScoped; | 156 bool m_isScoped; |
157 }; | 157 }; |
158 | 158 |
159 } | 159 } |
160 | 160 |
161 #endif | 161 #endif |
OLD | NEW |