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

Unified Diff: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js

Issue 2533483002: [DevTools] Typed events and event listeners. (Closed)
Patch Set: Created 4 years, 1 month 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: third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
diff --git a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
index 87688a3a0a9a6e830e1c1c4cae9887d10dc0cf2d..7ee40e2a71df82c812cc1a387fd55d340dd9d1e0 100644
--- a/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
+++ b/third_party/WebKit/Source/devtools/front_end/sources/UISourceCodeFrame.js
@@ -59,10 +59,7 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
Workspace.UISourceCode.Events.LineDecorationAdded, this._onLineDecorationAdded, this);
this._uiSourceCode.addEventListener(
Workspace.UISourceCode.Events.LineDecorationRemoved, this._onLineDecorationRemoved, this);
- Persistence.persistence.addEventListener(
- Persistence.Persistence.Events.BindingCreated, this._onBindingChanged, this);
- Persistence.persistence.addEventListener(
- Persistence.Persistence.Events.BindingRemoved, this._onBindingChanged, this);
+ Persistence.persistence.addEventListener(Persistence.Persistence.BindingChangedEvent, this._onBindingChanged, this);
this.textEditor.addEventListener(
SourceFrame.SourcesTextEditor.Events.EditorBlurred,
@@ -208,11 +205,10 @@ Sources.UISourceCodeFrame = class extends SourceFrame.SourceFrame {
}
/**
- * @param {!Common.Event} event
+ * @param {!Persistence.Persistence.BindingChangedEvent} event
*/
_onBindingChanged(event) {
- var binding = /** @type {!Persistence.PersistenceBinding} */ (event.data);
- if (binding.network === this._uiSourceCode || binding.fileSystem === this._uiSourceCode)
+ if (event.binding.network === this._uiSourceCode || event.binding.fileSystem === this._uiSourceCode)
this._updateStyle();
}

Powered by Google App Engine
This is Rietveld 408576698