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

Unified Diff: Source/devtools/front_end/ConsoleModel.js

Issue 185463010: DevTools: Introduce Target class which holds connection & models (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@gr-RuntimeAgent
Patch Set: Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: Source/devtools/front_end/ConsoleModel.js
diff --git a/Source/devtools/front_end/ConsoleModel.js b/Source/devtools/front_end/ConsoleModel.js
index 10f0dddb9cac1925cd416a04906d0edd6c224f34..8f14755c3dd3ff8a5ecc7a4068a7b59c2666e8b3 100644
--- a/Source/devtools/front_end/ConsoleModel.js
+++ b/Source/devtools/front_end/ConsoleModel.js
@@ -31,15 +31,16 @@
/**
* @constructor
* @extends {WebInspector.Object}
+ * @param {!WebInspector.Target} target
*/
-WebInspector.ConsoleModel = function()
+WebInspector.ConsoleModel = function(target)
{
- this._agent = ConsoleAgent;
+ this._agent = target.connection.agent("Console");
aandrey 2014/03/04 10:05:16 this should be typed for the js compiler, so eithe
sergeyv 2014/03/04 12:42:37 Partially done. I encapsulated connection. But, un
this.messages = [];
this.warnings = 0;
this.errors = 0;
this._interruptRepeatCount = false;
- InspectorBackend.registerConsoleDispatcher(new WebInspector.ConsoleDispatcher(this));
+ target.connection.registerDispatcher("Console", new WebInspector.ConsoleDispatcher(this));
aandrey 2014/03/04 10:05:16 encapsulate connection?
sergeyv 2014/03/04 12:42:37 Done.
}
WebInspector.ConsoleModel.Events = {

Powered by Google App Engine
This is Rietveld 408576698