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

Side by Side Diff: Source/devtools/front_end/sdk/DebuggerModel.js

Issue 310463003: DevTools: introduce TargetBreakpoints as a presentation of breakpoint and its state within target (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address vsevik's comments Created 6 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 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 30 matching lines...) Expand all
41 this._agent = target.debuggerAgent(); 41 this._agent = target.debuggerAgent();
42 42
43 /** @type {?WebInspector.DebuggerPausedDetails} */ 43 /** @type {?WebInspector.DebuggerPausedDetails} */
44 this._debuggerPausedDetails = null; 44 this._debuggerPausedDetails = null;
45 /** @type {!Object.<string, !WebInspector.Script>} */ 45 /** @type {!Object.<string, !WebInspector.Script>} */
46 this._scripts = {}; 46 this._scripts = {};
47 /** @type {!StringMap.<!Array.<!WebInspector.Script>>} */ 47 /** @type {!StringMap.<!Array.<!WebInspector.Script>>} */
48 this._scriptsBySourceURL = new StringMap(); 48 this._scriptsBySourceURL = new StringMap();
49 49
50 this._breakpointsActive = true; 50 this._breakpointsActive = true;
51 /** @type {!WebInspector.Object} */
52 this._breakpointResolvedEventTarget = new WebInspector.Object();
51 53
52 WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseO nExceptionStateChanged, this); 54 WebInspector.settings.pauseOnExceptionEnabled.addChangeListener(this._pauseO nExceptionStateChanged, this);
53 WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOn ExceptionStateChanged, this); 55 WebInspector.settings.pauseOnCaughtException.addChangeListener(this._pauseOn ExceptionStateChanged, this);
54 56
55 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt ackTracesStateChanged, this); 57 WebInspector.settings.enableAsyncStackTraces.addChangeListener(this._asyncSt ackTracesStateChanged, this);
56 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._asyncStackTracesStateChanged, this); 58 target.profilingLock.addEventListener(WebInspector.Lock.Events.StateChanged, this._asyncStackTracesStateChanged, this);
57 59
58 this.enableDebugger(); 60 this.enableDebugger();
59 61
60 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._applySki pStackFrameSettings, this); 62 WebInspector.settings.skipStackFramesSwitch.addChangeListener(this._applySki pStackFrameSettings, this);
(...skipping 12 matching lines...) Expand all
73 PauseOnUncaughtExceptions: "uncaught" 75 PauseOnUncaughtExceptions: "uncaught"
74 }; 76 };
75 77
76 WebInspector.DebuggerModel.Events = { 78 WebInspector.DebuggerModel.Events = {
77 DebuggerWasEnabled: "DebuggerWasEnabled", 79 DebuggerWasEnabled: "DebuggerWasEnabled",
78 DebuggerWasDisabled: "DebuggerWasDisabled", 80 DebuggerWasDisabled: "DebuggerWasDisabled",
79 DebuggerPaused: "DebuggerPaused", 81 DebuggerPaused: "DebuggerPaused",
80 DebuggerResumed: "DebuggerResumed", 82 DebuggerResumed: "DebuggerResumed",
81 ParsedScriptSource: "ParsedScriptSource", 83 ParsedScriptSource: "ParsedScriptSource",
82 FailedToParseScriptSource: "FailedToParseScriptSource", 84 FailedToParseScriptSource: "FailedToParseScriptSource",
83 BreakpointResolved: "BreakpointResolved",
84 GlobalObjectCleared: "GlobalObjectCleared", 85 GlobalObjectCleared: "GlobalObjectCleared",
85 CallFrameSelected: "CallFrameSelected", 86 CallFrameSelected: "CallFrameSelected",
86 ConsoleCommandEvaluatedInSelectedCallFrame: "ConsoleCommandEvaluatedInSelect edCallFrame", 87 ConsoleCommandEvaluatedInSelectedCallFrame: "ConsoleCommandEvaluatedInSelect edCallFrame",
87 BreakpointsActiveStateChanged: "BreakpointsActiveStateChanged" 88 BreakpointsActiveStateChanged: "BreakpointsActiveStateChanged"
88 } 89 }
89 90
90 WebInspector.DebuggerModel.BreakReason = { 91 WebInspector.DebuggerModel.BreakReason = {
91 DOM: "DOM", 92 DOM: "DOM",
92 EventListener: "EventListener", 93 EventListener: "EventListener",
93 XHR: "XHR", 94 XHR: "XHR",
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 callback(); 324 callback();
324 } 325 }
325 }, 326 },
326 327
327 /** 328 /**
328 * @param {!DebuggerAgent.BreakpointId} breakpointId 329 * @param {!DebuggerAgent.BreakpointId} breakpointId
329 * @param {!DebuggerAgent.Location} location 330 * @param {!DebuggerAgent.Location} location
330 */ 331 */
331 _breakpointResolved: function(breakpointId, location) 332 _breakpointResolved: function(breakpointId, location)
332 { 333 {
333 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.Breakpoi ntResolved, {breakpointId: breakpointId, location: WebInspector.DebuggerModel.Lo cation.fromPayload(this.target(), location)}); 334 this._breakpointResolvedEventTarget.dispatchEventToListeners(breakpointI d, WebInspector.DebuggerModel.Location.fromPayload(this.target(), location));
334 }, 335 },
335 336
336 _globalObjectCleared: function() 337 _globalObjectCleared: function()
337 { 338 {
338 this._setDebuggerPausedDetails(null); 339 this._setDebuggerPausedDetails(null);
339 this._reset(); 340 this._reset();
340 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared); 341 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared);
341 }, 342 },
342 343
343 _reset: function() 344 _reset: function()
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 { 700 {
700 if (error) { 701 if (error) {
701 console.error(error); 702 console.error(error);
702 callback(null); 703 callback(null);
703 return; 704 return;
704 } 705 }
705 callback(response); 706 callback(response);
706 } 707 }
707 }, 708 },
708 709
710 /**
711 * @param {!DebuggerAgent.BreakpointId} breakpointId
712 * @param {function(!WebInspector.Event)} listener
713 * @param {!Object=} thisObject
714 */
715 addBreakpointListener: function(breakpointId, listener, thisObject)
716 {
717 this._breakpointResolvedEventTarget.addEventListener(breakpointId, liste ner, thisObject)
718 },
719
720 /**
721 * @param {!DebuggerAgent.BreakpointId} breakpointId
722 * @param {function(!WebInspector.Event)} listener
723 * @param {!Object=} thisObject
724 */
725 removeBreakpointListener: function(breakpointId, listener, thisObject)
726 {
727 this._breakpointResolvedEventTarget.removeEventListener(breakpointId, li stener, thisObject);
728 },
729
709 __proto__: WebInspector.TargetAwareObject.prototype 730 __proto__: WebInspector.TargetAwareObject.prototype
710 } 731 }
711 732
712 WebInspector.DebuggerEventTypes = { 733 WebInspector.DebuggerEventTypes = {
713 JavaScriptPause: 0, 734 JavaScriptPause: 0,
714 JavaScriptBreakpoint: 1, 735 JavaScriptBreakpoint: 1,
715 NativeBreakpoint: 2 736 NativeBreakpoint: 2
716 }; 737 };
717 738
718 /** 739 /**
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 this.asyncStackTrace.dispose(); 1151 this.asyncStackTrace.dispose();
1131 }, 1152 },
1132 1153
1133 __proto__: WebInspector.TargetAware.prototype 1154 __proto__: WebInspector.TargetAware.prototype
1134 } 1155 }
1135 1156
1136 /** 1157 /**
1137 * @type {!WebInspector.DebuggerModel} 1158 * @type {!WebInspector.DebuggerModel}
1138 */ 1159 */
1139 WebInspector.debuggerModel; 1160 WebInspector.debuggerModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/BreakpointManager.js ('k') | Source/devtools/front_end/sdk/Target.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698