| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "wtf/Forward.h" | 34 #include "wtf/Forward.h" |
| 35 #include "wtf/HashCountedSet.h" | 35 #include "wtf/HashCountedSet.h" |
| 36 #include "wtf/HashMap.h" | 36 #include "wtf/HashMap.h" |
| 37 #include "wtf/Noncopyable.h" | 37 #include "wtf/Noncopyable.h" |
| 38 #include "wtf/Vector.h" | 38 #include "wtf/Vector.h" |
| 39 #include "wtf/text/StringHash.h" | 39 #include "wtf/text/StringHash.h" |
| 40 | 40 |
| 41 namespace WebCore { | 41 namespace WebCore { |
| 42 | 42 |
| 43 class ConsoleMessage; | 43 class ConsoleMessage; |
| 44 class InspectorConsoleMessage; |
| 44 class DocumentLoader; | 45 class DocumentLoader; |
| 45 class LocalDOMWindow; | 46 class LocalDOMWindow; |
| 46 class LocalFrame; | 47 class LocalFrame; |
| 48 class InspectorConsoleMessage; |
| 47 class InspectorFrontend; | 49 class InspectorFrontend; |
| 48 class InjectedScriptManager; | 50 class InjectedScriptManager; |
| 49 class InspectorTimelineAgent; | 51 class InspectorTimelineAgent; |
| 50 class InstrumentingAgents; | 52 class InstrumentingAgents; |
| 51 class ResourceError; | 53 class ResourceError; |
| 52 class ResourceLoader; | 54 class ResourceLoader; |
| 53 class ResourceResponse; | 55 class ResourceResponse; |
| 54 class ScriptArguments; | 56 class ScriptArguments; |
| 55 class ScriptCallStack; | 57 class ScriptCallStack; |
| 56 class ScriptProfile; | 58 class ScriptProfile; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 69 virtual void enable(ErrorString*) OVERRIDE FINAL; | 71 virtual void enable(ErrorString*) OVERRIDE FINAL; |
| 70 virtual void disable(ErrorString*) OVERRIDE FINAL; | 72 virtual void disable(ErrorString*) OVERRIDE FINAL; |
| 71 virtual void clearMessages(ErrorString*) OVERRIDE; | 73 virtual void clearMessages(ErrorString*) OVERRIDE; |
| 72 bool enabled() { return m_enabled; } | 74 bool enabled() { return m_enabled; } |
| 73 void reset(); | 75 void reset(); |
| 74 | 76 |
| 75 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 77 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; |
| 76 virtual void clearFrontend() OVERRIDE FINAL; | 78 virtual void clearFrontend() OVERRIDE FINAL; |
| 77 virtual void restore() OVERRIDE FINAL; | 79 virtual void restore() OVERRIDE FINAL; |
| 78 | 80 |
| 81 void addMessageToConsole(PassRefPtr<ConsoleMessage>); |
| 79 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>, unsigned lo
ng requestIdentifier = 0); | 82 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>, unsigned lo
ng requestIdentifier = 0); |
| 80 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, const String& scriptId, unsigned lineNumber, unsigned columnNumber
= 0, ScriptState* = 0, unsigned long requestIdentifier = 0); | |
| 81 | |
| 82 // FIXME: Remove once we no longer generate stacks outside of Inspector. | |
| 83 void addMessageToConsole(MessageSource, MessageType, MessageLevel, const Str
ing& message, PassRefPtrWillBeRawPtr<ScriptCallStack>, unsigned long requestIden
tifier = 0); | |
| 84 | 83 |
| 85 Vector<unsigned> consoleMessageArgumentCounts(); | 84 Vector<unsigned> consoleMessageArgumentCounts(); |
| 86 | 85 |
| 87 void consoleTime(ExecutionContext*, const String& title); | 86 void consoleTime(ExecutionContext*, const String& title); |
| 88 void consoleTimeEnd(ExecutionContext*, const String& title, ScriptState*); | 87 void consoleTimeEnd(ExecutionContext*, const String& title, ScriptState*); |
| 89 void consoleTimeline(ExecutionContext*, const String& title, ScriptState*); | 88 void consoleTimeline(ExecutionContext*, const String& title, ScriptState*); |
| 90 void consoleTimelineEnd(ExecutionContext*, const String& title, ScriptState*
); | 89 void consoleTimelineEnd(ExecutionContext*, const String& title, ScriptState*
); |
| 91 | 90 |
| 92 void consoleCount(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 91 void consoleCount(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); |
| 93 | 92 |
| 94 void frameWindowDiscarded(LocalDOMWindow*); | 93 void frameWindowDiscarded(LocalDOMWindow*); |
| 95 void didCommitLoad(LocalFrame*, DocumentLoader*); | 94 void didCommitLoad(LocalFrame*, DocumentLoader*); |
| 96 | 95 |
| 97 void didFinishXHRLoading(XMLHttpRequest*, ThreadableLoaderClient*, unsigned
long requestIdentifier, ScriptString, const AtomicString& method, const String&
url, const String& sendURL, unsigned sendLineNumber); | 96 void didFinishXHRLoading(XMLHttpRequest*, ThreadableLoaderClient*, unsigned
long requestIdentifier, ScriptString, const AtomicString& method, const String&
url, const String& sendURL, unsigned sendLineNumber); |
| 98 void didReceiveResourceResponse(LocalFrame*, unsigned long requestIdentifier
, DocumentLoader*, const ResourceResponse&, ResourceLoader*); | 97 void didReceiveResourceResponse(LocalFrame*, unsigned long requestIdentifier
, DocumentLoader*, const ResourceResponse&, ResourceLoader*); |
| 99 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); | 98 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); |
| 100 void addProfileFinishedMessageToConsole(PassRefPtrWillBeRawPtr<ScriptProfile
>, unsigned lineNumber, const String& sourceURL); | 99 void addProfileFinishedMessageToConsole(PassRefPtrWillBeRawPtr<ScriptProfile
>, unsigned lineNumber, const String& sourceURL); |
| 101 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); | 100 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); |
| 102 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) OVERRIDE; | 101 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) OVERRIDE; |
| 103 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; | 102 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; |
| 104 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
OVERRIDE; | 103 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
OVERRIDE; |
| 105 | 104 |
| 106 virtual bool isWorkerAgent() = 0; | 105 virtual bool isWorkerAgent() = 0; |
| 107 | 106 |
| 108 protected: | 107 protected: |
| 109 void addConsoleMessage(PassOwnPtr<ConsoleMessage>); | 108 void addConsoleMessage(PassOwnPtr<InspectorConsoleMessage>); |
| 110 | 109 |
| 111 InspectorTimelineAgent* m_timelineAgent; | 110 InspectorTimelineAgent* m_timelineAgent; |
| 112 InjectedScriptManager* m_injectedScriptManager; | 111 InjectedScriptManager* m_injectedScriptManager; |
| 113 InspectorFrontend::Console* m_frontend; | 112 InspectorFrontend::Console* m_frontend; |
| 114 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; | 113 Vector<OwnPtr<InspectorConsoleMessage> > m_consoleMessages; |
| 115 int m_expiredConsoleMessageCount; | 114 int m_expiredConsoleMessageCount; |
| 116 HashCountedSet<String> m_counts; | 115 HashCountedSet<String> m_counts; |
| 117 HashMap<String, double> m_times; | 116 HashMap<String, double> m_times; |
| 118 bool m_enabled; | 117 bool m_enabled; |
| 119 private: | 118 private: |
| 120 static int s_enabledAgentCount; | 119 static int s_enabledAgentCount; |
| 121 }; | 120 }; |
| 122 | 121 |
| 123 } // namespace WebCore | 122 } // namespace WebCore |
| 124 | 123 |
| 125 | 124 |
| 126 #endif // !defined(InspectorConsoleAgent_h) | 125 #endif // !defined(InspectorConsoleAgent_h) |
| OLD | NEW |