Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 /** | 4 /** |
| 5 * @unrestricted | 5 * @unrestricted |
| 6 * @implements {SDK.SDKModelObserver<!SDK.DebuggerModel>} | 6 * @implements {SDK.SDKModelObserver<!SDK.DebuggerModel>} |
| 7 */ | 7 */ |
| 8 Bindings.DebuggerWorkspaceBinding = class { | 8 Bindings.DebuggerWorkspaceBinding = class { |
| 9 /** | 9 /** |
| 10 * @param {!SDK.TargetManager} targetManager | 10 * @param {!SDK.TargetManager} targetManager |
| (...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 297 } | 297 } |
| 298 | 298 |
| 299 /** | 299 /** |
| 300 * @param {!SDK.DebuggerModel.Location} rawLocation | 300 * @param {!SDK.DebuggerModel.Location} rawLocation |
| 301 * @return {?Workspace.UILocation} | 301 * @return {?Workspace.UILocation} |
| 302 */ | 302 */ |
| 303 _rawLocationToUILocation(rawLocation) { | 303 _rawLocationToUILocation(rawLocation) { |
| 304 var uiLocation = null; | 304 var uiLocation = null; |
| 305 uiLocation = uiLocation || this._compilerMapping.rawLocationToUILocation(raw Location); | 305 uiLocation = uiLocation || this._compilerMapping.rawLocationToUILocation(raw Location); |
| 306 uiLocation = uiLocation || this._resourceMapping.rawLocationToUILocation(raw Location); | 306 uiLocation = uiLocation || this._resourceMapping.rawLocationToUILocation(raw Location); |
| 307 uiLocation = uiLocation || Bindings.resourceMapping.jsLocationToUILocation(r awLocation); | |
| 307 uiLocation = uiLocation || this._defaultMapping.rawLocationToUILocation(rawL ocation); | 308 uiLocation = uiLocation || this._defaultMapping.rawLocationToUILocation(rawL ocation); |
| 308 return /** @type {!Workspace.UILocation} */ (uiLocation); | 309 return /** @type {!Workspace.UILocation} */ (uiLocation); |
| 309 } | 310 } |
| 310 | 311 |
| 311 /** | 312 /** |
| 312 * @param {!Workspace.UISourceCode} uiSourceCode | 313 * @param {!Workspace.UISourceCode} uiSourceCode |
| 313 * @param {number} lineNumber | 314 * @param {number} lineNumber |
| 314 * @param {number} columnNumber | 315 * @param {number} columnNumber |
| 315 * @return {?SDK.DebuggerModel.Location} | 316 * @return {?SDK.DebuggerModel.Location} |
| 316 */ | 317 */ |
| 317 _uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) { | 318 _uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) { |
| 318 var rawLocation = null; | 319 var rawLocation = null; |
| 319 rawLocation = rawLocation || this._compilerMapping.uiLocationToRawLocation(u iSourceCode, lineNumber, columnNumber); | 320 rawLocation = rawLocation || this._compilerMapping.uiLocationToRawLocation(u iSourceCode, lineNumber, columnNumber); |
| 320 rawLocation = rawLocation || this._resourceMapping.uiLocationToRawLocation(u iSourceCode, lineNumber, columnNumber); | 321 rawLocation = rawLocation || this._resourceMapping.uiLocationToRawLocation(u iSourceCode, lineNumber, columnNumber); |
| 321 rawLocation = rawLocation || this._defaultMapping.uiLocationToRawLocation(ui SourceCode, lineNumber, columnNumber); | 322 rawLocation = rawLocation || this._defaultMapping.uiLocationToRawLocation(ui SourceCode, lineNumber, columnNumber); |
| 323 rawLocation = | |
| 324 rawLocation || Bindings.resourceMapping.uiLocationToJSLocation(uiSourceC ode, lineNumber, columnNumber); | |
|
dgozman
2017/06/13 00:58:40
Call this before default mapping.
lushnikov
2017/06/13 01:07:04
Done.
| |
| 322 return rawLocation; | 325 return rawLocation; |
| 323 } | 326 } |
| 324 | 327 |
| 325 /** | 328 /** |
| 326 * @param {!SDK.DebuggerPausedDetails} debuggerPausedDetails | 329 * @param {!SDK.DebuggerPausedDetails} debuggerPausedDetails |
| 327 * @return {boolean} | 330 * @return {boolean} |
| 328 */ | 331 */ |
| 329 _beforePaused(debuggerPausedDetails) { | 332 _beforePaused(debuggerPausedDetails) { |
| 330 return !!this._compilerMapping.mapsToSourceCode(debuggerPausedDetails.callFr ames[0].location()); | 333 return !!this._compilerMapping.mapsToSourceCode(debuggerPausedDetails.callFr ames[0].location()); |
| 331 } | 334 } |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 525 * @param {number} columnNumber | 528 * @param {number} columnNumber |
| 526 * @return {?SDK.DebuggerModel.Location} | 529 * @return {?SDK.DebuggerModel.Location} |
| 527 */ | 530 */ |
| 528 uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) {}, | 531 uiLocationToRawLocation(uiSourceCode, lineNumber, columnNumber) {}, |
| 529 }; | 532 }; |
| 530 | 533 |
| 531 /** | 534 /** |
| 532 * @type {!Bindings.DebuggerWorkspaceBinding} | 535 * @type {!Bindings.DebuggerWorkspaceBinding} |
| 533 */ | 536 */ |
| 534 Bindings.debuggerWorkspaceBinding; | 537 Bindings.debuggerWorkspaceBinding; |
| OLD | NEW |