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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/console/ConsoleViewMessage.js

Issue 2139543002: [DevTools] Report console API calls through Runtime. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 years, 5 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 2011 Google Inc. All rights reserved.
3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 function linkifyRequest(title) 147 function linkifyRequest(title)
148 { 148 {
149 return WebInspector.Linkifier.linkifyUsingRevealer(/** @type {!WebIn spector.NetworkRequest} */ (this.request), title, this.request.url); 149 return WebInspector.Linkifier.linkifyUsingRevealer(/** @type {!WebIn spector.NetworkRequest} */ (this.request), title, this.request.url);
150 } 150 }
151 151
152 var consoleMessage = this._message; 152 var consoleMessage = this._message;
153 if (!this._messageElement) { 153 if (!this._messageElement) {
154 if (consoleMessage.source === WebInspector.ConsoleMessage.MessageSou rce.ConsoleAPI) { 154 if (consoleMessage.source === WebInspector.ConsoleMessage.MessageSou rce.ConsoleAPI) {
155 switch (consoleMessage.type) { 155 switch (consoleMessage.type) {
156 case WebInspector.ConsoleMessage.MessageType.Trace: 156 case WebInspector.ConsoleMessage.MessageType.Trace:
157 this._messageElement = this._format(consoleMessage.parameter s || ["console.trace()"]); 157 this._messageElement = this._format(consoleMessage.parameter s || ["console.trace"]);
158 break; 158 break;
159 case WebInspector.ConsoleMessage.MessageType.Clear: 159 case WebInspector.ConsoleMessage.MessageType.Clear:
160 this._messageElement = createTextNode(WebInspector.UIString( "Console was cleared")); 160 this._messageElement = createTextNode(WebInspector.UIString( "Console was cleared"));
161 this._formattedMessage.classList.add("console-info"); 161 this._formattedMessage.classList.add("console-info");
162 break; 162 break;
163 case WebInspector.ConsoleMessage.MessageType.Assert: 163 case WebInspector.ConsoleMessage.MessageType.Assert:
164 var args = [WebInspector.UIString("Assertion failed:")]; 164 var args = [WebInspector.UIString("Assertion failed:")];
165 if (consoleMessage.parameters) 165 if (consoleMessage.parameters)
166 args = args.concat(consoleMessage.parameters); 166 args = args.concat(consoleMessage.parameters);
167 this._messageElement = this._format(args); 167 this._messageElement = this._format(args);
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
1107 case WebInspector.ConsoleMessage.MessageSource.Other: 1107 case WebInspector.ConsoleMessage.MessageSource.Other:
1108 sourceString = "Other"; 1108 sourceString = "Other";
1109 break; 1109 break;
1110 } 1110 }
1111 1111
1112 var typeString; 1112 var typeString;
1113 switch (this._message.type) { 1113 switch (this._message.type) {
1114 case WebInspector.ConsoleMessage.MessageType.Log: 1114 case WebInspector.ConsoleMessage.MessageType.Log:
1115 typeString = "Log"; 1115 typeString = "Log";
1116 break; 1116 break;
1117 case WebInspector.ConsoleMessage.MessageType.Debug:
1118 typeString = "Debug";
1119 break;
1120 case WebInspector.ConsoleMessage.MessageType.Info:
1121 typeString = "Info";
1122 break;
1123 case WebInspector.ConsoleMessage.MessageType.Error:
1124 typeString = "Error";
1125 break;
1126 case WebInspector.ConsoleMessage.MessageType.Warning:
1127 typeString = "Warning";
1128 break;
1117 case WebInspector.ConsoleMessage.MessageType.Dir: 1129 case WebInspector.ConsoleMessage.MessageType.Dir:
1118 typeString = "Dir"; 1130 typeString = "Dir";
1119 break; 1131 break;
1120 case WebInspector.ConsoleMessage.MessageType.DirXML: 1132 case WebInspector.ConsoleMessage.MessageType.DirXML:
1121 typeString = "Dir XML"; 1133 typeString = "Dir XML";
1122 break; 1134 break;
1123 case WebInspector.ConsoleMessage.MessageType.Trace: 1135 case WebInspector.ConsoleMessage.MessageType.Trace:
1124 typeString = "Trace"; 1136 typeString = "Trace";
1125 break; 1137 break;
1126 case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed: 1138 case WebInspector.ConsoleMessage.MessageType.StartGroupCollapsed:
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 { 1363 {
1352 if (!this._wrapperElement) { 1364 if (!this._wrapperElement) {
1353 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this ); 1365 WebInspector.ConsoleViewMessage.prototype.toMessageElement.call(this );
1354 this._wrapperElement.classList.toggle("collapsed", this._collapsed); 1366 this._wrapperElement.classList.toggle("collapsed", this._collapsed);
1355 } 1367 }
1356 return this._wrapperElement; 1368 return this._wrapperElement;
1357 }, 1369 },
1358 1370
1359 __proto__: WebInspector.ConsoleViewMessage.prototype 1371 __proto__: WebInspector.ConsoleViewMessage.prototype
1360 } 1372 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698