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

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

Issue 369853002: DevTools: Rename TargetAwareObject into SDKObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase on master Created 6 years, 5 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 12 matching lines...) Expand all
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 /** 31 /**
32 * @constructor 32 * @constructor
33 * @extends {WebInspector.TargetAwareObject} 33 * @extends {WebInspector.SDKObject}
34 * @param {!WebInspector.Target} target 34 * @param {!WebInspector.Target} target
35 */ 35 */
36 WebInspector.DebuggerModel = function(target) 36 WebInspector.DebuggerModel = function(target)
37 { 37 {
38 WebInspector.TargetAwareObject.call(this, target); 38 WebInspector.SDKObject.call(this, target);
39 39
40 target.registerDebuggerDispatcher(new WebInspector.DebuggerDispatcher(this)) ; 40 target.registerDebuggerDispatcher(new WebInspector.DebuggerDispatcher(this)) ;
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();
(...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 dispose: function() 747 dispose: function()
748 { 748 {
749 WebInspector.settings.pauseOnExceptionEnabled.removeChangeListener(this. _pauseOnExceptionStateChanged, this); 749 WebInspector.settings.pauseOnExceptionEnabled.removeChangeListener(this. _pauseOnExceptionStateChanged, this);
750 WebInspector.settings.pauseOnCaughtException.removeChangeListener(this._ pauseOnExceptionStateChanged, this); 750 WebInspector.settings.pauseOnCaughtException.removeChangeListener(this._ pauseOnExceptionStateChanged, this);
751 751
752 WebInspector.settings.skipStackFramesSwitch.removeChangeListener(this._a pplySkipStackFrameSettings, this); 752 WebInspector.settings.skipStackFramesSwitch.removeChangeListener(this._a pplySkipStackFrameSettings, this);
753 WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._ applySkipStackFrameSettings, this); 753 WebInspector.settings.skipStackFramesPattern.removeChangeListener(this._ applySkipStackFrameSettings, this);
754 WebInspector.settings.enableAsyncStackTraces.removeChangeListener(this._ asyncStackTracesStateChanged, this); 754 WebInspector.settings.enableAsyncStackTraces.removeChangeListener(this._ asyncStackTracesStateChanged, this);
755 }, 755 },
756 756
757 __proto__: WebInspector.TargetAwareObject.prototype 757 __proto__: WebInspector.SDKObject.prototype
758 } 758 }
759 759
760 WebInspector.DebuggerEventTypes = { 760 WebInspector.DebuggerEventTypes = {
761 JavaScriptPause: 0, 761 JavaScriptPause: 0,
762 JavaScriptBreakpoint: 1, 762 JavaScriptBreakpoint: 1,
763 NativeBreakpoint: 2 763 NativeBreakpoint: 2
764 }; 764 };
765 765
766 /** 766 /**
767 * @constructor 767 * @constructor
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 */ 835 */
836 breakpointResolved: function(breakpointId, location) 836 breakpointResolved: function(breakpointId, location)
837 { 837 {
838 this._debuggerModel._breakpointResolved(breakpointId, location); 838 this._debuggerModel._breakpointResolved(breakpointId, location);
839 } 839 }
840 } 840 }
841 841
842 /** 842 /**
843 * @constructor 843 * @constructor
844 * @implements {WebInspector.RawLocation} 844 * @implements {WebInspector.RawLocation}
845 * @extends {WebInspector.TargetAware} 845 * @extends {WebInspector.SDKObject}
846 * @param {!WebInspector.Target} target 846 * @param {!WebInspector.Target} target
847 * @param {string} scriptId 847 * @param {string} scriptId
848 * @param {number} lineNumber 848 * @param {number} lineNumber
849 * @param {number=} columnNumber 849 * @param {number=} columnNumber
850 */ 850 */
851 WebInspector.DebuggerModel.Location = function(target, scriptId, lineNumber, col umnNumber) 851 WebInspector.DebuggerModel.Location = function(target, scriptId, lineNumber, col umnNumber)
852 { 852 {
853 WebInspector.TargetAware.call(this, target); 853 WebInspector.SDKObject.call(this, target);
854 this._debuggerModel = target.debuggerModel; 854 this._debuggerModel = target.debuggerModel;
855 this.scriptId = scriptId; 855 this.scriptId = scriptId;
856 this.lineNumber = lineNumber; 856 this.lineNumber = lineNumber;
857 this.columnNumber = columnNumber; 857 this.columnNumber = columnNumber;
858 } 858 }
859 859
860 /** 860 /**
861 * @param {!WebInspector.Target} target 861 * @param {!WebInspector.Target} target
862 * @param {!DebuggerAgent.Location} payload 862 * @param {!DebuggerAgent.Location} payload
863 * @return {!WebInspector.DebuggerModel.Location} 863 * @return {!WebInspector.DebuggerModel.Location}
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 }, 907 },
908 908
909 /** 909 /**
910 * @return {string} 910 * @return {string}
911 */ 911 */
912 id: function() 912 id: function()
913 { 913 {
914 return this.target().id() + ":" + this.scriptId + ":" + this.lineNumber + ":" + this.columnNumber 914 return this.target().id() + ":" + this.scriptId + ":" + this.lineNumber + ":" + this.columnNumber
915 }, 915 },
916 916
917 __proto__: WebInspector.TargetAware.prototype 917 __proto__: WebInspector.SDKObject.prototype
918 } 918 }
919 919
920 /** 920 /**
921 * @constructor 921 * @constructor
922 * @extends {WebInspector.TargetAware} 922 * @extends {WebInspector.SDKObject}
923 * @param {!WebInspector.Target} target 923 * @param {!WebInspector.Target} target
924 * @param {!WebInspector.Script} script 924 * @param {!WebInspector.Script} script
925 * @param {!DebuggerAgent.CallFrame} payload 925 * @param {!DebuggerAgent.CallFrame} payload
926 * @param {boolean=} isAsync 926 * @param {boolean=} isAsync
927 */ 927 */
928 WebInspector.DebuggerModel.CallFrame = function(target, script, payload, isAsync ) 928 WebInspector.DebuggerModel.CallFrame = function(target, script, payload, isAsync )
929 { 929 {
930 WebInspector.TargetAware.call(this, target); 930 WebInspector.SDKObject.call(this, target);
931 this._debuggerAgent = target.debuggerModel._agent; 931 this._debuggerAgent = target.debuggerModel._agent;
932 this._script = script; 932 this._script = script;
933 this._payload = payload; 933 this._payload = payload;
934 /** @type {!Array.<!WebInspector.Script.Location>} */ 934 /** @type {!Array.<!WebInspector.Script.Location>} */
935 this._liveLocations = []; 935 this._liveLocations = [];
936 this._isAsync = isAsync; 936 this._isAsync = isAsync;
937 this._location = WebInspector.DebuggerModel.Location.fromPayload(target, pay load.location); 937 this._location = WebInspector.DebuggerModel.Location.fromPayload(target, pay load.location);
938 } 938 }
939 939
940 /** 940 /**
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
1090 return liveLocation; 1090 return liveLocation;
1091 }, 1091 },
1092 1092
1093 dispose: function() 1093 dispose: function()
1094 { 1094 {
1095 for (var i = 0; i < this._liveLocations.length; ++i) 1095 for (var i = 0; i < this._liveLocations.length; ++i)
1096 this._liveLocations[i].dispose(); 1096 this._liveLocations[i].dispose();
1097 this._liveLocations = []; 1097 this._liveLocations = [];
1098 }, 1098 },
1099 1099
1100 __proto__: WebInspector.TargetAware.prototype 1100 __proto__: WebInspector.SDKObject.prototype
1101 } 1101 }
1102 1102
1103 /** 1103 /**
1104 * @constructor 1104 * @constructor
1105 * @param {!Array.<!WebInspector.DebuggerModel.CallFrame>} callFrames 1105 * @param {!Array.<!WebInspector.DebuggerModel.CallFrame>} callFrames
1106 * @param {?WebInspector.DebuggerModel.StackTrace} asyncStackTrace 1106 * @param {?WebInspector.DebuggerModel.StackTrace} asyncStackTrace
1107 * @param {string=} description 1107 * @param {string=} description
1108 */ 1108 */
1109 WebInspector.DebuggerModel.StackTrace = function(callFrames, asyncStackTrace, de scription) 1109 WebInspector.DebuggerModel.StackTrace = function(callFrames, asyncStackTrace, de scription)
1110 { 1110 {
(...skipping 24 matching lines...) Expand all
1135 { 1135 {
1136 for (var i = 0; i < this.callFrames.length; ++i) 1136 for (var i = 0; i < this.callFrames.length; ++i)
1137 this.callFrames[i].dispose(); 1137 this.callFrames[i].dispose();
1138 if (this.asyncStackTrace) 1138 if (this.asyncStackTrace)
1139 this.asyncStackTrace.dispose(); 1139 this.asyncStackTrace.dispose();
1140 } 1140 }
1141 } 1141 }
1142 1142
1143 /** 1143 /**
1144 * @constructor 1144 * @constructor
1145 * @extends {WebInspector.TargetAware} 1145 * @extends {WebInspector.SDKObject}
1146 * @param {!WebInspector.Target} target 1146 * @param {!WebInspector.Target} target
1147 * @param {!Array.<!DebuggerAgent.CallFrame>} callFrames 1147 * @param {!Array.<!DebuggerAgent.CallFrame>} callFrames
1148 * @param {string} reason 1148 * @param {string} reason
1149 * @param {!Object|undefined} auxData 1149 * @param {!Object|undefined} auxData
1150 * @param {!Array.<string>} breakpointIds 1150 * @param {!Array.<string>} breakpointIds
1151 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace 1151 * @param {!DebuggerAgent.StackTrace=} asyncStackTrace
1152 */ 1152 */
1153 WebInspector.DebuggerPausedDetails = function(target, callFrames, reason, auxDat a, breakpointIds, asyncStackTrace) 1153 WebInspector.DebuggerPausedDetails = function(target, callFrames, reason, auxDat a, breakpointIds, asyncStackTrace)
1154 { 1154 {
1155 WebInspector.TargetAware.call(this, target); 1155 WebInspector.SDKObject.call(this, target);
1156 this.callFrames = WebInspector.DebuggerModel.CallFrame.fromPayloadArray(targ et, callFrames); 1156 this.callFrames = WebInspector.DebuggerModel.CallFrame.fromPayloadArray(targ et, callFrames);
1157 this.reason = reason; 1157 this.reason = reason;
1158 this.auxData = auxData; 1158 this.auxData = auxData;
1159 this.breakpointIds = breakpointIds; 1159 this.breakpointIds = breakpointIds;
1160 this.asyncStackTrace = WebInspector.DebuggerModel.StackTrace.fromPayload(tar get, asyncStackTrace, true); 1160 this.asyncStackTrace = WebInspector.DebuggerModel.StackTrace.fromPayload(tar get, asyncStackTrace, true);
1161 } 1161 }
1162 1162
1163 WebInspector.DebuggerPausedDetails.prototype = { 1163 WebInspector.DebuggerPausedDetails.prototype = {
1164 /** 1164 /**
1165 * @return {?WebInspector.RemoteObject} 1165 * @return {?WebInspector.RemoteObject}
1166 */ 1166 */
1167 exception: function() 1167 exception: function()
1168 { 1168 {
1169 if (this.reason !== WebInspector.DebuggerModel.BreakReason.Exception) 1169 if (this.reason !== WebInspector.DebuggerModel.BreakReason.Exception)
1170 return null; 1170 return null;
1171 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime Agent.RemoteObject} */(this.auxData)); 1171 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime Agent.RemoteObject} */(this.auxData));
1172 }, 1172 },
1173 1173
1174 dispose: function() 1174 dispose: function()
1175 { 1175 {
1176 for (var i = 0; i < this.callFrames.length; ++i) 1176 for (var i = 0; i < this.callFrames.length; ++i)
1177 this.callFrames[i].dispose(); 1177 this.callFrames[i].dispose();
1178 if (this.asyncStackTrace) 1178 if (this.asyncStackTrace)
1179 this.asyncStackTrace.dispose(); 1179 this.asyncStackTrace.dispose();
1180 }, 1180 },
1181 1181
1182 __proto__: WebInspector.TargetAware.prototype 1182 __proto__: WebInspector.SDKObject.prototype
1183 } 1183 }
1184 1184
1185 /** 1185 /**
1186 * @type {!WebInspector.DebuggerModel} 1186 * @type {!WebInspector.DebuggerModel}
1187 */ 1187 */
1188 WebInspector.debuggerModel; 1188 WebInspector.debuggerModel;
OLDNEW
« no previous file with comments | « Source/devtools/front_end/sdk/Database.js ('k') | Source/devtools/front_end/sdk/FileSystemModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698