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

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

Issue 2293253002: [DevTools] Do not register log dispatcher (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 27 matching lines...) Expand all
38 { 38 {
39 WebInspector.SDKModel.call(this, WebInspector.ConsoleModel, target); 39 WebInspector.SDKModel.call(this, WebInspector.ConsoleModel, target);
40 40
41 /** @type {!Array.<!WebInspector.ConsoleMessage>} */ 41 /** @type {!Array.<!WebInspector.ConsoleMessage>} */
42 this._messages = []; 42 this._messages = [];
43 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ 43 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */
44 this._messageByExceptionId = new Map(); 44 this._messageByExceptionId = new Map();
45 this._warnings = 0; 45 this._warnings = 0;
46 this._errors = 0; 46 this._errors = 0;
47 this._revokedErrors = 0; 47 this._revokedErrors = 0;
48 target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
49 this._logAgent = logAgent; 48 this._logAgent = logAgent;
50 this._logAgent && this._logAgent.enable(); 49 if (this._logAgent) {
50 target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
51 this._logAgent.enable();
52 }
51 } 53 }
52 54
53 /** @enum {symbol} */ 55 /** @enum {symbol} */
54 WebInspector.ConsoleModel.Events = { 56 WebInspector.ConsoleModel.Events = {
55 ConsoleCleared: Symbol("ConsoleCleared"), 57 ConsoleCleared: Symbol("ConsoleCleared"),
56 MessageAdded: Symbol("MessageAdded"), 58 MessageAdded: Symbol("MessageAdded"),
57 MessageUpdated: Symbol("MessageUpdated"), 59 MessageUpdated: Symbol("MessageUpdated"),
58 CommandEvaluated: Symbol("CommandEvaluated") 60 CommandEvaluated: Symbol("CommandEvaluated")
59 } 61 }
60 62
(...skipping 597 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data); 660 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data);
659 }, 661 },
660 662
661 __proto__: WebInspector.Object.prototype 663 __proto__: WebInspector.Object.prototype
662 } 664 }
663 665
664 /** 666 /**
665 * @type {!WebInspector.MultitargetConsoleModel} 667 * @type {!WebInspector.MultitargetConsoleModel}
666 */ 668 */
667 WebInspector.multitargetConsoleModel; 669 WebInspector.multitargetConsoleModel;
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698