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

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

Issue 2474073005: DevTools: add the logging aspect into the PerformanceMonitor (Closed)
Patch Set: test fixed 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);
53 } 55 }
54 } 56 }
55 57
56 /** 58 /**
57 * @param {!WebInspector.ExecutionContext} executionContext 59 * @param {!WebInspector.ExecutionContext} executionContext
58 * @param {string} text 60 * @param {string} text
59 * @param {boolean=} useCommandLineAPI 61 * @param {boolean=} useCommandLineAPI
60 */ 62 */
61 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) { 63 static evaluateCommandInConsole(executionContext, text, useCommandLineAPI) {
62 var target = executionContext.target(); 64 var target = executionContext.target();
(...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 WebInspector.ConsoleMessage.MessageSource = { 489 WebInspector.ConsoleMessage.MessageSource = {
488 XML: 'xml', 490 XML: 'xml',
489 JS: 'javascript', 491 JS: 'javascript',
490 Network: 'network', 492 Network: 'network',
491 ConsoleAPI: 'console-api', 493 ConsoleAPI: 'console-api',
492 Storage: 'storage', 494 Storage: 'storage',
493 AppCache: 'appcache', 495 AppCache: 'appcache',
494 Rendering: 'rendering', 496 Rendering: 'rendering',
495 CSS: 'css', 497 CSS: 'css',
496 Security: 'security', 498 Security: 'security',
499 Violation: 'violation',
497 Other: 'other', 500 Other: 'other',
498 Deprecation: 'deprecation', 501 Deprecation: 'deprecation',
499 Worker: 'worker' 502 Worker: 'worker'
500 }; 503 };
501 504
502 /** 505 /**
503 * @enum {string} 506 * @enum {string}
504 */ 507 */
505 WebInspector.ConsoleMessage.MessageType = { 508 WebInspector.ConsoleMessage.MessageType = {
506 Log: 'log', 509 Log: 'log',
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 */ 637 */
635 _commandEvaluated(event) { 638 _commandEvaluated(event) {
636 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data); 639 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEvalua ted, event.data);
637 } 640 }
638 }; 641 };
639 642
640 /** 643 /**
641 * @type {!WebInspector.MultitargetConsoleModel} 644 * @type {!WebInspector.MultitargetConsoleModel}
642 */ 645 */
643 WebInspector.multitargetConsoleModel; 646 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