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

Unified Diff: Source/bindings/v8/DOMWrapperWorld.h

Issue 345893002: Implement an infrastructure of Blink-in-JS Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: Source/bindings/v8/DOMWrapperWorld.h
diff --git a/Source/bindings/v8/DOMWrapperWorld.h b/Source/bindings/v8/DOMWrapperWorld.h
index aa294a1fcfb373780d3aed58c712780487ce999d..8d9024705dcdc8be62676324f74ffd5ac7a28094 100644
--- a/Source/bindings/v8/DOMWrapperWorld.h
+++ b/Source/bindings/v8/DOMWrapperWorld.h
@@ -51,6 +51,7 @@ enum WorldIdConstants {
// Embedder isolated worlds can use IDs in [1, 1<<29).
EmbedderWorldIdLimit = (1 << 29),
ScriptPreprocessorIsolatedWorldId,
+ PrivateScriptIsolatedWorldId,
IsolatedWorldIdLimit,
WorkerWorldId,
TestingWorldId,
@@ -62,6 +63,7 @@ public:
static PassRefPtr<DOMWrapperWorld> create(int worldId = -1, int extensionGroup = -1);
static const int mainWorldExtensionGroup = 0;
+ static const int privateScriptIsolatedWorldExtensionGroup = 1;
static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup);
~DOMWrapperWorld();
void dispose();
@@ -87,6 +89,7 @@ public:
}
static DOMWrapperWorld& mainWorld();
+ static DOMWrapperWorld& privateScriptWorld();
// Associates an isolated world (see above for description) with a security
// origin. XMLHttpRequest instances used in that world will be considered
@@ -106,6 +109,7 @@ public:
bool isolatedWorldHasContentSecurityPolicy();
bool isMainWorld() const { return m_worldId == MainWorldId; }
+ bool isPrivateScriptIsolatedWorld() const { return m_worldId == PrivateScriptIsolatedWorldId; }
bool isWorkerWorld() const { return m_worldId == WorkerWorldId; }
bool isIsolatedWorld() const { return MainWorldId < m_worldId && m_worldId < IsolatedWorldIdLimit; }
« no previous file with comments | « Source/bindings/tests/results/V8TestPrivateScriptInterface.cpp ('k') | Source/bindings/v8/DOMWrapperWorld.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698