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

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

Issue 16143005: monitor console command implemented. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Moved command implementation to C++. 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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
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", 1156 "monitorEvents", "unmonitorEvents", "inspect", "copy", "clear", "getEventLis teners",
1157 "debug", "undebug", "table" 1157 "debug", "undebug", "monitor", "unmonitor", "table"
1158 ]; 1158 ];
1159 1159
1160 /** 1160 /**
1161 * @constructor 1161 * @constructor
1162 */ 1162 */
1163 function CommandLineAPIImpl() 1163 function CommandLineAPIImpl()
1164 { 1164 {
1165 } 1165 }
1166 1166
1167 CommandLineAPIImpl.prototype = { 1167 CommandLineAPIImpl.prototype = {
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
1306 /** 1306 /**
1307 * @param {Node} node 1307 * @param {Node} node
1308 */ 1308 */
1309 getEventListeners: function(node) 1309 getEventListeners: function(node)
1310 { 1310 {
1311 return InjectedScriptHost.getEventListeners(node); 1311 return InjectedScriptHost.getEventListeners(node);
1312 }, 1312 },
1313 1313
1314 debug: function(fn) 1314 debug: function(fn)
1315 { 1315 {
1316 InjectedScriptHost.setBreakpoint(fn); 1316 InjectedScriptHost.debugFunction(fn);
1317 }, 1317 },
1318 1318
1319 undebug: function(fn) 1319 undebug: function(fn)
1320 { 1320 {
1321 InjectedScriptHost.removeBreakpoint(fn); 1321 InjectedScriptHost.undebugFunction(fn);
1322 },
1323
1324 monitor: function(fn)
1325 {
1326 InjectedScriptHost.monitorFunction(fn);
1327 },
1328
1329 unmonitor: function(fn) {
1330 InjectedScriptHost.unmonitorFunction(fn);
1322 }, 1331 },
1323 1332
1324 table: function() 1333 table: function()
1325 { 1334 {
1326 inspectedWindow.console.table.apply(inspectedWindow.console, arguments); 1335 inspectedWindow.console.table.apply(inspectedWindow.console, arguments);
1327 }, 1336 },
1328 1337
1329 /** 1338 /**
1330 * @param {number} num 1339 * @param {number} num
1331 */ 1340 */
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1366 */ 1375 */
1367 _logEvent: function(event) 1376 _logEvent: function(event)
1368 { 1377 {
1369 inspectedWindow.console.log(event.type, event); 1378 inspectedWindow.console.log(event.type, event);
1370 } 1379 }
1371 } 1380 }
1372 1381
1373 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl(); 1382 injectedScript._commandLineAPIImpl = new CommandLineAPIImpl();
1374 return injectedScript; 1383 return injectedScript;
1375 }) 1384 })
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698