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

Side by Side Diff: inspector/front-end/inspector.js

Issue 542055: DevTools: injected script per context(WebCore part) (Closed) Base URL: http://svn.webkit.org/repository/webkit/trunk/WebCore/
Patch Set: '' Created 10 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
« no previous file with comments | « inspector/front-end/WatchExpressionsSidebarPane.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
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 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
382 this.showingDOMNodeHighlight = true; 382 this.showingDOMNodeHighlight = true;
383 } else { 383 } else {
384 InspectorBackend.hideDOMNodeHighlight(); 384 InspectorBackend.hideDOMNodeHighlight();
385 this.showingDOMNodeHighlight = false; 385 this.showingDOMNodeHighlight = false;
386 } 386 }
387 } 387 }
388 } 388 }
389 389
390 WebInspector.loaded = function() 390 WebInspector.loaded = function()
391 { 391 {
392 InspectorBackend.setInjectedScriptSource("(" + injectedScriptConstructor + " );");
393
392 var platform = WebInspector.platform; 394 var platform = WebInspector.platform;
393 document.body.addStyleClass("platform-" + platform); 395 document.body.addStyleClass("platform-" + platform);
394 var port = WebInspector.port; 396 var port = WebInspector.port;
395 document.body.addStyleClass("port-" + port); 397 document.body.addStyleClass("port-" + port);
396 398
397 this.settings = new WebInspector.Settings(); 399 this.settings = new WebInspector.Settings();
398 400
399 this.drawer = new WebInspector.Drawer(); 401 this.drawer = new WebInspector.Drawer();
400 this.console = new WebInspector.ConsoleView(this.drawer); 402 this.console = new WebInspector.ConsoleView(this.drawer);
401 // TODO: Uncomment when enabling the Changes Panel 403 // TODO: Uncomment when enabling the Changes Panel
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after
1140 this.panels.scripts.addScript(sourceID, sourceURL, source, startingLine); 1142 this.panels.scripts.addScript(sourceID, sourceURL, source, startingLine);
1141 } 1143 }
1142 1144
1143 WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLin e, errorLine, errorMessage) 1145 WebInspector.failedToParseScriptSource = function(sourceURL, source, startingLin e, errorLine, errorMessage)
1144 { 1146 {
1145 this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLi ne, errorMessage); 1147 this.panels.scripts.addScript(null, sourceURL, source, startingLine, errorLi ne, errorMessage);
1146 } 1148 }
1147 1149
1148 WebInspector.pausedScript = function(callFrames) 1150 WebInspector.pausedScript = function(callFrames)
1149 { 1151 {
1152 callFrames = JSON.parse(callFrames);
1150 this.panels.scripts.debuggerPaused(callFrames); 1153 this.panels.scripts.debuggerPaused(callFrames);
1151 } 1154 }
1152 1155
1153 WebInspector.resumedScript = function() 1156 WebInspector.resumedScript = function()
1154 { 1157 {
1155 this.panels.scripts.debuggerResumed(); 1158 this.panels.scripts.debuggerResumed();
1156 } 1159 }
1157 1160
1158 WebInspector.populateInterface = function() 1161 WebInspector.populateInterface = function()
1159 { 1162 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1196 // Cleanup elements panel early on inspected page refresh. 1199 // Cleanup elements panel early on inspected page refresh.
1197 WebInspector.setDocument(null); 1200 WebInspector.setDocument(null);
1198 } 1201 }
1199 1202
1200 WebInspector.updateConsoleMessageExpiredCount = function(count) 1203 WebInspector.updateConsoleMessageExpiredCount = function(count)
1201 { 1204 {
1202 var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count); 1205 var message = String.sprintf(WebInspector.UIString("%d console messages are not shown."), count);
1203 WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning)); 1206 WebInspector.console.addMessage(new WebInspector.ConsoleTextMessage(message, WebInspector.ConsoleMessage.MessageLevel.Warning));
1204 } 1207 }
1205 1208
1206 WebInspector.addConsoleMessage = function(payload) 1209 WebInspector.addConsoleMessage = function(payload, argumentsStringified, opt_arg s)
1207 { 1210 {
1208 var consoleMessage = new WebInspector.ConsoleMessage( 1211 var consoleMessage = new WebInspector.ConsoleMessage(
1209 payload.source, 1212 payload.source,
1210 payload.type, 1213 payload.type,
1211 payload.level, 1214 payload.level,
1212 payload.line, 1215 payload.line,
1213 payload.url, 1216 payload.url,
1214 payload.groupLevel, 1217 payload.groupLevel,
1215 payload.repeatCount); 1218 payload.repeatCount);
1216 consoleMessage.setMessageBody(Array.prototype.slice.call(arguments, 1)); 1219 var parsedArguments = [];
1220 for (var i = 2; i < arguments.length; i++) {
1221 if (argumentsStringified)
1222 parsedArguments.push(JSON.parse(arguments[i]));
1223 else
1224 parsedArguments.push(arguments[i]);
1225 }
1226 consoleMessage.setMessageBody(parsedArguments);
1217 this.console.addMessage(consoleMessage); 1227 this.console.addMessage(consoleMessage);
1218 } 1228 }
1219 1229
1220 WebInspector.updateConsoleMessageRepeatCount = function(count) 1230 WebInspector.updateConsoleMessageRepeatCount = function(count)
1221 { 1231 {
1222 this.console.updateMessageRepeatCount(count); 1232 this.console.updateMessageRepeatCount(count);
1223 } 1233 }
1224 1234
1225 WebInspector.log = function(message) 1235 WebInspector.log = function(message)
1226 { 1236 {
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
1263 function logMessage(message) 1273 function logMessage(message)
1264 { 1274 {
1265 var repeatCount = 1; 1275 var repeatCount = 1;
1266 if (message == WebInspector.log.lastMessage) 1276 if (message == WebInspector.log.lastMessage)
1267 repeatCount = WebInspector.log.repeatCount + 1; 1277 repeatCount = WebInspector.log.repeatCount + 1;
1268 1278
1269 WebInspector.log.lastMessage = message; 1279 WebInspector.log.lastMessage = message;
1270 WebInspector.log.repeatCount = repeatCount; 1280 WebInspector.log.repeatCount = repeatCount;
1271 1281
1272 // ConsoleMessage expects a proxy object 1282 // ConsoleMessage expects a proxy object
1273 message = new WebInspector.ObjectProxy(null, [], 0, message, false); 1283 message = new WebInspector.ObjectProxy(null, null, [], 0, message, false );
1274 1284
1275 // post the message 1285 // post the message
1276 var msg = new WebInspector.ConsoleMessage( 1286 var msg = new WebInspector.ConsoleMessage(
1277 WebInspector.ConsoleMessage.MessageSource.Other, 1287 WebInspector.ConsoleMessage.MessageSource.Other,
1278 WebInspector.ConsoleMessage.MessageType.Log, 1288 WebInspector.ConsoleMessage.MessageType.Log,
1279 WebInspector.ConsoleMessage.MessageLevel.Debug, 1289 WebInspector.ConsoleMessage.MessageLevel.Debug,
1280 -1, 1290 -1,
1281 null, 1291 null,
1282 null, 1292 null,
1283 repeatCount, 1293 repeatCount,
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
1751 "text/ecmascript": {4: true}, 1761 "text/ecmascript": {4: true},
1752 "application/javascript": {4: true}, 1762 "application/javascript": {4: true},
1753 "application/ecmascript": {4: true}, 1763 "application/ecmascript": {4: true},
1754 "application/x-javascript": {4: true}, 1764 "application/x-javascript": {4: true},
1755 "text/javascript1.1": {4: true}, 1765 "text/javascript1.1": {4: true},
1756 "text/javascript1.2": {4: true}, 1766 "text/javascript1.2": {4: true},
1757 "text/javascript1.3": {4: true}, 1767 "text/javascript1.3": {4: true},
1758 "text/jscript": {4: true}, 1768 "text/jscript": {4: true},
1759 "text/livescript": {4: true}, 1769 "text/livescript": {4: true},
1760 } 1770 }
OLDNEW
« no previous file with comments | « inspector/front-end/WatchExpressionsSidebarPane.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698