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

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

Issue 17030009: Inspector: wrapped inspector agent instances into factory-like wrappers (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Addressed comments 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) 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010-2011 Google Inc. All rights reserved. 3 * Copyright (C) 2010-2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 class InspectorState; 54 class InspectorState;
55 class InspectorValue; 55 class InspectorValue;
56 class InstrumentingAgents; 56 class InstrumentingAgents;
57 class ScriptArguments; 57 class ScriptArguments;
58 class ScriptCallStack; 58 class ScriptCallStack;
59 class ScriptDebugServer; 59 class ScriptDebugServer;
60 class ScriptValue; 60 class ScriptValue;
61 61
62 typedef String ErrorString; 62 typedef String ErrorString;
63 63
64 class InspectorDebuggerAgent : public InspectorBaseAgent<InspectorDebuggerAgent> , public ScriptDebugListener, public InspectorBackendDispatcher::DebuggerCommand Handler { 64 class InspectorDebuggerAgent : public InspectorBaseAgent, public ScriptDebugList ener, public InspectorBackendDispatcher::DebuggerCommandHandler {
65 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED; 65 WTF_MAKE_NONCOPYABLE(InspectorDebuggerAgent); WTF_MAKE_FAST_ALLOCATED;
66 public: 66 public:
67 enum BreakpointSource { 67 enum BreakpointSource {
68 UserBreakpointSource, 68 UserBreakpointSource,
69 DebugCommandBreakpointSource, 69 DebugCommandBreakpointSource,
70 MonitorCommandBreakpointSource 70 MonitorCommandBreakpointSource
71 }; 71 };
72 72
73 static const char* backtraceObjectGroup; 73 static const char* backtraceObjectGroup;
74 74
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 void setListener(Listener* listener) { m_listener = listener; } 139 void setListener(Listener* listener) { m_listener = listener; }
140 140
141 virtual ScriptDebugServer& scriptDebugServer() = 0; 141 virtual ScriptDebugServer& scriptDebugServer() = 0;
142 142
143 virtual void reportMemoryUsage(MemoryObjectInfo*) const; 143 virtual void reportMemoryUsage(MemoryObjectInfo*) const;
144 144
145 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource, const String& condition = String()); 145 void setBreakpoint(const String& scriptId, int lineNumber, int columnNumber, BreakpointSource, const String& condition = String());
146 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb er, BreakpointSource); 146 void removeBreakpoint(const String& scriptId, int lineNumber, int columnNumb er, BreakpointSource);
147 147
148 protected: 148 protected:
149 InspectorDebuggerAgent(InstrumentingAgents*, InspectorCompositeState*, Injec tedScriptManager*); 149 InspectorDebuggerAgent(InstrumentingAgents*, InspectorState*, InjectedScript Manager*);
150 150
151 virtual void startListeningScriptDebugServer() = 0; 151 virtual void startListeningScriptDebugServer() = 0;
152 virtual void stopListeningScriptDebugServer() = 0; 152 virtual void stopListeningScriptDebugServer() = 0;
153 virtual void muteConsole() = 0; 153 virtual void muteConsole() = 0;
154 virtual void unmuteConsole() = 0; 154 virtual void unmuteConsole() = 0;
155 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana ger; } 155 InjectedScriptManager* injectedScriptManager() { return m_injectedScriptMana ger; }
156 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) = 0; 156 virtual InjectedScript injectedScriptForEval(ErrorString*, const int* execut ionContextId) = 0;
157 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me ssage, const String& sourceURL) = 0; 157 virtual void addConsoleMessage(MessageSource, MessageLevel, const String& me ssage, const String& sourceURL) = 0;
158 158
159 virtual void enable(); 159 virtual void enable();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 ScriptsMap m_scripts; 194 ScriptsMap m_scripts;
195 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds; 195 BreakpointIdToDebugServerBreakpointIdsMap m_breakpointIdToDebugServerBreakpo intIds;
196 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints; 196 DebugServerBreakpointToBreakpointIdAndSourceMap m_serverBreakpoints;
197 String m_continueToLocationBreakpointId; 197 String m_continueToLocationBreakpointId;
198 InspectorFrontend::Debugger::Reason::Enum m_breakReason; 198 InspectorFrontend::Debugger::Reason::Enum m_breakReason;
199 RefPtr<InspectorObject> m_breakAuxData; 199 RefPtr<InspectorObject> m_breakAuxData;
200 bool m_javaScriptPauseScheduled; 200 bool m_javaScriptPauseScheduled;
201 Listener* m_listener; 201 Listener* m_listener;
202 }; 202 };
203 203
204 class InspectorDebuggerFactory : public InspectorBaseFactory<InspectorDebuggerFa ctory, InspectorDebuggerAgent> {
205 protected:
206 InspectorDebuggerFactory(InstrumentingAgents* instrumentingAgents, Inspector CompositeState* compositeState)
207 : InspectorBaseFactory<InspectorDebuggerFactory, InspectorDebuggerAgent> ("Debugger", instrumentingAgents, compositeState) { }
208 };
209
204 } // namespace WebCore 210 } // namespace WebCore
205 211
206 212
207 #endif // !defined(InspectorDebuggerAgent_h) 213 #endif // !defined(InspectorDebuggerAgent_h)
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorDatabaseAgent.cpp ('k') | Source/core/inspector/InspectorDebuggerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698