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

Unified Diff: third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.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/persistence/PersistenceUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
index beadea7daadbf5568c36bb15f43b54adf7aed6c2..ff48f314f903e92431e08cab3d68b9e03622371d 100644
--- a/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/persistence/PersistenceUtils.js
@@ -29,16 +29,14 @@ Persistence.PersistenceUtils.LinkDecorator = class extends Common.Object {
*/
constructor(persistence) {
super();
- persistence.addEventListener(Persistence.Persistence.Events.BindingCreated, this._bindingChanged, this);
- persistence.addEventListener(Persistence.Persistence.Events.BindingRemoved, this._bindingChanged, this);
+ persistence.addEventListener(Persistence.Persistence.BindingChangedEvent, this._bindingChanged, this);
}
/**
- * @param {!Common.Event} event
+ * @param {!Persistence.Persistence.BindingChangedEvent} event
*/
_bindingChanged(event) {
- var binding = /** @type {!Persistence.PersistenceBinding} */ (event.data);
- this.dispatchEventToListeners(Components.LinkDecorator.Events.LinkIconChanged, binding.network);
+ this.dispatchEventToListeners(Components.LinkDecorator.Events.LinkIconChanged, event.binding.network);
}
/**

Powered by Google App Engine
This is Rietveld 408576698