| 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 blink { | 41 namespace blink { |
| 42 | 42 |
| 43 class ConsoleMessage; | 43 class ConsoleMessage; |
| 44 class ConsoleMessageStorage; |
| 44 class DocumentLoader; | 45 class DocumentLoader; |
| 45 class LocalDOMWindow; | 46 class LocalDOMWindow; |
| 46 class LocalFrame; | 47 class LocalFrame; |
| 47 class InspectorConsoleMessage; | 48 class InspectorConsoleMessage; |
| 48 class InspectorFrontend; | 49 class InspectorFrontend; |
| 49 class InjectedScriptManager; | 50 class InjectedScriptManager; |
| 50 class InspectorTimelineAgent; | 51 class InspectorTimelineAgent; |
| 51 class InspectorTracingAgent; | 52 class InspectorTracingAgent; |
| 52 class InstrumentingAgents; | 53 class InstrumentingAgents; |
| 53 class ResourceError; | 54 class ResourceError; |
| (...skipping 21 matching lines...) Expand all Loading... |
| 75 virtual void clearMessages(ErrorString*) OVERRIDE; | 76 virtual void clearMessages(ErrorString*) OVERRIDE; |
| 76 bool enabled() { return m_enabled; } | 77 bool enabled() { return m_enabled; } |
| 77 void reset(); | 78 void reset(); |
| 78 | 79 |
| 79 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; | 80 virtual void setFrontend(InspectorFrontend*) OVERRIDE FINAL; |
| 80 virtual void clearFrontend() OVERRIDE FINAL; | 81 virtual void clearFrontend() OVERRIDE FINAL; |
| 81 virtual void restore() OVERRIDE FINAL; | 82 virtual void restore() OVERRIDE FINAL; |
| 82 | 83 |
| 83 void addMessageToConsole(ConsoleMessage*); | 84 void addMessageToConsole(ConsoleMessage*); |
| 84 void adoptWorkerConsoleMessages(WorkerGlobalScopeProxy*); | 85 void adoptWorkerConsoleMessages(WorkerGlobalScopeProxy*); |
| 85 Vector<unsigned> consoleMessageArgumentCounts(); | |
| 86 | 86 |
| 87 void consoleTime(ExecutionContext*, const String& title); | 87 void consoleTime(ExecutionContext*, const String& title); |
| 88 void consoleTimeEnd(ExecutionContext*, const String& title, ScriptState*); | 88 void consoleTimeEnd(ExecutionContext*, const String& title, ScriptState*); |
| 89 void setTracingBasedTimeline(ErrorString*, bool enabled); | 89 void setTracingBasedTimeline(ErrorString*, bool enabled); |
| 90 void consoleTimeline(ExecutionContext*, const String& title, ScriptState*); | 90 void consoleTimeline(ExecutionContext*, const String& title, ScriptState*); |
| 91 void consoleTimelineEnd(ExecutionContext*, const String& title, ScriptState*
); | 91 void consoleTimelineEnd(ExecutionContext*, const String& title, ScriptState*
); |
| 92 | 92 |
| 93 void consoleCount(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); | 93 void consoleCount(ScriptState*, PassRefPtrWillBeRawPtr<ScriptArguments>); |
| 94 | 94 |
| 95 void frameWindowDiscarded(LocalDOMWindow*); | 95 void frameWindowDiscarded(LocalDOMWindow*); |
| 96 void didCommitLoad(LocalFrame*, DocumentLoader*); | 96 void didCommitLoad(LocalFrame*, DocumentLoader*); |
| 97 | 97 |
| 98 void didFinishXHRLoading(XMLHttpRequest*, ThreadableLoaderClient*, unsigned
long requestIdentifier, ScriptString, const AtomicString& method, const String&
url, const String& sendURL, unsigned sendLineNumber); | 98 void didFinishXHRLoading(XMLHttpRequest*, ThreadableLoaderClient*, unsigned
long requestIdentifier, ScriptString, const AtomicString& method, const String&
url, const String& sendURL, unsigned sendLineNumber); |
| 99 void didReceiveResourceResponse(LocalFrame*, unsigned long requestIdentifier
, DocumentLoader*, const ResourceResponse&, ResourceLoader*); | 99 void didReceiveResourceResponse(LocalFrame*, unsigned long requestIdentifier
, DocumentLoader*, const ResourceResponse&, ResourceLoader*); |
| 100 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); | 100 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); |
| 101 void addProfileFinishedMessageToConsole(PassRefPtrWillBeRawPtr<ScriptProfile
>, unsigned lineNumber, const String& sourceURL); | 101 void addProfileFinishedMessageToConsole(PassRefPtrWillBeRawPtr<ScriptProfile
>, unsigned lineNumber, const String& sourceURL); |
| 102 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); | 102 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); |
| 103 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) OVERRIDE; | 103 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) OVERRIDE; |
| 104 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; | 104 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; |
| 105 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
OVERRIDE; | 105 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
OVERRIDE; |
| 106 | 106 |
| 107 virtual bool isWorkerAgent() = 0; | 107 virtual bool isWorkerAgent() = 0; |
| 108 | 108 |
| 109 protected: | 109 protected: |
| 110 void addConsoleMessage(PassOwnPtr<InspectorConsoleMessage>); | 110 void sendConsoleMessageToFrontend(ConsoleMessage*, bool generatePreview); |
| 111 virtual ConsoleMessageStorage* messageStorage() = 0; |
| 111 | 112 |
| 112 RawPtrWillBeMember<InspectorTimelineAgent> m_timelineAgent; | 113 RawPtrWillBeMember<InspectorTimelineAgent> m_timelineAgent; |
| 113 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; | 114 RawPtrWillBeMember<InspectorTracingAgent> m_tracingAgent; |
| 114 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; | 115 RawPtrWillBeMember<InjectedScriptManager> m_injectedScriptManager; |
| 115 InspectorFrontend::Console* m_frontend; | 116 InspectorFrontend::Console* m_frontend; |
| 116 Vector<OwnPtr<InspectorConsoleMessage> > m_consoleMessages; | |
| 117 int m_expiredConsoleMessageCount; | |
| 118 HashCountedSet<String> m_counts; | 117 HashCountedSet<String> m_counts; |
| 119 HashMap<String, double> m_times; | 118 HashMap<String, double> m_times; |
| 120 bool m_enabled; | 119 bool m_enabled; |
| 121 private: | 120 private: |
| 122 static int s_enabledAgentCount; | 121 static int s_enabledAgentCount; |
| 123 }; | 122 }; |
| 124 | 123 |
| 125 } // namespace blink | 124 } // namespace blink |
| 126 | 125 |
| 127 | 126 |
| 128 #endif // !defined(InspectorConsoleAgent_h) | 127 #endif // !defined(InspectorConsoleAgent_h) |
| OLD | NEW |