Index: third_party/WebKit/Source/devtools/front_end/js_ui/EventListenersView.js |
diff --git a/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js b/third_party/WebKit/Source/devtools/front_end/js_ui/EventListenersView.js |
similarity index 90% |
rename from third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js |
rename to third_party/WebKit/Source/devtools/front_end/js_ui/EventListenersView.js |
index 34bec39aac6caedee7ce8b018f449b855b74243b..e3bc46f2a35d90176a1f5f1fe31618c2e70b401b 100644 |
--- a/third_party/WebKit/Source/devtools/front_end/components/EventListenersView.js |
+++ b/third_party/WebKit/Source/devtools/front_end/js_ui/EventListenersView.js |
@@ -4,12 +4,12 @@ |
/** |
* @typedef {Array<{object: !SDK.RemoteObject, eventListeners: ?Array<!SDK.EventListener>, frameworkEventListeners: ?{eventListeners: ?Array<!SDK.EventListener>, internalHandlers: ?SDK.RemoteArray}, isInternal: ?Array<boolean>}>} |
*/ |
-Components.EventListenersResult; |
+JS_UI.EventListenersResult; |
/** |
* @unrestricted |
*/ |
-Components.EventListenersView = class { |
+JS_UI.EventListenersView = class { |
/** |
* @param {!Element} element |
* @param {function()} changeCallback |
@@ -20,14 +20,14 @@ Components.EventListenersView = class { |
this._treeOutline = new UI.TreeOutlineInShadow(); |
this._treeOutline.hideOverflow(); |
this._treeOutline.registerRequiredCSS('components/objectValue.css'); |
- this._treeOutline.registerRequiredCSS('components/eventListenersView.css'); |
- this._treeOutline.setComparator(Components.EventListenersTreeElement.comparator); |
+ this._treeOutline.registerRequiredCSS('js_ui/eventListenersView.css'); |
+ this._treeOutline.setComparator(JS_UI.EventListenersTreeElement.comparator); |
this._treeOutline.element.classList.add('monospace'); |
this._element.appendChild(this._treeOutline.element); |
this._emptyHolder = createElementWithClass('div', 'gray-info-message'); |
this._emptyHolder.textContent = Common.UIString('No Event Listeners'); |
this._linkifier = new Components.Linkifier(); |
- /** @type {!Map<string, !Components.EventListenersTreeElement>} */ |
+ /** @type {!Map<string, !JS_UI.EventListenersTreeElement>} */ |
this._treeItemMap = new Map(); |
} |
@@ -52,12 +52,12 @@ Components.EventListenersView = class { |
_addObject(object) { |
/** @type {?Array<!SDK.EventListener>} */ |
var eventListeners = null; |
- /** @type {?Components.FrameworkEventListenersObject}*/ |
+ /** @type {?JS_UI.FrameworkEventListenersObject}*/ |
var frameworkEventListenersObject = null; |
var promises = []; |
promises.push(object.eventListeners().then(storeEventListeners)); |
- promises.push(SDK.EventListener.frameworkEventListeners(object).then(storeFrameworkEventListenersObject)); |
+ promises.push(JS_UI.frameworkEventListeners(object).then(storeFrameworkEventListenersObject)); |
return Promise.all(promises).then(markInternalEventListeners).then(addEventListeners.bind(this)); |
/** |
@@ -68,7 +68,7 @@ Components.EventListenersView = class { |
} |
/** |
- * @param {?Components.FrameworkEventListenersObject} result |
+ * @param {?JS_UI.FrameworkEventListenersObject} result |
*/ |
function storeFrameworkEventListenersObject(result) { |
frameworkEventListenersObject = result; |
@@ -117,7 +117,7 @@ Components.EventListenersView = class { |
} |
/** |
- * @this {Components.EventListenersView} |
+ * @this {JS_UI.EventListenersView} |
*/ |
function addEventListeners() { |
this._addObjectEventListeners(object, eventListeners); |
@@ -167,12 +167,12 @@ Components.EventListenersView = class { |
/** |
* @param {string} type |
- * @return {!Components.EventListenersTreeElement} |
+ * @return {!JS_UI.EventListenersTreeElement} |
*/ |
_getOrCreateTreeElementForType(type) { |
var treeItem = this._treeItemMap.get(type); |
if (!treeItem) { |
- treeItem = new Components.EventListenersTreeElement(type, this._linkifier, this._changeCallback); |
+ treeItem = new JS_UI.EventListenersTreeElement(type, this._linkifier, this._changeCallback); |
this._treeItemMap.set(type, treeItem); |
treeItem.hidden = true; |
this._treeOutline.appendChild(treeItem); |
@@ -205,7 +205,7 @@ Components.EventListenersView = class { |
/** |
* @unrestricted |
*/ |
-Components.EventListenersTreeElement = class extends UI.TreeElement { |
+JS_UI.EventListenersTreeElement = class extends UI.TreeElement { |
/** |
* @param {string} type |
* @param {!Components.Linkifier} linkifier |
@@ -235,8 +235,7 @@ Components.EventListenersTreeElement = class extends UI.TreeElement { |
* @param {!SDK.RemoteObject} object |
*/ |
addObjectEventListener(eventListener, object) { |
- var treeElement = |
- new Components.ObjectEventListenerBar(eventListener, object, this._linkifier, this._changeCallback); |
+ var treeElement = new JS_UI.ObjectEventListenerBar(eventListener, object, this._linkifier, this._changeCallback); |
this.appendChild(/** @type {!UI.TreeElement} */ (treeElement)); |
} |
}; |
@@ -245,7 +244,7 @@ Components.EventListenersTreeElement = class extends UI.TreeElement { |
/** |
* @unrestricted |
*/ |
-Components.ObjectEventListenerBar = class extends UI.TreeElement { |
+JS_UI.ObjectEventListenerBar = class extends UI.TreeElement { |
/** |
* @param {!SDK.EventListener} eventListener |
* @param {!SDK.RemoteObject} object |
@@ -305,7 +304,7 @@ Components.ObjectEventListenerBar = class extends UI.TreeElement { |
/** |
* @param {!Event} event |
- * @this {Components.ObjectEventListenerBar} |
+ * @this {JS_UI.ObjectEventListenerBar} |
*/ |
function removeListener(event) { |
event.consume(); |
@@ -315,7 +314,7 @@ Components.ObjectEventListenerBar = class extends UI.TreeElement { |
/** |
* @param {!Event} event |
- * @this {Components.ObjectEventListenerBar} |
+ * @this {JS_UI.ObjectEventListenerBar} |
*/ |
function togglePassiveListener(event) { |
event.consume(); |