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

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

Issue 1042853004: [DevTools] Event Listeners Sidebar shows window listeners (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed test Created 5 years, 8 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 /* 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 470 matching lines...) Expand 10 before | Expand all | Expand 10 after
481 if (prefix.length && !property.startsWith(prefix)) 481 if (prefix.length && !property.startsWith(prefix))
482 continue; 482 continue;
483 483
484 results.push(property); 484 results.push(property);
485 } 485 }
486 completionsReadyCallback(results); 486 completionsReadyCallback(results);
487 }, 487 },
488 488
489 __proto__: WebInspector.SDKObject.prototype 489 __proto__: WebInspector.SDKObject.prototype
490 } 490 }
491
492 /**
493 * @constructor
494 * @extends {WebInspector.SDKObject}
495 * @param {!WebInspector.Target} target
496 * @param {!RuntimeAgent.EventListener} payload
497 * @param {string} description
498 */
499 WebInspector.RuntimeModel.EventListener = function(target, payload, description)
500 {
501 WebInspector.SDKObject.call(this, target);
502 this._payload = payload;
503 var script = target.debuggerModel.scriptForId(payload.location.scriptId);
504 var sourceName = script ? script.contentURL() : "";
505 this._sourceName = sourceName;
506 this._description = description;
507 }
508
509 WebInspector.RuntimeModel.EventListener.prototype = {
510 /**
511 * @return {!RuntimeAgent.EventListener}
512 */
513 payload: function()
514 {
515 return this._payload;
516 },
517
518 /**
519 * @return {!WebInspector.DebuggerModel.Location}
520 */
521 location: function()
522 {
523 return WebInspector.DebuggerModel.Location.fromPayload(this.target(), th is._payload.location);
524 },
525
526 /**
527 * @return {?WebInspector.RemoteObject}
528 */
529 handler: function()
530 {
531 return this._payload.handler ? this.target().runtimeModel.createRemoteOb ject(this._payload.handler) : null;
532 },
533
534 /**
535 * @return {string}
536 */
537 sourceName: function()
538 {
539 return this._sourceName;
540 },
541
542 /**
543 * @return {string}
544 */
545 description: function()
546 {
547 return this._description;
548 },
549
550 __proto__: WebInspector.SDKObject.prototype
551 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698