| OLD | NEW |
| 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 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 486 } | 486 } |
| 487 completionsReadyCallback(results); | 487 completionsReadyCallback(results); |
| 488 }, | 488 }, |
| 489 | 489 |
| 490 __proto__: WebInspector.SDKObject.prototype | 490 __proto__: WebInspector.SDKObject.prototype |
| 491 } | 491 } |
| 492 | 492 |
| 493 /** | 493 /** |
| 494 * @constructor | 494 * @constructor |
| 495 * @extends {WebInspector.SDKObject} | 495 * @extends {WebInspector.SDKObject} |
| 496 * @param {!WebInspector.DebuggerModel} debuggerModel | 496 * @param {!WebInspector.Target} target |
| 497 * @param {!DOMDebuggerAgent.EventListener} payload | 497 * @param {string} type |
| 498 * @param {!RuntimeAgent.RemoteObjectId} objectId | 498 * @param {boolean} useCapture |
| 499 * @param {?WebInspector.RemoteObject} handler |
| 500 * @param {!WebInspector.DebuggerModel.Location} location |
| 499 */ | 501 */ |
| 500 WebInspector.EventListener = function(debuggerModel, payload, objectId) | 502 WebInspector.EventListener = function(target, type, useCapture, handler, locatio
n) |
| 501 { | 503 { |
| 502 WebInspector.SDKObject.call(this, debuggerModel.target()); | 504 WebInspector.SDKObject.call(this, target); |
| 503 this._type = payload.type; | 505 this._type = type; |
| 504 this._useCapture = payload.useCapture; | 506 this._useCapture = useCapture; |
| 505 this._location = WebInspector.DebuggerModel.Location.fromPayload(debuggerMod
el, payload.location); | 507 this._handler = handler; |
| 506 this._handler = payload.handler ? this.target().runtimeModel.createRemoteObj
ect(payload.handler) : null; | 508 this._location = location; |
| 507 var script = debuggerModel.scriptForId(payload.location.scriptId); | 509 this._sourceURL = location.script().contentURL(); |
| 508 this._sourceName = script ? script.contentURL() : ""; | |
| 509 this._objectId = objectId; | |
| 510 } | 510 } |
| 511 | 511 |
| 512 WebInspector.EventListener.prototype = { | 512 WebInspector.EventListener.prototype = { |
| 513 /** | 513 /** |
| 514 * @return {string} | 514 * @return {string} |
| 515 */ | 515 */ |
| 516 type: function() | 516 type: function() |
| 517 { | 517 { |
| 518 return this._type; | 518 return this._type; |
| 519 }, | 519 }, |
| 520 | 520 |
| 521 /** | 521 /** |
| 522 * @return {boolean} | 522 * @return {boolean} |
| 523 */ | 523 */ |
| 524 useCapture: function() | 524 useCapture: function() |
| 525 { | 525 { |
| 526 return this._useCapture; | 526 return this._useCapture; |
| 527 }, | 527 }, |
| 528 | 528 |
| 529 /** | 529 /** |
| 530 * @return {!WebInspector.DebuggerModel.Location} | |
| 531 */ | |
| 532 location: function() | |
| 533 { | |
| 534 return this._location; | |
| 535 }, | |
| 536 | |
| 537 /** | |
| 538 * @return {?WebInspector.RemoteObject} | 530 * @return {?WebInspector.RemoteObject} |
| 539 */ | 531 */ |
| 540 handler: function() | 532 handler: function() |
| 541 { | 533 { |
| 542 return this._handler; | 534 return this._handler; |
| 543 }, | 535 }, |
| 544 | 536 |
| 545 /** | 537 /** |
| 538 * @return {!WebInspector.DebuggerModel.Location} |
| 539 */ |
| 540 location: function() |
| 541 { |
| 542 return this._location; |
| 543 }, |
| 544 |
| 545 /** |
| 546 * @return {string} | 546 * @return {string} |
| 547 */ | 547 */ |
| 548 sourceName: function() | 548 sourceURL: function() |
| 549 { | 549 { |
| 550 return this._sourceName; | 550 return this._sourceURL; |
| 551 }, | 551 }, |
| 552 | 552 |
| 553 /** | |
| 554 * @return {!RuntimeAgent.RemoteObjectId} | |
| 555 */ | |
| 556 objectId: function() | |
| 557 { | |
| 558 return this._objectId; | |
| 559 }, | |
| 560 | |
| 561 __proto__: WebInspector.SDKObject.prototype | 553 __proto__: WebInspector.SDKObject.prototype |
| 562 } | 554 } |
| OLD | NEW |