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

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

Issue 2646033003: DevTools: streamline console logging levels, migrate 'log' to 'info' level, 'debug' to 'verbose' le… (Closed)
Patch Set: missing rebaseline Created 3 years, 11 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 378 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 389
390 /** 390 /**
391 * @override 391 * @override
392 * @param {string} type 392 * @param {string} type
393 * @param {!Array.<!Protocol.Runtime.RemoteObject>} args 393 * @param {!Array.<!Protocol.Runtime.RemoteObject>} args
394 * @param {number} executionContextId 394 * @param {number} executionContextId
395 * @param {number} timestamp 395 * @param {number} timestamp
396 * @param {!Protocol.Runtime.StackTrace=} stackTrace 396 * @param {!Protocol.Runtime.StackTrace=} stackTrace
397 */ 397 */
398 consoleAPICalled(type, args, executionContextId, timestamp, stackTrace) { 398 consoleAPICalled(type, args, executionContextId, timestamp, stackTrace) {
399 var level = SDK.ConsoleMessage.MessageLevel.Log; 399 var level = SDK.ConsoleMessage.MessageLevel.Info;
400 if (type === SDK.ConsoleMessage.MessageType.Debug) 400 if (type === SDK.ConsoleMessage.MessageType.Debug)
401 level = SDK.ConsoleMessage.MessageLevel.Debug; 401 level = SDK.ConsoleMessage.MessageLevel.Verbose;
402 if (type === SDK.ConsoleMessage.MessageType.Error || type === SDK.ConsoleMes sage.MessageType.Assert) 402 if (type === SDK.ConsoleMessage.MessageType.Error || type === SDK.ConsoleMes sage.MessageType.Assert)
403 level = SDK.ConsoleMessage.MessageLevel.Error; 403 level = SDK.ConsoleMessage.MessageLevel.Error;
404 if (type === SDK.ConsoleMessage.MessageType.Warning) 404 if (type === SDK.ConsoleMessage.MessageType.Warning)
405 level = SDK.ConsoleMessage.MessageLevel.Warning; 405 level = SDK.ConsoleMessage.MessageLevel.Warning;
406 if (type === SDK.ConsoleMessage.MessageType.Info) 406 if (type === SDK.ConsoleMessage.MessageType.Info || type === SDK.ConsoleMess age.MessageType.Log)
407 level = SDK.ConsoleMessage.MessageLevel.Info; 407 level = SDK.ConsoleMessage.MessageLevel.Info;
408 var message = ''; 408 var message = '';
409 if (args.length && typeof args[0].value === 'string') 409 if (args.length && typeof args[0].value === 'string')
410 message = args[0].value; 410 message = args[0].value;
411 else if (args.length && args[0].description) 411 else if (args.length && args[0].description)
412 message = args[0].description; 412 message = args[0].description;
413 var callFrame = stackTrace && stackTrace.callFrames.length ? stackTrace.call Frames[0] : null; 413 var callFrame = stackTrace && stackTrace.callFrames.length ? stackTrace.call Frames[0] : null;
414 var consoleMessage = new SDK.ConsoleMessage( 414 var consoleMessage = new SDK.ConsoleMessage(
415 this._runtimeModel.target(), SDK.ConsoleMessage.MessageSource.ConsoleAPI , level, 415 this._runtimeModel.target(), SDK.ConsoleMessage.MessageSource.ConsoleAPI , level,
416 /** @type {string} */ (message), type, callFrame ? callFrame.url : undef ined, 416 /** @type {string} */ (message), type, callFrame ? callFrame.url : undef ined,
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 this._type === 'wheel'; 780 this._type === 'wheel';
781 } 781 }
782 782
783 /** 783 /**
784 * @return {boolean} 784 * @return {boolean}
785 */ 785 */
786 isNormalListenerType() { 786 isNormalListenerType() {
787 return this._listenerType === 'normal'; 787 return this._listenerType === 'normal';
788 } 788 }
789 }; 789 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698