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

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

Issue 2261933002: DevTools: Use JS symbols instead of strings for eligible events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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) 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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */ 42 /** @type {!Map<number, !WebInspector.ConsoleMessage>} */
43 this._messageByExceptionId = new Map(); 43 this._messageByExceptionId = new Map();
44 this._warnings = 0; 44 this._warnings = 0;
45 this._errors = 0; 45 this._errors = 0;
46 this._revokedErrors = 0; 46 this._revokedErrors = 0;
47 this._logAgent = target.logAgent(); 47 this._logAgent = target.logAgent();
48 target.registerLogDispatcher(new WebInspector.LogDispatcher(this)); 48 target.registerLogDispatcher(new WebInspector.LogDispatcher(this));
49 this._logAgent.enable(); 49 this._logAgent.enable();
50 } 50 }
51 51
52 /** @enum {string} */
52 WebInspector.ConsoleModel.Events = { 53 WebInspector.ConsoleModel.Events = {
53 ConsoleCleared: "ConsoleCleared", 54 ConsoleCleared: "ConsoleCleared",
54 MessageAdded: "MessageAdded", 55 MessageAdded: "MessageAdded",
55 MessageUpdated: "MessageUpdated", 56 MessageUpdated: "MessageUpdated",
56 CommandEvaluated: "CommandEvaluated", 57 CommandEvaluated: "CommandEvaluated"
57 } 58 }
58 59
59 WebInspector.ConsoleModel.prototype = { 60 WebInspector.ConsoleModel.prototype = {
60 /** 61 /**
61 * @param {!WebInspector.ConsoleMessage} msg 62 * @param {!WebInspector.ConsoleMessage} msg
62 */ 63 */
63 addMessage: function(msg) 64 addMessage: function(msg)
64 { 65 {
65 if (this._isBlacklisted(msg)) 66 if (this._isBlacklisted(msg))
66 return; 67 return;
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data); 657 this.dispatchEventToListeners(WebInspector.ConsoleModel.Events.CommandEv aluated, event.data);
657 }, 658 },
658 659
659 __proto__: WebInspector.Object.prototype 660 __proto__: WebInspector.Object.prototype
660 } 661 }
661 662
662 /** 663 /**
663 * @type {!WebInspector.MultitargetConsoleModel} 664 * @type {!WebInspector.MultitargetConsoleModel}
664 */ 665 */
665 WebInspector.multitargetConsoleModel; 666 WebInspector.multitargetConsoleModel;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698