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

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

Issue 1688283002: [DevTools] Blackboxing in LiveLocations is supported in Linkifier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@add-source-map-support-v3
Patch Set: Created 4 years, 10 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
OLDNEW
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 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.TargetManager.Observer} 7 * @implements {WebInspector.TargetManager.Observer}
8 * @param {!WebInspector.TargetManager} targetManager 8 * @param {!WebInspector.TargetManager} targetManager
9 * @param {!WebInspector.Workspace} workspace 9 * @param {!WebInspector.Workspace} workspace
10 * @param {!WebInspector.NetworkMapping} networkMapping 10 * @param {!WebInspector.NetworkMapping} networkMapping
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 */ 114 */
115 updateLocations: function(script) 115 updateLocations: function(script)
116 { 116 {
117 var info = this._infoForScript(script.target(), script.scriptId); 117 var info = this._infoForScript(script.target(), script.scriptId);
118 if (info) 118 if (info)
119 info._updateLocations(); 119 info._updateLocations();
120 }, 120 },
121 121
122 /** 122 /**
123 * @param {!WebInspector.DebuggerModel.Location} rawLocation 123 * @param {!WebInspector.DebuggerModel.Location} rawLocation
124 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDel egate 124 * @param {function(!WebInspector.LiveLocation)} updateDelegate
125 * @return {!WebInspector.DebuggerWorkspaceBinding.Location} 125 * @return {!WebInspector.DebuggerWorkspaceBinding.Location}
126 */ 126 */
127 createLiveLocation: function(rawLocation, updateDelegate) 127 createLiveLocation: function(rawLocation, updateDelegate)
128 { 128 {
129 var info = this._infoForScript(rawLocation.target(), rawLocation.scriptI d); 129 var info = this._infoForScript(rawLocation.target(), rawLocation.scriptI d);
130 console.assert(info); 130 console.assert(info);
131 var location = new WebInspector.DebuggerWorkspaceBinding.Location(info._ script, rawLocation, this, updateDelegate); 131 var location = new WebInspector.DebuggerWorkspaceBinding.Location(info._ script, rawLocation, this, updateDelegate);
132 info._addLocation(location); 132 info._addLocation(location);
133 return location; 133 return location;
134 }, 134 },
135 135
136 /** 136 /**
137 * @param {!WebInspector.DebuggerModel.CallFrame} callFrame 137 * @param {!WebInspector.DebuggerModel.CallFrame} callFrame
138 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDel egate 138 * @param {function(!WebInspector.LiveLocation)} updateDelegate
139 * @return {!WebInspector.DebuggerWorkspaceBinding.Location} 139 * @return {!WebInspector.DebuggerWorkspaceBinding.Location}
140 */ 140 */
141 createCallFrameLiveLocation: function(callFrame, updateDelegate) 141 createCallFrameLiveLocation: function(callFrame, updateDelegate)
142 { 142 {
143 var target = callFrame.target(); 143 var target = callFrame.target();
144 this._ensureInfoForScript(callFrame.script); 144 this._ensureInfoForScript(callFrame.script);
145 var location = this.createLiveLocation(callFrame.location(), updateDeleg ate); 145 var location = this.createLiveLocation(callFrame.location(), updateDeleg ate);
146 this._registerCallFrameLiveLocation(target, location); 146 this._registerCallFrameLiveLocation(target, location);
147 return location; 147 return location;
148 }, 148 },
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 * @return {!WebInspector.DebuggerSourceMapping} 462 * @return {!WebInspector.DebuggerSourceMapping}
463 */ 463 */
464 _popSourceMapping: function() 464 _popSourceMapping: function()
465 { 465 {
466 var sourceMapping = this._sourceMappings.pop(); 466 var sourceMapping = this._sourceMappings.pop();
467 this._updateLocations(); 467 this._updateLocations();
468 return sourceMapping; 468 return sourceMapping;
469 }, 469 },
470 470
471 /** 471 /**
472 * @param {!WebInspector.LiveLocation} location 472 * @param {!WebInspector.DebuggerWorkspaceBinding.Location} location
473 */ 473 */
474 _addLocation: function(location) 474 _addLocation: function(location)
475 { 475 {
476 this._locations.add(location); 476 this._locations.add(location);
477 location.update(); 477 location.update();
478 }, 478 },
479 479
480 /** 480 /**
481 * @param {!WebInspector.LiveLocation} location 481 * @param {!WebInspector.DebuggerWorkspaceBinding.Location} location
482 */ 482 */
483 _removeLocation: function(location) 483 _removeLocation: function(location)
484 { 484 {
485 this._locations.delete(location); 485 this._locations.delete(location);
486 }, 486 },
487 487
488 _updateLocations: function() 488 _updateLocations: function()
489 { 489 {
490 for (var location of this._locations) 490 for (var location of this._locations)
491 location.update(); 491 location.update();
(...skipping 13 matching lines...) Expand all
505 } 505 }
506 } 506 }
507 507
508 508
509 /** 509 /**
510 * @constructor 510 * @constructor
511 * @extends {WebInspector.LiveLocation} 511 * @extends {WebInspector.LiveLocation}
512 * @param {!WebInspector.Script} script 512 * @param {!WebInspector.Script} script
513 * @param {!WebInspector.DebuggerModel.Location} rawLocation 513 * @param {!WebInspector.DebuggerModel.Location} rawLocation
514 * @param {!WebInspector.DebuggerWorkspaceBinding} binding 514 * @param {!WebInspector.DebuggerWorkspaceBinding} binding
515 * @param {function(!WebInspector.UILocation):(boolean|undefined)} updateDelegat e 515 * @param {function(!WebInspector.LiveLocation)} updateDelegate
516 */ 516 */
517 WebInspector.DebuggerWorkspaceBinding.Location = function(script, rawLocation, b inding, updateDelegate) 517 WebInspector.DebuggerWorkspaceBinding.Location = function(script, rawLocation, b inding, updateDelegate)
518 { 518 {
519 WebInspector.LiveLocation.call(this, updateDelegate); 519 WebInspector.LiveLocation.call(this, updateDelegate);
520 this._script = script; 520 this._script = script;
521 this._rawLocation = rawLocation; 521 this._rawLocation = rawLocation;
522 this._binding = binding; 522 this._binding = binding;
523 } 523 }
524 524
525 WebInspector.DebuggerWorkspaceBinding.Location.prototype = { 525 WebInspector.DebuggerWorkspaceBinding.Location.prototype = {
526 /** 526 /**
527 * @override 527 * @override
528 * @return {!WebInspector.UILocation} 528 * @return {!WebInspector.UILocation}
529 */ 529 */
530 uiLocation: function() 530 uiLocation: function()
531 { 531 {
532 var debuggerModelLocation = this._rawLocation; 532 var debuggerModelLocation = this._rawLocation;
533 return this._binding.rawLocationToUILocation(debuggerModelLocation); 533 return this._binding.rawLocationToUILocation(debuggerModelLocation);
534 }, 534 },
535 535
536 dispose: function() 536 dispose: function()
537 { 537 {
538 WebInspector.LiveLocation.prototype.dispose.call(this); 538 WebInspector.LiveLocation.prototype.dispose.call(this);
539 this._binding._removeLiveLocation(this); 539 this._binding._removeLiveLocation(this);
540 }, 540 },
541 541
542 /**
543 * @override
544 * @return {boolean}
545 */
546 isBlackboxed: function()
547 {
548 return WebInspector.blackboxManager.isBlackboxedRawLocation(this._rawLoc ation);
549 },
550
542 __proto__: WebInspector.LiveLocation.prototype 551 __proto__: WebInspector.LiveLocation.prototype
543 } 552 }
544 553
545 /** 554 /**
546 * @interface 555 * @interface
547 */ 556 */
548 WebInspector.DebuggerSourceMapping = function() 557 WebInspector.DebuggerSourceMapping = function()
549 { 558 {
550 } 559 }
551 560
(...skipping 22 matching lines...) Expand all
574 * @param {number} lineNumber 583 * @param {number} lineNumber
575 * @return {boolean} 584 * @return {boolean}
576 */ 585 */
577 uiLineHasMapping: function(uiSourceCode, lineNumber) { } 586 uiLineHasMapping: function(uiSourceCode, lineNumber) { }
578 } 587 }
579 588
580 /** 589 /**
581 * @type {!WebInspector.DebuggerWorkspaceBinding} 590 * @type {!WebInspector.DebuggerWorkspaceBinding}
582 */ 591 */
583 WebInspector.debuggerWorkspaceBinding; 592 WebInspector.debuggerWorkspaceBinding;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698