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

Unified Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.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/ProfileLauncherView.js
diff --git a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.js b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.js
index 8ab49419e6d5ce03ce7215ba603c6a01139bcc54..4d6a8824ea8febbeb31087fd1feb28eb3844c5a5 100644
--- a/third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.js
+++ b/third_party/WebKit/Source/devtools/front_end/profiler/ProfileLauncherView.js
@@ -28,12 +28,12 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
- * @implements {WebInspector.TargetManager.Observer}
+ * @implements {SDK.TargetManager.Observer}
* @unrestricted
*/
-WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
+Profiler.ProfileLauncherView = class extends UI.VBox {
/**
- * @param {!WebInspector.ProfilesPanel} profilesPanel
+ * @param {!Profiler.ProfilesPanel} profilesPanel
*/
constructor(profilesPanel) {
super();
@@ -47,20 +47,20 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
this._innerContentElement = this._contentElement.createChild('div');
var targetSpan = this._contentElement.createChild('span');
var selectTargetText = targetSpan.createChild('span');
- selectTargetText.textContent = WebInspector.UIString('Target:');
+ selectTargetText.textContent = Common.UIString('Target:');
var targetsSelect = targetSpan.createChild('select', 'chrome-select');
- new WebInspector.TargetsComboBoxController(targetsSelect, targetSpan);
+ new Profiler.TargetsComboBoxController(targetsSelect, targetSpan);
this._controlButton = createTextButton('', this._controlButtonClicked.bind(this), 'control-profiling');
this._contentElement.appendChild(this._controlButton);
this._recordButtonEnabled = true;
this._loadButton =
- createTextButton(WebInspector.UIString('Load'), this._loadButtonClicked.bind(this), 'load-profile');
+ createTextButton(Common.UIString('Load'), this._loadButtonClicked.bind(this), 'load-profile');
this._contentElement.appendChild(this._loadButton);
- WebInspector.targetManager.observeTargets(this);
+ SDK.targetManager.observeTargets(this);
}
/**
- * @return {?WebInspector.SearchableView}
+ * @return {?UI.SearchableView}
*/
searchableView() {
return null;
@@ -68,7 +68,7 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetAdded(target) {
this._updateLoadButtonLayout();
@@ -76,7 +76,7 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
/**
* @override
- * @param {!WebInspector.Target} target
+ * @param {!SDK.Target} target
*/
targetRemoved(target) {
this._updateLoadButtonLayout();
@@ -84,11 +84,11 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
_updateLoadButtonLayout() {
this._loadButton.classList.toggle(
- 'multi-target', WebInspector.targetManager.targets(WebInspector.Target.Capability.JS).length > 1);
+ 'multi-target', SDK.targetManager.targets(SDK.Target.Capability.JS).length > 1);
}
/**
- * @param {!WebInspector.ProfileType} profileType
+ * @param {!Profiler.ProfileType} profileType
*/
addProfileType(profileType) {
var descriptionElement = this._innerContentElement.createChild('h1');
@@ -113,16 +113,16 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
this._controlButton.removeAttribute('disabled');
else
this._controlButton.setAttribute('disabled', '');
- this._controlButton.title = this._recordButtonEnabled ? '' : WebInspector.anotherProfilerActiveLabel();
+ this._controlButton.title = this._recordButtonEnabled ? '' : UI.anotherProfilerActiveLabel();
if (this._isInstantProfile) {
this._controlButton.classList.remove('running');
- this._controlButton.textContent = WebInspector.UIString('Take Snapshot');
+ this._controlButton.textContent = Common.UIString('Take Snapshot');
} else if (this._isProfiling) {
this._controlButton.classList.add('running');
- this._controlButton.textContent = WebInspector.UIString('Stop');
+ this._controlButton.textContent = Common.UIString('Stop');
} else {
this._controlButton.classList.remove('running');
- this._controlButton.textContent = WebInspector.UIString('Start');
+ this._controlButton.textContent = Common.UIString('Start');
}
}
@@ -137,7 +137,7 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
}
/**
- * @param {!WebInspector.ProfileType} profileType
+ * @param {!Profiler.ProfileType} profileType
* @param {boolean} recordButtonEnabled
*/
updateProfileType(profileType, recordButtonEnabled) {
@@ -151,17 +151,17 @@ WebInspector.ProfileLauncherView = class extends WebInspector.VBox {
/**
* @unrestricted
*/
-WebInspector.MultiProfileLauncherView = class extends WebInspector.ProfileLauncherView {
+Profiler.MultiProfileLauncherView = class extends Profiler.ProfileLauncherView {
/**
- * @param {!WebInspector.ProfilesPanel} profilesPanel
+ * @param {!Profiler.ProfilesPanel} profilesPanel
*/
constructor(profilesPanel) {
super(profilesPanel);
- this._selectedProfileTypeSetting = WebInspector.settings.createSetting('selectedProfileType', 'CPU');
+ this._selectedProfileTypeSetting = Common.settings.createSetting('selectedProfileType', 'CPU');
var header = this._innerContentElement.createChild('h1');
- header.textContent = WebInspector.UIString('Select profiling type');
+ header.textContent = Common.UIString('Select profiling type');
this._profileTypeSelectorForm = this._innerContentElement.createChild('form');
@@ -172,7 +172,7 @@ WebInspector.MultiProfileLauncherView = class extends WebInspector.ProfileLaunch
/**
* @override
- * @param {!WebInspector.ProfileType} profileType
+ * @param {!Profiler.ProfileType} profileType
*/
addProfileType(profileType) {
var labelElement = createRadioLabel('profile-type', profileType.name);
@@ -195,7 +195,7 @@ WebInspector.MultiProfileLauncherView = class extends WebInspector.ProfileLaunch
typeId = Object.keys(this._typeIdToOptionElement)[0];
this._typeIdToOptionElement[typeId].checked = true;
var type = this._typeIdToOptionElement[typeId]._profileType;
- this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Events.ProfileTypeSelected, type);
+ this.dispatchEventToListeners(Profiler.MultiProfileLauncherView.Events.ProfileTypeSelected, type);
}
/**
@@ -218,10 +218,10 @@ WebInspector.MultiProfileLauncherView = class extends WebInspector.ProfileLaunch
}
/**
- * @param {!WebInspector.ProfileType} profileType
+ * @param {!Profiler.ProfileType} profileType
*/
_profileTypeChanged(profileType) {
- this.dispatchEventToListeners(WebInspector.MultiProfileLauncherView.Events.ProfileTypeSelected, profileType);
+ this.dispatchEventToListeners(Profiler.MultiProfileLauncherView.Events.ProfileTypeSelected, profileType);
this._isInstantProfile = profileType.isInstantProfile();
this._isEnabled = profileType.isEnabled();
this._updateControls();
@@ -246,6 +246,6 @@ WebInspector.MultiProfileLauncherView = class extends WebInspector.ProfileLaunch
};
/** @enum {symbol} */
-WebInspector.MultiProfileLauncherView.Events = {
+Profiler.MultiProfileLauncherView.Events = {
ProfileTypeSelected: Symbol('ProfileTypeSelected')
};

Powered by Google App Engine
This is Rietveld 408576698