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

Side by Side Diff: third_party/WebKit/Source/platform/bindings/DOMWrapperWorld.h

Issue 2902953003: Revert of Allow headless TabSocket in isolated worlds & remove obsolete logic (Closed)
Patch Set: Created 3 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
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 21 matching lines...) Expand all
32 #define DOMWrapperWorld_h 32 #define DOMWrapperWorld_h
33 33
34 #include <memory> 34 #include <memory>
35 35
36 #include "platform/PlatformExport.h" 36 #include "platform/PlatformExport.h"
37 #include "platform/bindings/ScriptState.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 "public/platform/WebIsolatedWorldIds.h"
43 #include "v8/include/v8.h" 42 #include "v8/include/v8.h"
44 43
45 namespace blink { 44 namespace blink {
46 45
47 class DOMDataStore; 46 class DOMDataStore;
48 class DOMObjectHolderBase; 47 class DOMObjectHolderBase;
49 48
50 // 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
51 // 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
52 // WorldId enum). 51 // WorldId enum).
53 class PLATFORM_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> { 52 class PLATFORM_EXPORT DOMWrapperWorld : public RefCounted<DOMWrapperWorld> {
54 public: 53 public:
55 // Per-thread global identifiers for DOMWrapperWorld. 54 // Per-thread global identifiers for DOMWrapperWorld.
56 enum WorldId { 55 enum WorldId {
57 kInvalidWorldId = -1, 56 kInvalidWorldId = -1,
58 kMainWorldId = 0, 57 kMainWorldId = 0,
59 58
60 kEmbedderWorldIdLimit = IsolatedWorldId::kEmbedderWorldIdLimit, 59 // Embedder isolated worlds can use IDs in [1, 1<<29).
61 kIsolatedWorldIdLimit = IsolatedWorldId::kIsolatedWorldIdLimit, 60 kEmbedderWorldIdLimit = (1 << 29),
61 kDocumentXMLTreeViewerWorldId,
62 kDevToolsFirstIsolatedWorldId,
63 kDevToolsLastIsolatedWorldId = kDevToolsFirstIsolatedWorldId + 100,
64 kIsolatedWorldIdLimit,
62 65
63 // Other worlds can use IDs after this. Don't manually pick up an ID from 66 // Other worlds can use IDs after this. Don't manually pick up an ID from
64 // this range. generateWorldIdForType() picks it up on behalf of you. 67 // this range. generateWorldIdForType() picks it up on behalf of you.
65 kUnspecifiedWorldIdStart, 68 kUnspecifiedWorldIdStart,
66 }; 69 };
67 70
68 enum class WorldType { 71 enum class WorldType {
69 kMain, 72 kMain,
70 kIsolated, 73 kIsolated,
71 kInspectorIsolated, 74 kInspectorIsolated,
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 225
223 const WorldType world_type_; 226 const WorldType world_type_;
224 const int world_id_; 227 const int world_id_;
225 std::unique_ptr<DOMDataStore> dom_data_store_; 228 std::unique_ptr<DOMDataStore> dom_data_store_;
226 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_; 229 HashSet<std::unique_ptr<DOMObjectHolderBase>> dom_object_holders_;
227 }; 230 };
228 231
229 } // namespace blink 232 } // namespace blink
230 233
231 #endif // DOMWrapperWorld_h 234 #endif // DOMWrapperWorld_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698