| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 column, | 266 column, |
| 267 requestId, | 267 requestId, |
| 268 parameters, | 268 parameters, |
| 269 stackTrace, | 269 stackTrace, |
| 270 timestamp, | 270 timestamp, |
| 271 executionContextId, | 271 executionContextId, |
| 272 scriptId, | 272 scriptId, |
| 273 workerId) { | 273 workerId) { |
| 274 this._target = target; | 274 this._target = target; |
| 275 this.source = source; | 275 this.source = source; |
| 276 this.level = level; | 276 this.level = /** @type {?SDK.ConsoleMessage.MessageLevel} */ (level); |
| 277 this.messageText = messageText; | 277 this.messageText = messageText; |
| 278 this.type = type || SDK.ConsoleMessage.MessageType.Log; | 278 this.type = type || SDK.ConsoleMessage.MessageType.Log; |
| 279 /** @type {string|undefined} */ | 279 /** @type {string|undefined} */ |
| 280 this.url = url || undefined; | 280 this.url = url || undefined; |
| 281 /** @type {number} */ | 281 /** @type {number} */ |
| 282 this.line = line || 0; | 282 this.line = line || 0; |
| 283 /** @type {number} */ | 283 /** @type {number} */ |
| 284 this.column = column || 0; | 284 this.column = column || 0; |
| 285 this.parameters = parameters; | 285 this.parameters = parameters; |
| 286 /** @type {!Protocol.Runtime.StackTrace|undefined} */ | 286 /** @type {!Protocol.Runtime.StackTrace|undefined} */ |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 512 /** | 512 /** |
| 513 * @enum {string} | 513 * @enum {string} |
| 514 */ | 514 */ |
| 515 SDK.ConsoleMessage.MessageLevel = { | 515 SDK.ConsoleMessage.MessageLevel = { |
| 516 Verbose: 'verbose', | 516 Verbose: 'verbose', |
| 517 Info: 'info', | 517 Info: 'info', |
| 518 Warning: 'warning', | 518 Warning: 'warning', |
| 519 Error: 'error' | 519 Error: 'error' |
| 520 }; | 520 }; |
| 521 | 521 |
| 522 /** |
| 523 * @param {!SDK.ConsoleMessage.MessageLevel} level |
| 524 * @return {number} |
| 525 */ |
| 526 SDK.ConsoleMessage.MessageLevel.ordinal = function(level) { |
| 527 if (level === SDK.ConsoleMessage.MessageLevel.Verbose) |
| 528 return 0; |
| 529 if (level === SDK.ConsoleMessage.MessageLevel.Info) |
| 530 return 1; |
| 531 if (level === SDK.ConsoleMessage.MessageLevel.Warning) |
| 532 return 2; |
| 533 return 3; |
| 534 }; |
| 522 | 535 |
| 523 /** | 536 /** |
| 524 * @implements {Protocol.LogDispatcher} | 537 * @implements {Protocol.LogDispatcher} |
| 525 * @unrestricted | 538 * @unrestricted |
| 526 */ | 539 */ |
| 527 SDK.LogDispatcher = class { | 540 SDK.LogDispatcher = class { |
| 528 /** | 541 /** |
| 529 * @param {!SDK.ConsoleModel} console | 542 * @param {!SDK.ConsoleModel} console |
| 530 */ | 543 */ |
| 531 constructor(console) { | 544 constructor(console) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 */ | 630 */ |
| 618 _commandEvaluated(event) { | 631 _commandEvaluated(event) { |
| 619 this.dispatchEventToListeners(SDK.ConsoleModel.Events.CommandEvaluated, even
t.data); | 632 this.dispatchEventToListeners(SDK.ConsoleModel.Events.CommandEvaluated, even
t.data); |
| 620 } | 633 } |
| 621 }; | 634 }; |
| 622 | 635 |
| 623 /** | 636 /** |
| 624 * @type {!SDK.MultitargetConsoleModel} | 637 * @type {!SDK.MultitargetConsoleModel} |
| 625 */ | 638 */ |
| 626 SDK.multitargetConsoleModel; | 639 SDK.multitargetConsoleModel; |
| OLD | NEW |