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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/bindings/DefaultScriptMapping.js

Issue 2536273003: [DevTools] Remove Workspace.projectTypes enum part1. (Closed)
Patch Set: Created 4 years 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 60
61 /** 61 /**
62 * @param {!SDK.Target} target 62 * @param {!SDK.Target} target
63 * @return {string} 63 * @return {string}
64 */ 64 */
65 static projectIdForTarget(target) { 65 static projectIdForTarget(target) {
66 return 'debugger:' + target.id(); 66 return 'debugger:' + target.id();
67 } 67 }
68 68
69 /** 69 /**
70 * @param {!Workspace.UISourceCode} uiSourceCode
71 * @return {boolean}
72 */
73 static isDebuggerUISourceCode(uiSourceCode) {
74 return uiSourceCode.project().type() === Workspace.projectTypes.Debugger;
75 }
76
77 /**
70 * @override 78 * @override
71 * @param {!SDK.DebuggerModel.Location} rawLocation 79 * @param {!SDK.DebuggerModel.Location} rawLocation
72 * @return {!Workspace.UILocation} 80 * @return {!Workspace.UILocation}
73 */ 81 */
74 rawLocationToUILocation(rawLocation) { 82 rawLocationToUILocation(rawLocation) {
75 var debuggerModelLocation = /** @type {!SDK.DebuggerModel.Location} */ (rawL ocation); 83 var debuggerModelLocation = /** @type {!SDK.DebuggerModel.Location} */ (rawL ocation);
76 var script = debuggerModelLocation.script(); 84 var script = debuggerModelLocation.script();
77 var uiSourceCode = this._uiSourceCodeForScriptId.get(script.scriptId); 85 var uiSourceCode = this._uiSourceCodeForScriptId.get(script.scriptId);
78 var lineNumber = debuggerModelLocation.lineNumber - (script.isInlineScriptWi thSourceURL() ? script.lineOffset : 0); 86 var lineNumber = debuggerModelLocation.lineNumber - (script.isInlineScriptWi thSourceURL() ? script.lineOffset : 0);
79 var columnNumber = debuggerModelLocation.columnNumber || 0; 87 var columnNumber = debuggerModelLocation.columnNumber || 0;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 } 149 }
142 150
143 dispose() { 151 dispose() {
144 Common.EventTarget.removeEventListeners(this._eventListeners); 152 Common.EventTarget.removeEventListeners(this._eventListeners);
145 this._debuggerReset(); 153 this._debuggerReset();
146 this._project.dispose(); 154 this._project.dispose();
147 } 155 }
148 }; 156 };
149 157
150 Bindings.DefaultScriptMapping._scriptSymbol = Symbol('symbol'); 158 Bindings.DefaultScriptMapping._scriptSymbol = Symbol('symbol');
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698