| 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 15 matching lines...) Expand all Loading... |
| 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 DOMWrapperWorld_h | 31 #ifndef DOMWrapperWorld_h |
| 32 #define DOMWrapperWorld_h | 32 #define DOMWrapperWorld_h |
| 33 | 33 |
| 34 #include <memory> | 34 #include <memory> |
| 35 | 35 |
| 36 #include "bindings/core/v8/ScriptState.h" | 36 #include "platform/PlatformExport.h" |
| 37 #include "core/CoreExport.h" | 37 #include "platform/bindings/ScriptState.h" |
| 38 #include "platform/weborigin/SecurityOrigin.h" | 38 #include "platform/weborigin/SecurityOrigin.h" |
| 39 #include "platform/wtf/PassRefPtr.h" | 39 #include "platform/wtf/PassRefPtr.h" |
| 40 #include "platform/wtf/RefCounted.h" | 40 #include "platform/wtf/RefCounted.h" |
| 41 #include "platform/wtf/RefPtr.h" | 41 #include "platform/wtf/RefPtr.h" |
| 42 #include "v8/include/v8.h" | 42 #include "v8/include/v8.h" |
| 43 | 43 |
| 44 namespace blink { | 44 namespace blink { |
| 45 | 45 |
| 46 class DOMDataStore; | 46 class DOMDataStore; |
| 47 class DOMObjectHolderBase; | 47 class DOMObjectHolderBase; |
| 48 | 48 |
| 49 // This class represent a collection of DOM wrappers for a specific world. This | 49 // This class represent a collection of DOM wrappers for a specific world. This |
| 50 // is identified by a world id that is a per-thread global identifier (see | 50 // is identified by a world id that is a per-thread global identifier (see |
| 51 // WorldId enum). | 51 // WorldId enum). |
| 52 class CORE_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> { | 52 class PLATFORM_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> { |
| 53 public: | 53 public: |
| 54 // Per-thread global identifiers for DOMWrapperWorld. | 54 // Per-thread global identifiers for DOMWrapperWorld. |
| 55 enum WorldId { | 55 enum WorldId { |
| 56 kInvalidWorldId = -1, | 56 kInvalidWorldId = -1, |
| 57 kMainWorldId = 0, | 57 kMainWorldId = 0, |
| 58 | 58 |
| 59 // Embedder isolated worlds can use IDs in [1, 1<<29). | 59 // Embedder isolated worlds can use IDs in [1, 1<<29). |
| 60 kEmbedderWorldIdLimit = (1 << 29), | 60 kEmbedderWorldIdLimit = (1 << 29), |
| 61 kDocumentXMLTreeViewerWorldId, | 61 kDocumentXMLTreeViewerWorldId, |
| 62 kIsolatedWorldIdLimit, | 62 kIsolatedWorldIdLimit, |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 | 218 |
| 219 const WorldType world_type_; | 219 const WorldType world_type_; |
| 220 const int world_id_; | 220 const int world_id_; |
| 221 std::unique_ptr<DOMDataStore> dom_data_store_; | 221 std::unique_ptr<DOMDataStore> dom_data_store_; |
| 222 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_; | 222 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_; |
| 223 }; | 223 }; |
| 224 | 224 |
| 225 } // namespace blink | 225 } // namespace blink |
| 226 | 226 |
| 227 #endif // DOMWrapperWorld_h | 227 #endif // DOMWrapperWorld_h |
| OLD | NEW |