| 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 |
| 11 * documentation and/or other materials provided with the distribution. | 11 * documentation and/or other materials provided with the distribution. |
| 12 * | 12 * |
| 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND AN
Y | 13 * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND AN
Y |
| 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | 14 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
| 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | 15 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR AN
Y | 16 * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR AN
Y |
| 17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | 17 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES |
| 18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | 18 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; |
| 19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND O
N | 19 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND O
N |
| 20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 20 * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | 21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS |
| 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 22 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 23 */ | 23 */ |
| 24 | 24 |
| 25 #ifndef InspectorConsoleAgent_h | 25 #ifndef InspectorConsoleAgent_h |
| 26 #define InspectorConsoleAgent_h | 26 #define InspectorConsoleAgent_h |
| 27 | 27 |
| 28 #if ENABLE(INSPECTOR) | |
| 29 | 28 |
| 30 #include "ConsoleAPITypes.h" | 29 #include "ConsoleAPITypes.h" |
| 31 #include "ConsoleTypes.h" | 30 #include "ConsoleTypes.h" |
| 32 #include "InspectorBaseAgent.h" | 31 #include "InspectorBaseAgent.h" |
| 33 #include "InspectorFrontend.h" | 32 #include "InspectorFrontend.h" |
| 34 #include "ScriptState.h" | 33 #include "ScriptState.h" |
| 35 #include <wtf/Forward.h> | 34 #include <wtf/Forward.h> |
| 36 #include <wtf/HashMap.h> | 35 #include <wtf/HashMap.h> |
| 37 #include <wtf/Noncopyable.h> | 36 #include <wtf/Noncopyable.h> |
| 38 #include <wtf/text/StringHash.h> | 37 #include <wtf/text/StringHash.h> |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 | 79 |
| 81 void startTiming(const String& title); | 80 void startTiming(const String& title); |
| 82 void stopTiming(const String& title, PassRefPtr<ScriptCallStack>); | 81 void stopTiming(const String& title, PassRefPtr<ScriptCallStack>); |
| 83 void count(ScriptState*, PassRefPtr<ScriptArguments>); | 82 void count(ScriptState*, PassRefPtr<ScriptArguments>); |
| 84 | 83 |
| 85 void frameWindowDiscarded(DOMWindow*); | 84 void frameWindowDiscarded(DOMWindow*); |
| 86 | 85 |
| 87 void didFinishXHRLoading(unsigned long requestIdentifier, const String& url,
const String& sendURL, unsigned sendLineNumber); | 86 void didFinishXHRLoading(unsigned long requestIdentifier, const String& url,
const String& sendURL, unsigned sendLineNumber); |
| 88 void didReceiveResponse(unsigned long requestIdentifier, const ResourceRespo
nse&); | 87 void didReceiveResponse(unsigned long requestIdentifier, const ResourceRespo
nse&); |
| 89 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); | 88 void didFailLoading(unsigned long requestIdentifier, const ResourceError&); |
| 90 #if ENABLE(JAVASCRIPT_DEBUGGER) | |
| 91 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned
lineNumber, const String& sourceURL); | 89 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned
lineNumber, const String& sourceURL); |
| 92 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); | 90 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum
ber, const String& sourceURL); |
| 93 #endif | |
| 94 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled); | 91 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled); |
| 95 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; | 92 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; |
| 96 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
; | 93 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)
; |
| 97 | 94 |
| 98 virtual bool isWorkerAgent() = 0; | 95 virtual bool isWorkerAgent() = 0; |
| 99 | 96 |
| 100 protected: | 97 protected: |
| 101 void addConsoleMessage(PassOwnPtr<ConsoleMessage>); | 98 void addConsoleMessage(PassOwnPtr<ConsoleMessage>); |
| 102 | 99 |
| 103 virtual bool developerExtrasEnabled() = 0; | 100 virtual bool developerExtrasEnabled() = 0; |
| 104 | 101 |
| 105 InjectedScriptManager* m_injectedScriptManager; | 102 InjectedScriptManager* m_injectedScriptManager; |
| 106 InspectorFrontend::Console* m_frontend; | 103 InspectorFrontend::Console* m_frontend; |
| 107 ConsoleMessage* m_previousMessage; | 104 ConsoleMessage* m_previousMessage; |
| 108 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; | 105 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; |
| 109 int m_expiredConsoleMessageCount; | 106 int m_expiredConsoleMessageCount; |
| 110 HashMap<String, unsigned> m_counts; | 107 HashMap<String, unsigned> m_counts; |
| 111 HashMap<String, double> m_times; | 108 HashMap<String, double> m_times; |
| 112 bool m_enabled; | 109 bool m_enabled; |
| 113 private: | 110 private: |
| 114 static int s_enabledAgentCount; | 111 static int s_enabledAgentCount; |
| 115 }; | 112 }; |
| 116 | 113 |
| 117 } // namespace WebCore | 114 } // namespace WebCore |
| 118 | 115 |
| 119 #endif // ENABLE(INSPECTOR) | |
| 120 | 116 |
| 121 #endif // !defined(InspectorConsoleAgent_h) | 117 #endif // !defined(InspectorConsoleAgent_h) |
| OLD | NEW |