diff options
Diffstat (limited to 'src/3rdparty/webkit/WebCore/inspector/InspectorController.h')
-rw-r--r-- | src/3rdparty/webkit/WebCore/inspector/InspectorController.h | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h index ff7a516..8c14532 100644 --- a/src/3rdparty/webkit/WebCore/inspector/InspectorController.h +++ b/src/3rdparty/webkit/WebCore/inspector/InspectorController.h @@ -30,7 +30,9 @@ #define InspectorController_h #include "Console.h" +#include "Cookie.h" #include "PlatformString.h" +#include "ScriptArray.h" #include "ScriptObject.h" #include "ScriptState.h" #include "ScriptValue.h" @@ -39,6 +41,7 @@ #include <wtf/HashMap.h> #include <wtf/HashSet.h> +#include <wtf/ListHashSet.h> #include <wtf/RefCounted.h> #include <wtf/Vector.h> @@ -90,8 +93,9 @@ class InspectorController public: typedef HashMap<long long, RefPtr<InspectorResource> > ResourcesMap; typedef HashMap<RefPtr<Frame>, ResourcesMap*> FrameResourcesMap; - typedef HashSet<RefPtr<InspectorDatabaseResource> > DatabaseResourcesSet; - typedef HashSet<RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesSet; + typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap; + typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap; + typedef HashMap<String, Vector<String> > ObjectGroupsMap; typedef enum { CurrentPanel, @@ -224,11 +228,16 @@ public: bool resourceTrackingEnabled() const { return m_resourceTrackingEnabled; } void ensureResourceTrackingSettingsLoaded(); - void enableTimeline(bool always = false); - void disableTimeline(bool always = false); - bool timelineEnabled() const; + void startTimelineProfiler(); + void stopTimelineProfiler(); + bool timelineProfilerEnabled() const; InspectorTimelineAgent* timelineAgent() { return m_timelineAgent.get(); } + void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&); + void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&); + + void getCookies(long callId, const String& url); + #if ENABLE(DATABASE) void didOpenDatabase(Database*, const String& domain, const String& name, const String& version); #endif @@ -256,7 +265,6 @@ public: void addProfile(PassRefPtr<JSC::Profile>, unsigned lineNumber, const JSC::UString& sourceURL); void addProfileFinishedMessageToConsole(PassRefPtr<JSC::Profile>, unsigned lineNumber, const JSC::UString& sourceURL); void addStartProfilingMessageToConsole(const JSC::UString& title, unsigned lineNumber, const JSC::UString& sourceURL); - const ProfilesArray& profiles() const { return m_profiles; } bool isRecordingUserInitiatedProfile() const { return m_recordingUserInitiatedProfile; } @@ -280,6 +288,8 @@ public: virtual void didContinue(); #endif + void evaluateForTestInFrontend(long callId, const String& script); + private: friend class InspectorBackend; // Following are used from InspectorBackend and internally. @@ -295,21 +305,34 @@ private: // Following are used from InspectorFrontend only. We don't want to expose them to the // rest of the InspectorController clients. // TODO: extract these into a separate interface. - ScriptValue wrapObject(const ScriptValue& object); + ScriptValue wrapObject(const ScriptValue& object, const String& objectGroup); ScriptValue unwrapObject(const String& objectId); + void releaseWrapperObjectGroup(const String& objectGroup); void resetInjectedScript(); - void deleteCookie(const String& cookieName); + void deleteCookie(const String& cookieName, const String& domain); #if ENABLE(JAVASCRIPT_DEBUGGER) + typedef HashMap<unsigned int, RefPtr<JSC::Profile> > ProfilesMap; + void startUserInitiatedProfilingSoon(); void toggleRecordButton(bool); void enableDebuggerFromFrontend(bool always); + void getProfileHeaders(long callId); + void getProfile(long callId, unsigned uid); + ScriptObject createProfileHeader(const JSC::Profile& profile); +#endif +#if ENABLE(DATABASE) + void selectDatabase(Database* database); + Database* databaseForId(int databaseId); #endif #if ENABLE(DOM_STORAGE) InspectorDOMStorageResource* getDOMStorageResourceForId(int storageId); #endif + + ScriptObject buildObjectForCookie(const Cookie&); + ScriptArray buildArrayForCookies(ListHashSet<Cookie>&); void focusNode(); @@ -328,6 +351,8 @@ private: SpecialPanels specialPanelForJSName(const String& panelName); + void didEvaluateForTestInFrontend(long callId, const String& jsonResult); + Page* m_inspectedPage; InspectorClient* m_client; OwnPtr<InspectorFrontend> m_frontend; @@ -344,10 +369,10 @@ private: HashMap<String, double> m_times; HashMap<String, unsigned> m_counts; #if ENABLE(DATABASE) - DatabaseResourcesSet m_databaseResources; + DatabaseResourcesMap m_databaseResources; #endif #if ENABLE(DOM_STORAGE) - DOMStorageResourcesSet m_domStorageResources; + DOMStorageResourcesMap m_domStorageResources; #endif ScriptState* m_scriptState; bool m_windowVisible; @@ -360,8 +385,11 @@ private: bool m_resourceTrackingEnabled; bool m_resourceTrackingSettingsLoaded; RefPtr<InspectorBackend> m_inspectorBackend; - HashMap<String, ScriptValue> m_idToConsoleObject; + HashMap<String, ScriptValue> m_idToWrappedObject; + ObjectGroupsMap m_objectGroups; + long m_lastBoundObjectId; + Vector<pair<long, String> > m_pendingEvaluateTestCommands; #if ENABLE(JAVASCRIPT_DEBUGGER) bool m_debuggerEnabled; bool m_attachDebuggerWhenShown; @@ -370,7 +398,7 @@ private: int m_currentUserInitiatedProfileNumber; unsigned m_nextUserInitiatedProfileNumber; Timer<InspectorController> m_startProfiling; - ProfilesArray m_profiles; + ProfilesMap m_profiles; #endif }; |