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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.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/profiler/TargetsComboBoxController.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js b/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
index 86604d4c3bcf2f40da97abbfdb5d120570aefc4c..c8a5cfabeabd79556209e0e93a4308a75fbb70dc 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/TargetsComboBoxController.js
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/**
- * @implements {WebInspector.TargetManager.Observer}
+ * @implements {SDK.TargetManager.Observer}
* @unrestricted
*/
-WebInspector.TargetsComboBoxController = class {
+Profiler.TargetsComboBoxController = class {
/**
* @param {!Element} selectElement
* @param {!Element} elementToHide
@@ -15,25 +15,25 @@ WebInspector.TargetsComboBoxController = class {
selectElement.addEventListener('change', this._onComboBoxSelectionChange.bind(this), false);
this._selectElement = selectElement;
this._elementToHide = elementToHide;
- /** @type {!Map.<!WebInspector.Target, !Element>} */
+ /** @type {!Map.<!SDK.Target, !Element>} */
this._targetToOption = new Map();
- WebInspector.context.addFlavorChangeListener(WebInspector.Target, this._targetChangedExternally, this);
- WebInspector.targetManager.addEventListener(
- WebInspector.TargetManager.Events.NameChanged, this._targetNameChanged, this);
- WebInspector.targetManager.observeTargets(this, WebInspector.Target.Capability.JS);
+ UI.context.addFlavorChangeListener(SDK.Target, this._targetChangedExternally, this);
+ SDK.targetManager.addEventListener(
+ SDK.TargetManager.Events.NameChanged, this._targetNameChanged, this);
+ SDK.targetManager.observeTargets(this, SDK.Target.Capability.JS);
}
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetAdded(target) {
var option = this._selectElement.createChild('option');
option.text = target.name();
option.__target = target;
this._targetToOption.set(target, option);
- if (WebInspector.context.flavor(WebInspector.Target) === target)
+ if (UI.context.flavor(SDK.Target) === target)
this._selectElement.selectedIndex = Array.prototype.indexOf.call(/** @type {?} */ (this._selectElement), option);
this._updateVisibility();
@@ -41,7 +41,7 @@ WebInspector.TargetsComboBoxController = class {
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetRemoved(target) {
var option = this._targetToOption.remove(target);
@@ -50,10 +50,10 @@ WebInspector.TargetsComboBoxController = class {
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_targetNameChanged(event) {
- var target = /** @type {!WebInspector.Target} */ (event.data);
+ var target = /** @type {!SDK.Target} */ (event.data);
var option = this._targetToOption.get(target);
option.text = target.name();
}
@@ -63,7 +63,7 @@ WebInspector.TargetsComboBoxController = class {
if (!selectedOption)
return;
- WebInspector.context.setFlavor(WebInspector.Target, selectedOption.__target);
+ UI.context.setFlavor(SDK.Target, selectedOption.__target);
}
_updateVisibility() {
@@ -72,10 +72,10 @@ WebInspector.TargetsComboBoxController = class {
}
/**
- * @param {!WebInspector.Event} event
+ * @param {!Common.Event} event
*/
_targetChangedExternally(event) {
- var target = /** @type {?WebInspector.Target} */ (event.data);
+ var target = /** @type {?SDK.Target} */ (event.data);
if (target) {
var option = /** @type {!Element} */ (this._targetToOption.get(target));
this._select(option);

Powered by Google App Engine
This is Rietveld 408576698