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

Unified Diff: Source/devtools/front_end/main/HelpScreenUntilReload.js

Issue 881263002: DevTools: use target-based model accessors only. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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
« no previous file with comments | « Source/devtools/front_end/extensions/ExtensionServer.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/main/HelpScreenUntilReload.js
diff --git a/Source/devtools/front_end/main/HelpScreenUntilReload.js b/Source/devtools/front_end/main/HelpScreenUntilReload.js
index 2dd43108fb54b6f1ece682e5517c1d9da4129ef9..89b4451204814e654f8eee239d12f1bdbd5027b2 100644
--- a/Source/devtools/front_end/main/HelpScreenUntilReload.js
+++ b/Source/devtools/front_end/main/HelpScreenUntilReload.js
@@ -30,17 +30,19 @@
/**
* @constructor
+ * @param {!WebInspector.Target} target
* @param {string=} title
* @param {string=} message
* @extends {WebInspector.HelpScreen}
*/
-WebInspector.HelpScreenUntilReload = function(title, message)
+WebInspector.HelpScreenUntilReload = function(target, title, message)
{
WebInspector.HelpScreen.call(this, title);
+ this._target = target;
var p = this.helpContentElement.createChild("p");
p.classList.add("help-section");
p.textContent = message;
- WebInspector.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
+ target.debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
}
WebInspector.HelpScreenUntilReload.prototype = {
@@ -49,7 +51,7 @@ WebInspector.HelpScreenUntilReload.prototype = {
*/
willHide: function()
{
- WebInspector.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
+ this._target.debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.GlobalObjectCleared, this.hide, this);
WebInspector.HelpScreen.prototype.willHide.call(this);
},
« no previous file with comments | « Source/devtools/front_end/extensions/ExtensionServer.js ('k') | Source/devtools/front_end/main/Main.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698