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

Unified Diff: Source/core/inspector/InjectedScriptManager.h

Issue 300393002: Merge DevTools Refactor CL to Blink36 (Closed) Base URL: svn://svn.chromium.org/blink/branches/dart/1985
Patch Set: Created 6 years, 7 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/core/inspector/InjectedScriptManager.h
diff --git a/Source/core/inspector/InjectedScriptManager.h b/Source/core/inspector/InjectedScriptManager.h
index dd63488053374a250a7e1e7456d373960c1aff4d..8f3d808dc23392e79c70c7c2e3071750cbe416f0 100644
--- a/Source/core/inspector/InjectedScriptManager.h
+++ b/Source/core/inspector/InjectedScriptManager.h
@@ -39,6 +39,7 @@ namespace WebCore {
class DOMWindow;
class InjectedScript;
+class V8InjectedScript;
class InjectedScriptHost;
class ScriptObject;
@@ -53,10 +54,10 @@ public:
InjectedScriptHost* injectedScriptHost();
- InjectedScript injectedScriptFor(ScriptState*);
- InjectedScript injectedScriptForId(int);
+ InjectedScript& injectedScriptFor(ScriptState*);
vsm 2014/06/03 14:24:49 Rather than making these changes, you might try Ry
+ InjectedScript& injectedScriptForId(int);
int injectedScriptIdFor(ScriptState*);
- InjectedScript injectedScriptForObjectId(const String& objectId);
+ InjectedScript& injectedScriptForObjectId(const String& objectId);
void discardInjectedScripts();
void discardInjectedScriptsFor(DOMWindow*);
void releaseObjectGroup(const String& objectGroup);
@@ -66,6 +67,8 @@ public:
struct CallbackData;
static void setWeakCallback(const v8::WeakCallbackData<v8::Object, CallbackData>&);
+
+ InjectedScript& placeholderInjectedScript();
private:
explicit InjectedScriptManager(InspectedStateAccessCheck);
@@ -76,12 +79,14 @@ private:
static bool canAccessInspectedWorkerGlobalScope(ScriptState*);
int m_nextInjectedScriptId;
- typedef HashMap<int, InjectedScript> IdToInjectedScriptMap;
+ // FIXMEDART: use RefPtr<InjectedScript> instead.
+ typedef HashMap<int, InjectedScript*> IdToInjectedScriptMap;
IdToInjectedScriptMap m_idToInjectedScript;
RefPtr<InjectedScriptHost> m_injectedScriptHost;
InspectedStateAccessCheck m_inspectedStateAccessCheck;
typedef HashMap<RefPtr<ScriptState>, int> ScriptStateToId;
ScriptStateToId m_scriptStateToId;
+ V8InjectedScript* m_placeholderInjectedScript;
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698