| 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 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 undefined, | 405 undefined, |
| 406 timestamp, | 406 timestamp, |
| 407 undefined, | 407 undefined, |
| 408 undefined); | 408 undefined); |
| 409 consoleMessage.setRevokedExceptionId(exceptionId); | 409 consoleMessage.setRevokedExceptionId(exceptionId); |
| 410 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); | 410 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); |
| 411 }, | 411 }, |
| 412 | 412 |
| 413 /** | 413 /** |
| 414 * @override | 414 * @override |
| 415 * @param {number} timestamp |
| 416 * @param {string} type |
| 417 * @param {!Array.<!RuntimeAgent.RemoteObject>} callArguments |
| 418 * @param {number} executionContextId |
| 419 * @param {!RuntimeAgent.StackTrace=} stackTrace |
| 420 */ |
| 421 consoleAPICall: function(timestamp, type, callArguments, executionContextId,
stackTrace) |
| 422 { |
| 423 var level = WebInspector.ConsoleMessage.MessageLevel.Log; |
| 424 if (type === WebInspector.ConsoleMessage.MessageType.Debug) |
| 425 level = WebInspector.ConsoleMessage.MessageLevel.Debug; |
| 426 if (type === WebInspector.ConsoleMessage.MessageType.Error || type === W
ebInspector.ConsoleMessage.MessageType.Assert) |
| 427 level = WebInspector.ConsoleMessage.MessageLevel.Error; |
| 428 if (type === WebInspector.ConsoleMessage.MessageType.Warning) |
| 429 level = WebInspector.ConsoleMessage.MessageLevel.Warning; |
| 430 if (type === WebInspector.ConsoleMessage.MessageType.Info) |
| 431 level = WebInspector.ConsoleMessage.MessageLevel.Info; |
| 432 var message = ""; |
| 433 if (callArguments.length && typeof callArguments[0].value === "string") |
| 434 message = callArguments[0].value; |
| 435 else if (callArguments.length && callArguments[0].description) |
| 436 message = callArguments[0].description; |
| 437 var callFrame = stackTrace && stackTrace.callFrames.length ? stackTrace.
callFrames[0] : null; |
| 438 var consoleMessage = new WebInspector.ConsoleMessage( |
| 439 this._runtimeModel.target(), |
| 440 WebInspector.ConsoleMessage.MessageSource.ConsoleAPI, |
| 441 level, |
| 442 /** @type {string} */ (message), |
| 443 type, |
| 444 callFrame ? callFrame.url : undefined, |
| 445 callFrame ? callFrame.lineNumber : undefined, |
| 446 callFrame ? callFrame.columnNumber : undefined, |
| 447 undefined, |
| 448 callArguments, |
| 449 stackTrace, |
| 450 timestamp, |
| 451 executionContextId, |
| 452 undefined); |
| 453 this._runtimeModel.target().consoleModel.addMessage(consoleMessage); |
| 454 }, |
| 455 |
| 456 /** |
| 457 * @override |
| 415 * @param {!RuntimeAgent.RemoteObject} payload | 458 * @param {!RuntimeAgent.RemoteObject} payload |
| 416 * @param {!Object=} hints | 459 * @param {!Object=} hints |
| 417 */ | 460 */ |
| 418 inspectRequested: function(payload, hints) | 461 inspectRequested: function(payload, hints) |
| 419 { | 462 { |
| 420 this._runtimeModel._inspectRequested(payload, hints); | 463 this._runtimeModel._inspectRequested(payload, hints); |
| 421 } | 464 } |
| 422 } | 465 } |
| 423 | 466 |
| 424 /** | 467 /** |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 /** | 1008 /** |
| 966 * @return {boolean} | 1009 * @return {boolean} |
| 967 */ | 1010 */ |
| 968 isNormalListenerType: function() | 1011 isNormalListenerType: function() |
| 969 { | 1012 { |
| 970 return this._listenerType === "normal"; | 1013 return this._listenerType === "normal"; |
| 971 }, | 1014 }, |
| 972 | 1015 |
| 973 __proto__: WebInspector.SDKObject.prototype | 1016 __proto__: WebInspector.SDKObject.prototype |
| 974 } | 1017 } |
| OLD | NEW |