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

Side by Side Diff: Source/core/inspector/InjectedScriptSource.js

Issue 14294004: Implementing console command 'debug'. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 this.$_ = injectedScript._lastResult; 1146 this.$_ = injectedScript._lastResult;
1147 } 1147 }
1148 1148
1149 // NOTE: Please keep the list of API methods below snchronized to that in WebIns pector.RuntimeModel! 1149 // NOTE: Please keep the list of API methods below snchronized to that in WebIns pector.RuntimeModel!
1150 /** 1150 /**
1151 * @type {Array.<string>} 1151 * @type {Array.<string>}
1152 * @const 1152 * @const
1153 */ 1153 */
1154 CommandLineAPI.members_ = [ 1154 CommandLineAPI.members_ = [
1155 "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd", 1155 "$", "$$", "$x", "dir", "dirxml", "keys", "values", "profile", "profileEnd",
1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners", "table" 1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners",
1157 "debug", "undebug", "table"
1157 ]; 1158 ];
1158 1159
1159 /** 1160 /**
1160 * @constructor 1161 * @constructor
1161 */ 1162 */
1162 function CommandLineAPIImpl() 1163 function CommandLineAPIImpl()
1163 { 1164 {
1164 } 1165 }
1165 1166
1166 CommandLineAPIImpl.prototype = { 1167 CommandLineAPIImpl.prototype = {
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1303 }, 1304 },
1304 1305
1305 /** 1306 /**
1306 * @param {Node} node 1307 * @param {Node} node
1307 */ 1308 */
1308 getEventListeners: function(node) 1309 getEventListeners: function(node)
1309 { 1310 {
1310 return InjectedScriptHost.getEventListeners(node); 1311 return InjectedScriptHost.getEventListeners(node);
1311 }, 1312 },
1312 1313
1314 debug: function(fn)
1315 {
1316 InjectedScriptHost.setBreakpoint(fn);
1317 },
1318
1319 undebug: function(fn)
1320 {
1321 InjectedScriptHost.removeBreakpoint(fn);
1322 },
1323
1313 table: function() 1324 table: function()
1314 { 1325 {
1315 inspectedWindow.console.table.apply(inspectedWindow.console, arguments); 1326 inspectedWindow.console.table.apply(inspectedWindow.console, arguments);
1316 }, 1327 },
1317 1328
1318 /** 1329 /**
1319 * @param {number} num 1330 * @param {number} num
1320 */ 1331 */
1321 _inspectedObject: function(num) 1332 _inspectedObject: function(num)
1322 { 1333 {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
1355 */ 1366 */
1356 _logEvent: function(event) 1367 _logEvent: function(event)
1357 { 1368 {
1358 inspectedWindow.console.log(event.type, event); 1369 inspectedWindow.console.log(event.type, event);
1359 } 1370 }
1360 } 1371 }
1361 1372
1362 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); 1373 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl();
1363 return injectedScript; 1374 return injectedScript;
1364 }) 1375 })
OLDNEW
« no previous file with comments | « Source/core/inspector/InjectedScriptHost.idl ('k') | Source/core/inspector/InspectorDebuggerAgent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698