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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js

Issue 2553043003: [DevTools] Remove methods on Common.Event. (Closed)
Patch Set: Created 4 years 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/ui/Toolbar.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
index 29a80f96cdba911a924871b7fd4b1a8440fb0e03..edb762c6c361b6859c73134981a0bf77ca150a60 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/Toolbar.js
@@ -511,25 +511,30 @@ UI.ToolbarButton = class extends UI.ToolbarItem {
* @param {!Event} event
*/
_clicked(event) {
- var defaultPrevented = this.dispatchEventToListeners('click', event);
- event.consume(defaultPrevented);
+ this.dispatchEventToListeners(UI.ToolbarButton.Events.Click, event);
}
/**
* @param {!Event} event
*/
_mouseDown(event) {
- this.dispatchEventToListeners('mousedown', event);
+ this.dispatchEventToListeners(UI.ToolbarButton.Events.MouseDown, event);
}
/**
* @param {!Event} event
*/
_mouseUp(event) {
- this.dispatchEventToListeners('mouseup', event);
+ this.dispatchEventToListeners(UI.ToolbarButton.Events.MouseUp, event);
}
};
+UI.ToolbarButton.Events = {
+ Click: Symbol('Click'),
+ MouseDown: Symbol('MouseDown'),
+ MouseUp: Symbol('MouseUp')
+};
+
/**
* @unrestricted
*/
@@ -569,7 +574,7 @@ UI.ToolbarInput = class extends UI.ToolbarItem {
};
UI.ToolbarInput.Event = {
- TextChanged: 'TextChanged'
+ TextChanged: Symbol('TextChanged')
};
/**

Powered by Google App Engine
This is Rietveld 408576698