Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: Source/core/inspector/InspectorConsoleAgent.h

Issue 16925002: XMLHttpRequest#responseText should use a rope (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address reviewer feedback Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
29 #include "InspectorFrontend.h" 28 #include "InspectorFrontend.h"
30 #include "bindings/v8/ScriptState.h" 29 #include "bindings/v8/ScriptState.h"
30 #include "bindings/v8/ScriptString.h"
31 #include "core/inspector/ConsoleAPITypes.h" 31 #include "core/inspector/ConsoleAPITypes.h"
32 #include "core/inspector/InspectorBaseAgent.h" 32 #include "core/inspector/InspectorBaseAgent.h"
33 #include "core/page/ConsoleTypes.h" 33 #include "core/page/ConsoleTypes.h"
34 #include <wtf/Forward.h> 34 #include <wtf/Forward.h>
35 #include <wtf/HashMap.h> 35 #include <wtf/HashMap.h>
36 #include <wtf/Noncopyable.h> 36 #include <wtf/Noncopyable.h>
37 #include <wtf/text/StringHash.h> 37 #include <wtf/text/StringHash.h>
38 #include <wtf/Vector.h> 38 #include <wtf/Vector.h>
39 39
40 namespace WebCore { 40 namespace WebCore {
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 81
82 Vector<unsigned> consoleMessageArgumentCounts(); 82 Vector<unsigned> consoleMessageArgumentCounts();
83 83
84 void startConsoleTiming(Frame*, const String& title); 84 void startConsoleTiming(Frame*, const String& title);
85 void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallSta ck>); 85 void stopConsoleTiming(Frame*, const String& title, PassRefPtr<ScriptCallSta ck>);
86 void consoleCount(ScriptState*, PassRefPtr<ScriptArguments>); 86 void consoleCount(ScriptState*, PassRefPtr<ScriptArguments>);
87 87
88 void frameWindowDiscarded(DOMWindow*); 88 void frameWindowDiscarded(DOMWindow*);
89 void didCommitLoad(Frame*, DocumentLoader*); 89 void didCommitLoad(Frame*, DocumentLoader*);
90 90
91 void didFinishXHRLoading(ThreadableLoaderClient*, unsigned long requestIdent ifier, const String&, const String& url, const String& sendURL, unsigned sendLin eNumber); 91 void didFinishXHRLoading(ThreadableLoaderClient*, unsigned long requestIdent ifier, ScriptString, const String& url, const String& sendURL, unsigned sendLine Number);
92 void didReceiveResourceResponse(unsigned long requestIdentifier, DocumentLoa der*, const ResourceResponse& response, ResourceLoader*); 92 void didReceiveResourceResponse(unsigned long requestIdentifier, DocumentLoa der*, const ResourceResponse& response, ResourceLoader*);
93 void didFailLoading(unsigned long requestIdentifier, DocumentLoader*, const ResourceError&); 93 void didFailLoading(unsigned long requestIdentifier, DocumentLoader*, const ResourceError&);
94 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL); 94 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, const String& sourceURL);
95 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum ber, const String& sourceURL); 95 void addStartProfilingMessageToConsole(const String& title, unsigned lineNum ber, const String& sourceURL);
96 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled); 96 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled);
97 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; 97 virtual void addInspectedNode(ErrorString*, int nodeId) = 0;
98 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) ; 98 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) ;
99 99
100 virtual bool isWorkerAgent() = 0; 100 virtual bool isWorkerAgent() = 0;
101 101
102 protected: 102 protected:
103 void addConsoleMessage(PassOwnPtr<ConsoleMessage>); 103 void addConsoleMessage(PassOwnPtr<ConsoleMessage>);
104 104
105 InjectedScriptManager* m_injectedScriptManager; 105 InjectedScriptManager* m_injectedScriptManager;
106 InspectorFrontend::Console* m_frontend; 106 InspectorFrontend::Console* m_frontend;
107 ConsoleMessage* m_previousMessage; 107 ConsoleMessage* m_previousMessage;
108 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages; 108 Vector<OwnPtr<ConsoleMessage> > m_consoleMessages;
109 int m_expiredConsoleMessageCount; 109 int m_expiredConsoleMessageCount;
110 HashMap<String, unsigned> m_counts; 110 HashMap<String, unsigned> m_counts;
111 HashMap<String, double> m_times; 111 HashMap<String, double> m_times;
112 bool m_enabled; 112 bool m_enabled;
113 private: 113 private:
114 static int s_enabledAgentCount; 114 static int s_enabledAgentCount;
115 }; 115 };
116 116
117 } // namespace WebCore 117 } // namespace WebCore
118 118
119 119
120 #endif // !defined(InspectorConsoleAgent_h) 120 #endif // !defined(InspectorConsoleAgent_h)
OLDNEW
« no previous file with comments | « Source/bindings/v8/custom/V8XMLHttpRequestCustom.cpp ('k') | Source/core/inspector/InspectorConsoleAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698