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

Unified Diff: Source/devtools/front_end/extensions/ExtensionServer.js

Issue 396993003: DevTools: get rid of WebInspector.cssModel, use target models instead (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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/extensions/ExtensionServer.js
diff --git a/Source/devtools/front_end/extensions/ExtensionServer.js b/Source/devtools/front_end/extensions/ExtensionServer.js
index 73c31f6a4c53f173a986a856d48307385d913892..1932c7989b655d203bb5707eaf5118753b1d4df1 100644
--- a/Source/devtools/front_end/extensions/ExtensionServer.js
+++ b/Source/devtools/front_end/extensions/ExtensionServer.js
@@ -394,7 +394,7 @@ WebInspector.ExtensionServer.prototype = {
_onGetConsoleMessages: function()
{
- return WebInspector.consoleModel.messages.map(this._makeConsoleMessage);
+ return WebInspector.multitargetConsoleModel.messages().map(this._makeConsoleMessage);
},
_onAddConsoleMessage: function(message)
@@ -416,15 +416,16 @@ WebInspector.ExtensionServer.prototype = {
if (!level)
return this._status.E_BADARG("message.severity", message.severity);
+ var mainTarget = WebInspector.targetManager.mainTarget();
var consoleMessage = new WebInspector.ConsoleMessage(
- WebInspector.consoleModel.target(),
+ mainTarget,
WebInspector.ConsoleMessage.MessageSource.JS,
level,
message.text,
WebInspector.ConsoleMessage.MessageType.Log,
message.url,
message.line);
- WebInspector.consoleModel.addMessage(consoleMessage);
+ mainTarget.consoleModel.addMessage(consoleMessage);
},
_makeConsoleMessage: function(message)
@@ -666,7 +667,7 @@ WebInspector.ExtensionServer.prototype = {
_initExtensions: function()
{
this._registerAutosubscriptionHandler(WebInspector.extensionAPI.Events.ConsoleMessageAdded,
- WebInspector.consoleModel, WebInspector.ConsoleModel.Events.MessageAdded, this._notifyConsoleMessageAdded);
+ WebInspector.multitargetConsoleModel, WebInspector.ConsoleModel.Events.MessageAdded, this._notifyConsoleMessageAdded);
this._registerAutosubscriptionHandler(WebInspector.extensionAPI.Events.NetworkRequestFinished,
WebInspector.networkManager, WebInspector.NetworkManager.EventTypes.RequestFinished, this._notifyRequestFinished);
this._registerAutosubscriptionHandler(WebInspector.extensionAPI.Events.ResourceAdded,
« no previous file with comments | « Source/devtools/front_end/elements/MetricsSidebarPane.js ('k') | Source/devtools/front_end/host/InspectorFrontendHost.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698