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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots 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/ui/DropDownMenu.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/DropDownMenu.js b/third_party/WebKit/Source/devtools/front_end/ui/DropDownMenu.js
index d4bb15bf3643b120fa074296c742f6a535506068..9ee2469e8601c1b175b72bf0f47124dc95cc8f26 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/DropDownMenu.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/DropDownMenu.js
@@ -4,13 +4,13 @@
/**
* @unrestricted
*/
-WebInspector.DropDownMenu = class extends WebInspector.Object {
+UI.DropDownMenu = class extends Common.Object {
/**
* @param {!Element} element
*/
constructor(element) {
super();
- /** @type {!Array.<!WebInspector.DropDownMenu.Item>} */
+ /** @type {!Array.<!UI.DropDownMenu.Item>} */
this._items = [];
element.addEventListener('mousedown', this._onMouseDown.bind(this));
@@ -22,7 +22,7 @@ WebInspector.DropDownMenu = class extends WebInspector.Object {
_onMouseDown(event) {
if (event.which !== 1)
return;
- var menu = new WebInspector.ContextMenu(event);
+ var menu = new UI.ContextMenu(event);
for (var item of this._items)
menu.appendCheckboxItem(item.title, this._itemHandler.bind(this, item.id), item.id === this._selectedItemId);
menu.show();
@@ -32,7 +32,7 @@ WebInspector.DropDownMenu = class extends WebInspector.Object {
* @param {string} id
*/
_itemHandler(id) {
- this.dispatchEventToListeners(WebInspector.DropDownMenu.Events.ItemSelected, id);
+ this.dispatchEventToListeners(UI.DropDownMenu.Events.ItemSelected, id);
}
/**
@@ -57,9 +57,9 @@ WebInspector.DropDownMenu = class extends WebInspector.Object {
};
/** @typedef {{id: string, title: string}} */
-WebInspector.DropDownMenu.Item;
+UI.DropDownMenu.Item;
/** @enum {symbol} */
-WebInspector.DropDownMenu.Events = {
+UI.DropDownMenu.Events = {
ItemSelected: Symbol('ItemSelected')
};

Powered by Google App Engine
This is Rietveld 408576698