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

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

Issue 943963002: DevTools: Refactor nits in DebuggerModel event dispatching. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebased Created 5 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 this._reset(); 363 this._reset();
364 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared); 364 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.GlobalOb jectCleared);
365 }, 365 },
366 366
367 /** 367 /**
368 * @param {string} eventType 368 * @param {string} eventType
369 * @param {!DebuggerAgent.PromiseDetails} promise 369 * @param {!DebuggerAgent.PromiseDetails} promise
370 */ 370 */
371 _promiseUpdated: function(eventType, promise) 371 _promiseUpdated: function(eventType, promise)
372 { 372 {
373 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.PromiseU pdated, { target: this.target(), eventType: eventType, promise: promise }); 373 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.PromiseU pdated, { eventType: eventType, promise: promise });
374 }, 374 },
375 375
376 /** 376 /**
377 * @param {!DebuggerAgent.AsyncOperation} operation 377 * @param {!DebuggerAgent.AsyncOperation} operation
378 */ 378 */
379 _asyncOperationStarted: function(operation) 379 _asyncOperationStarted: function(operation)
380 { 380 {
381 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationStarted, { target: this.target(), operation: operation }); 381 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationStarted, operation);
382 }, 382 },
383 383
384 /** 384 /**
385 * @param {number} operationId 385 * @param {number} operationId
386 */ 386 */
387 _asyncOperationCompleted: function(operationId) 387 _asyncOperationCompleted: function(operationId)
388 { 388 {
389 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationCompleted, { target: this.target(), operationId: operationId }); 389 this.dispatchEventToListeners(WebInspector.DebuggerModel.Events.AsyncOpe rationCompleted, operationId);
390 }, 390 },
391 391
392 _reset: function() 392 _reset: function()
393 { 393 {
394 this._scripts = {}; 394 this._scripts = {};
395 this._scriptsBySourceURL.clear(); 395 this._scriptsBySourceURL.clear();
396 }, 396 },
397 397
398 /** 398 /**
399 * @return {!Object.<string, !WebInspector.Script>} 399 * @return {!Object.<string, !WebInspector.Script>}
(...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after
1226 */ 1226 */
1227 exception: function() 1227 exception: function()
1228 { 1228 {
1229 if (this.reason !== WebInspector.DebuggerModel.BreakReason.Exception && this.reason !== WebInspector.DebuggerModel.BreakReason.PromiseRejection) 1229 if (this.reason !== WebInspector.DebuggerModel.BreakReason.Exception && this.reason !== WebInspector.DebuggerModel.BreakReason.PromiseRejection)
1230 return null; 1230 return null;
1231 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime Agent.RemoteObject} */(this.auxData)); 1231 return this.target().runtimeModel.createRemoteObject(/** @type {!Runtime Agent.RemoteObject} */(this.auxData));
1232 }, 1232 },
1233 1233
1234 __proto__: WebInspector.SDKObject.prototype 1234 __proto__: WebInspector.SDKObject.prototype
1235 } 1235 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/promises/PromisePane.js ('k') | Source/devtools/front_end/sources/AsyncOperationsSidebarPane.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698