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

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

Issue 2151273003: [DevTools] Move browser logging from Console domain to Log domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@internals-method
Patch Set: protocol improvements 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) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009 Joseph Pecoraro 3 * Copyright (C) 2009 Joseph Pecoraro
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 1283 matching lines...) Expand 10 before | Expand all | Expand 10 after
1294 /** 1294 /**
1295 * @return {!WebInspector.ConsoleView} 1295 * @return {!WebInspector.ConsoleView}
1296 */ 1296 */
1297 WebInspector.ConsoleView.instance = function() 1297 WebInspector.ConsoleView.instance = function()
1298 { 1298 {
1299 if (!WebInspector.ConsoleView._instance) 1299 if (!WebInspector.ConsoleView._instance)
1300 WebInspector.ConsoleView._instance = new WebInspector.ConsoleView(); 1300 WebInspector.ConsoleView._instance = new WebInspector.ConsoleView();
1301 return WebInspector.ConsoleView._instance; 1301 return WebInspector.ConsoleView._instance;
1302 } 1302 }
1303 1303
1304 WebInspector.ConsoleView.clearConsole = function()
1305 {
1306 for (var target of WebInspector.targetManager.targets()) {
1307 target.runtimeModel.discardConsoleEntries();
1308 target.consoleModel.requestClearMessages();
1309 }
1310 }
1311
1304 /** 1312 /**
1305 * @constructor 1313 * @constructor
1306 * @implements {WebInspector.ActionDelegate} 1314 * @implements {WebInspector.ActionDelegate}
1307 */ 1315 */
1308 WebInspector.ConsoleView.ActionDelegate = function() 1316 WebInspector.ConsoleView.ActionDelegate = function()
1309 { 1317 {
1310 } 1318 }
1311 1319
1312 WebInspector.ConsoleView.ActionDelegate.prototype = { 1320 WebInspector.ConsoleView.ActionDelegate.prototype = {
1313 /** 1321 /**
1314 * @override 1322 * @override
1315 * @param {!WebInspector.Context} context 1323 * @param {!WebInspector.Context} context
1316 * @param {string} actionId 1324 * @param {string} actionId
1317 * @return {boolean} 1325 * @return {boolean}
1318 */ 1326 */
1319 handleAction: function(context, actionId) 1327 handleAction: function(context, actionId)
1320 { 1328 {
1321 switch (actionId) { 1329 switch (actionId) {
1322 case "console.show": 1330 case "console.show":
1323 WebInspector.console.show(); 1331 WebInspector.console.show();
1324 return true; 1332 return true;
1325 case "console.clear": 1333 case "console.clear":
1326 WebInspector.ConsoleModel.clearConsole(); 1334 WebInspector.ConsoleView.clearConsole();
1327 return true; 1335 return true;
1328 case "console.clear.history": 1336 case "console.clear.history":
1329 WebInspector.ConsoleView.instance()._clearHistory(); 1337 WebInspector.ConsoleView.instance()._clearHistory();
1330 return true; 1338 return true;
1331 } 1339 }
1332 return false; 1340 return false;
1333 } 1341 }
1334 } 1342 }
1335 1343
1336 /** 1344 /**
1337 * @typedef {{messageIndex: number, matchIndex: number}} 1345 * @typedef {{messageIndex: number, matchIndex: number}}
1338 */ 1346 */
1339 WebInspector.ConsoleView.RegexMatchRange; 1347 WebInspector.ConsoleView.RegexMatchRange;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698