Migrate profiler/ to import cross-module
Bug: 1006759
Change-Id: Ie62c0fd5af48e5bf4ee8dfc1aead8d2f9af49783
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2035936
Commit-Queue: Tim van der Lippe <[email protected]>
Reviewed-by: Paul Lewis <[email protected]>
diff --git a/front_end/profiler/ProfileLauncherView.js b/front_end/profiler/ProfileLauncherView.js
index 867efff..ae8e3cd 100644
--- a/front_end/profiler/ProfileLauncherView.js
+++ b/front_end/profiler/ProfileLauncherView.js
@@ -28,15 +28,18 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import * as Common from '../common/common.js';
+import * as UI from '../ui/ui.js';
+
import {IsolateSelector} from './IsolateSelector.js';
import {ProfileType} from './ProfileHeader.js'; // eslint-disable-line no-unused-vars
/**
* @unrestricted
*/
-export class ProfileLauncherView extends UI.VBox {
+export class ProfileLauncherView extends UI.Widget.VBox {
/**
- * @param {!UI.PanelWithSidebar} profilesPanel
+ * @param {!UI.Panel.PanelWithSidebar} profilesPanel
*/
constructor(profilesPanel) {
super();
@@ -59,8 +62,9 @@
isolateSelectorElement.appendChild(isolateSelector.totalMemoryElement());
const buttonsDiv = this._contentElement.createChild('div', 'hbox profile-launcher-buttons');
- this._controlButton = UI.createTextButton('', this._controlButtonClicked.bind(this), '', /* primary */ true);
- this._loadButton = UI.createTextButton(ls`Load`, this._loadButtonClicked.bind(this), '');
+ this._controlButton =
+ UI.UIUtils.createTextButton('', this._controlButtonClicked.bind(this), '', /* primary */ true);
+ this._loadButton = UI.UIUtils.createTextButton(ls`Load`, this._loadButtonClicked.bind(this), '');
buttonsDiv.appendChild(this._controlButton);
buttonsDiv.appendChild(this._loadButton);
this._recordButtonEnabled = true;
@@ -79,19 +83,19 @@
} else {
this._controlButton.setAttribute('disabled', '');
}
- this._controlButton.title = this._recordButtonEnabled ? '' : UI.anotherProfilerActiveLabel();
+ this._controlButton.title = this._recordButtonEnabled ? '' : UI.UIUtils.anotherProfilerActiveLabel();
if (this._isInstantProfile) {
this._controlButton.classList.remove('running');
this._controlButton.classList.add('primary-button');
- this._controlButton.textContent = Common.UIString('Take snapshot');
+ this._controlButton.textContent = Common.UIString.UIString('Take snapshot');
} else if (this._isProfiling) {
this._controlButton.classList.add('running');
this._controlButton.classList.remove('primary-button');
- this._controlButton.textContent = Common.UIString('Stop');
+ this._controlButton.textContent = Common.UIString.UIString('Stop');
} else {
this._controlButton.classList.remove('running');
this._controlButton.classList.add('primary-button');
- this._controlButton.textContent = Common.UIString('Start');
+ this._controlButton.textContent = Common.UIString.UIString('Start');
}
for (const item of this._typeIdToOptionElement.values()) {
item.disabled = !!this._isProfiling;
@@ -123,7 +127,7 @@
* @param {!ProfileType} profileType
*/
addProfileType(profileType) {
- const labelElement = UI.createRadioLabel('profile-type', profileType.name);
+ const labelElement = UI.UIUtils.createRadioLabel('profile-type', profileType.name);
this._profileTypeSelectorForm.appendChild(labelElement);
const optionElement = labelElement.radioElement;
this._typeIdToOptionElement.set(profileType.id, optionElement);