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

Unified Diff: Source/bindings/core/v8/DOMWrapperWorld.cpp

Issue 15764004: DevTools: show extension name in console context switcher (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: correct rebaseline Created 6 years, 4 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/core/v8/DOMWrapperWorld.cpp
diff --git a/Source/bindings/core/v8/DOMWrapperWorld.cpp b/Source/bindings/core/v8/DOMWrapperWorld.cpp
index e1dc37478369989d038b26fb2add591920e5492b..2895b7875866bb24c02b7f4c9b41ba66ed5eabe1 100644
--- a/Source/bindings/core/v8/DOMWrapperWorld.cpp
+++ b/Source/bindings/core/v8/DOMWrapperWorld.cpp
@@ -172,6 +172,26 @@ void DOMWrapperWorld::setIsolatedWorldSecurityOrigin(int worldId, PassRefPtr<Sec
isolatedWorldSecurityOrigins().remove(worldId);
}
+typedef HashMap<int, String > IsolatedWorldHumanReadableNameMap;
+static IsolatedWorldHumanReadableNameMap& isolatedWorldHumanReadableNames()
+{
+ ASSERT(isMainThread());
+ DEFINE_STATIC_LOCAL(IsolatedWorldHumanReadableNameMap, map, ());
+ return map;
+}
+
+String DOMWrapperWorld::isolatedWorldHumanReadableName()
+{
+ ASSERT(this->isIsolatedWorld());
+ return isolatedWorldHumanReadableNames().get(worldId());
+}
+
+void DOMWrapperWorld::setIsolatedWorldHumanReadableName(int worldId, const String& humanReadableName)
+{
+ ASSERT(isIsolatedWorldId(worldId));
+ isolatedWorldHumanReadableNames().set(worldId, humanReadableName);
+}
+
typedef HashMap<int, bool> IsolatedWorldContentSecurityPolicyMap;
static IsolatedWorldContentSecurityPolicyMap& isolatedWorldContentSecurityPolicies()
{

Powered by Google App Engine
This is Rietveld 408576698