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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/ConsoleModel.js

Issue 2490563002: Revert of DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: Created 4 years, 1 month 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 * 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * 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 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 this._messages = []; 43 this._messages = [];
44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ 44 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */
45 this._messageByExceptionId = new Map(); 45 this._messageByExceptionId = new Map();
46 this._warnings = 0; 46 this._warnings = 0;
47 this._errors = 0; 47 this._errors = 0;
48 this._revokedErrors = 0; 48 this._revokedErrors = 0;
49 this._logAgent = logAgent; 49 this._logAgent = logAgent;
50 if (this._logAgent) { 50 if (this._logAgent) {
51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); 51 target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
52 this._logAgent.enable(); 52 this._logAgent.enable();
53 if (!InspectorFrontendHost.isUnderTest())
54 this._logAgent.setReportViolationsEnabled(true);
55 } 53 }
56 } 54 }
57 55
58 /** 56 /**
59 * @param {!WebInspector.ExecutionContext} executionContext 57 * @param {!WebInspector.ExecutionContext} executionContext
60 * @param {string} text 58 * @param {string} text
61 * @param {boolean=} useCommandLineAPI 59 * @param {boolean=} useCommandLineAPI
62 */ 60 */
63 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { 61 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) {
64 var target = executionContext.target(); 62 var target = executionContext.target();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 WebInspector.ConsoleMessage.MessageSource = { 487 WebInspector.ConsoleMessage.MessageSource = {
490 XML: 'xml', 488 XML: 'xml',
491 JS: 'javascript', 489 JS: 'javascript',
492 Network: 'network', 490 Network: 'network',
493 ConsoleAPI: 'console-api', 491 ConsoleAPI: 'console-api',
494 Storage: 'storage', 492 Storage: 'storage',
495 AppCache: 'appcache', 493 AppCache: 'appcache',
496 Rendering: 'rendering', 494 Rendering: 'rendering',
497 CSS: 'css', 495 CSS: 'css',
498 Security: 'security', 496 Security: 'security',
499 Violation: 'violation',
500 Other: 'other', 497 Other: 'other',
501 Deprecation: 'deprecation', 498 Deprecation: 'deprecation',
502 Worker: 'worker' 499 Worker: 'worker'
503 }; 500 };
504 501
505 /** 502 /**
506 * @enum {string} 503 * @enum {string}
507 */ 504 */
508 WebInspector.ConsoleMessage.MessageType = { 505 WebInspector.ConsoleMessage.MessageType = {
509 Log: 'log', 506 Log: 'log',
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 */ 634 */
638 _commandEvaluated(event) { 635 _commandEvaluated(event) {
639 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data); 636 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data);
640 } 637 }
641 }; 638 };
642 639
643 /** 640 /**
644 * @type {!WebInspector.MultitargetConsoleModel} 641 * @type {!WebInspector.MultitargetConsoleModel}
645 */ 642 */
646 WebInspector.multitargetConsoleModel; 643 WebInspector.multitargetConsoleModel;
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/main/module.json ('k') | third_party/WebKit/Source/web/WebDevToolsAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698