diff options
Diffstat (limited to 'WebCore/inspector/InspectorController.h')
-rw-r--r-- | WebCore/inspector/InspectorController.h | 86 |
1 files changed, 35 insertions, 51 deletions
diff --git a/WebCore/inspector/InspectorController.h b/WebCore/inspector/InspectorController.h index c6f516d..a047962 100644 --- a/WebCore/inspector/InspectorController.h +++ b/WebCore/inspector/InspectorController.h @@ -32,10 +32,8 @@ #include "CharacterData.h" #include "Console.h" #include "Cookie.h" -#include "Element.h" #include "Page.h" #include "PlatformString.h" -#include "ScriptState.h" #include <wtf/HashMap.h> #include <wtf/HashSet.h> #include <wtf/ListHashSet.h> @@ -51,7 +49,6 @@ class ConsoleMessage; class Database; class Document; class DocumentLoader; -class Element; class FloatRect; class GraphicsContext; class HitTestResult; @@ -71,6 +68,8 @@ class InspectorFrontendClient; class InspectorObject; class InspectorProfilerAgent; class InspectorResource; +class InspectorResourceAgent; +class InspectorState; class InspectorStorageAgent; class InspectorTimelineAgent; class InspectorValue; @@ -84,7 +83,6 @@ class ResourceResponse; class ResourceError; class ScriptCallStack; class ScriptProfile; -class ScriptString; class SharedBuffer; class Storage; class StorageArea; @@ -105,6 +103,7 @@ public: typedef HashMap<int, RefPtr<InspectorDatabaseResource> > DatabaseResourcesMap; typedef HashMap<int, RefPtr<InspectorDOMStorageResource> > DOMStorageResourcesMap; + static const char* const LastActivePanel; static const char* const ConsolePanel; static const char* const ElementsPanel; static const char* const ProfilesPanel; @@ -125,13 +124,11 @@ public: Page* inspectedPage() const { return m_inspectedPage; } void reloadPage(); - String setting(const String& key) const; - void setSetting(const String& key, const String& value); void saveApplicationSettings(const String& settings); void saveSessionSettings(const String&); void getSettings(RefPtr<InspectorObject>*); - void restoreInspectorStateFromCookie(const String& inspectorState); + void restoreInspectorStateFromCookie(const String& inspectorCookie); void inspect(Node*); void highlight(Node*); @@ -143,19 +140,17 @@ public: void showPanel(const String&); void close(); - // We are in transition from JS transport via webInspector to native - // transport via InspectorClient. After migration, webInspector parameter should - // be removed. void connectFrontend(); void reuseFrontend(); void disconnectFrontend(); + void setConsoleMessagesEnabled(bool enabled, bool* newState); void addMessageToConsole(MessageSource, MessageType, MessageLevel, ScriptCallStack*, const String& message); void addMessageToConsole(MessageSource, MessageType, MessageLevel, const String& message, unsigned lineNumber, const String& sourceID); void clearConsoleMessages(); const Vector<OwnPtr<ConsoleMessage> >& consoleMessages() const { return m_consoleMessages; } - bool searchingForNodeInPage() const { return m_searchingForNode; } + bool searchingForNodeInPage() const; void mouseDidMoveOverElement(const HitTestResult&, unsigned modifierFlags); void handleMousePress(); @@ -171,16 +166,16 @@ public: void identifierForInitialRequest(unsigned long identifier, DocumentLoader*, const ResourceRequest&); void willSendRequest(unsigned long identifier, ResourceRequest&, const ResourceResponse& redirectResponse); void markResourceAsCached(unsigned long identifier); - void didReceiveResponse(unsigned long identifier, const ResourceResponse&); + void didReceiveResponse(unsigned long identifier, DocumentLoader*, const ResourceResponse&); void didReceiveContentLength(unsigned long identifier, int lengthReceived); void didFinishLoading(unsigned long identifier, double finishTime); void didFailLoading(unsigned long identifier, const ResourceError&); - void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const ScriptString& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); + void resourceRetrievedByXMLHttpRequest(unsigned long identifier, const String& sourceString, const String& url, const String& sendURL, unsigned sendLineNumber); void scriptImported(unsigned long identifier, const String& sourceString); void setResourceTrackingEnabled(bool enabled); void setResourceTrackingEnabled(bool enabled, bool always, bool* newState); - bool resourceTrackingEnabled() const { return m_resourceTrackingEnabled; } + bool resourceTrackingEnabled() const; void ensureSettingsLoaded(); @@ -198,15 +193,6 @@ public: void mainResourceFiredLoadEvent(DocumentLoader*, const KURL&); void mainResourceFiredDOMContentEvent(DocumentLoader*, const KURL&); - static void willInsertDOMNode(Node* node, Node* parent); - static void didInsertDOMNode(Node*); - static void willRemoveDOMNode(Node*); - static void willModifyDOMAttr(Element*); - static void didModifyDOMAttr(Element*); - static void characterDataModified(CharacterData*); - - static void instrumentWillSendXMLHttpRequest(ScriptExecutionContext*, const KURL&); - #if ENABLE(WORKERS) enum WorkerAction { WorkerCreated, WorkerDestroyed }; @@ -270,9 +256,8 @@ public: InspectorDebuggerAgent* debuggerAgent() const { return m_debuggerAgent.get(); } void resume(); - void setNativeBreakpoint(PassRefPtr<InspectorObject> breakpoint, unsigned int* breakpointId); - void removeNativeBreakpoint(unsigned int breakpointId); - + void setNativeBreakpoint(PassRefPtr<InspectorObject> breakpoint, String* breakpointId); + void removeNativeBreakpoint(const String& breakpointId); #endif void evaluateForTestInFrontend(long testCallId, const String& script); @@ -283,14 +268,20 @@ public: void removeAllScriptsToEvaluateOnLoad(); void setInspectorExtensionAPI(const String& source); - static const String& inspectorStartsAttachedSettingName(); + bool inspectorStartsAttached(); + void setInspectorStartsAttached(bool); + void setInspectorAttachedHeight(long height); + int inspectorAttachedHeight() const; + + static const unsigned defaultAttachedHeight; private: - void updateInspectorStateCookie(); void getInspectorState(RefPtr<InspectorObject>* state); + void setConsoleMessagesEnabled(bool enabled); friend class InspectorBackend; friend class InspectorBackendDispatcher; + friend class InspectorInstrumentation; friend class InjectedScriptHost; void populateScriptObjects(); @@ -308,9 +299,11 @@ private: void releaseFrontendLifetimeAgents(); #if ENABLE(JAVASCRIPT_DEBUGGER) - void toggleRecordButton(bool); void enableDebuggerFromFrontend(bool always); + + String findEventListenerBreakpoint(const String& eventName); + String findXHRBreakpoint(const String& url); #endif #if ENABLE(DATABASE) void selectDatabase(Database* database); @@ -325,12 +318,12 @@ private: void focusNode(); - void addConsoleMessage(ScriptState*, PassOwnPtr<ConsoleMessage>); + void addConsoleMessage(PassOwnPtr<ConsoleMessage>); void addResource(InspectorResource*); void removeResource(InspectorResource*); InspectorResource* getTrackedResource(unsigned long identifier); - void getResourceContent(unsigned long identifier, String* content); + void getResourceContent(unsigned long identifier, bool encode, String* content); void pruneResources(ResourcesMap*, DocumentLoader* loaderToKeep = 0); void removeAllResources(ResourcesMap* map) { pruneResources(map); } @@ -339,20 +332,6 @@ private: void didEvaluateForTestInFrontend(long callId, const String& jsonResult); - static InspectorController* inspectorControllerForScriptExecutionContext(ScriptExecutionContext* context); - static InspectorController* inspectorControllerForNode(Node*); - static InspectorController* inspectorControllerForDocument(Document* document); - - void willInsertDOMNodeImpl(Node* node, Node* parent); - void didInsertDOMNodeImpl(Node*); - void willRemoveDOMNodeImpl(Node*); - void didRemoveDOMNodeImpl(Node*); - void willModifyDOMAttrImpl(Element*); - void didModifyDOMAttrImpl(Element*); - void characterDataModifiedImpl(CharacterData*); - - void instrumentWillSendXMLHttpRequestImpl(const KURL&); - #if ENABLE(JAVASCRIPT_DEBUGGER) friend class InspectorDebuggerAgent; String breakpointsSettingKey(); @@ -360,17 +339,17 @@ private: void saveBreakpoints(PassRefPtr<InspectorObject> breakpoints); #endif - static unsigned s_inspectorControllerCount; - Page* m_inspectedPage; InspectorClient* m_client; OwnPtr<InspectorFrontendClient> m_inspectorFrontendClient; bool m_openingFrontend; OwnPtr<InspectorFrontend> m_frontend; RefPtr<InspectorDOMAgent> m_domAgent; + RefPtr<InspectorResourceAgent> m_resourceAgent; RefPtr<InspectorStorageAgent> m_storageAgent; OwnPtr<InspectorCSSStore> m_cssStore; OwnPtr<InspectorTimelineAgent> m_timelineAgent; + OwnPtr<InspectorState> m_state; #if ENABLE(OFFLINE_WEB_APPLICATIONS) OwnPtr<InspectorApplicationCacheAgent> m_applicationCacheAgent; @@ -381,6 +360,8 @@ private: ResourcesMap m_resources; HashSet<String> m_knownResources; FrameResourcesMap m_frameResources; + double m_loadEventTime; + double m_domContentEventTime; Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; unsigned m_expiredConsoleMessageCount; HashMap<String, double> m_times; @@ -397,10 +378,7 @@ private: RefPtr<InspectorValue> m_sessionSettings; #endif unsigned m_groupLevel; - bool m_searchingForNode; - bool m_monitoringXHR; ConsoleMessage* m_previousMessage; - bool m_resourceTrackingEnabled; bool m_settingsLoaded; RefPtr<InspectorBackend> m_inspectorBackend; OwnPtr<InspectorBackendDispatcher> m_inspectorBackendDispatcher; @@ -416,7 +394,10 @@ private: bool m_attachDebuggerWhenShown; OwnPtr<InspectorDebuggerAgent> m_debuggerAgent; - HashMap<unsigned int, String> m_XHRBreakpoints; + HashMap<String, String> m_nativeBreakpoints; + HashSet<String> m_eventListenerBreakpoints; + HashMap<String, String> m_XHRBreakpoints; + unsigned int m_lastBreakpointId; OwnPtr<InspectorProfilerAgent> m_profilerAgent; @@ -428,6 +409,7 @@ private: #endif }; +<<<<<<< HEAD inline void InspectorController::willInsertDOMNode(Node* node, Node* parent) { #if ENABLE(INSPECTOR) @@ -518,6 +500,8 @@ inline InspectorController* InspectorController::inspectorControllerForDocument( #endif } +======= +>>>>>>> webkit.org at r70209 } // namespace WebCore #endif // !defined(InspectorController_h) |