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

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..b868a4ce66fed61d186d7d5d965249f6687af32d 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,
+ BlinkInJSIsolatedWorldId,
abarth-chromium 2014/06/20 15:17:43 PrivateScriptWorldId ?
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 blinkInJSIsolatedWorldExtensionGroup = 1;
static PassRefPtr<DOMWrapperWorld> ensureIsolatedWorld(int worldId, int extensionGroup);
~DOMWrapperWorld();
void dispose();
@@ -87,6 +89,7 @@ public:
}
static DOMWrapperWorld& mainWorld();
+ static DOMWrapperWorld& blinkInJSWorld();
// 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 isBlinkInJSIsolatedWorld() const { return m_worldId == BlinkInJSIsolatedWorldId; }
bool isWorkerWorld() const { return m_worldId == WorkerWorldId; }
bool isIsolatedWorld() const { return MainWorldId < m_worldId && m_worldId < IsolatedWorldIdLimit; }

Powered by Google App Engine
This is Rietveld 408576698