mirror of
https://github.com/react/react-native-devtools-frontend.git
synced 2026-10-07 12:33:47 +08:00
Bug: chromium:1011811 Change-Id: I9a481199be32f5968083102ad4373b7715925af5 Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2394594 Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org> Commit-Queue: Andres Olivares <andoli@chromium.org>
42 lines
1.2 KiB
JavaScript
42 lines
1.2 KiB
JavaScript
// Copyright 2019 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
import * as UI from '../ui/ui.js';
|
|
|
|
import {Events, OverviewController} from './CSSOverviewController.js'; // eslint-disable-line no-unused-vars
|
|
|
|
/**
|
|
* @unrestricted
|
|
*/
|
|
export class CSSOverviewProcessingView extends UI.Widget.Widget {
|
|
/**
|
|
* @param {!OverviewController} controller
|
|
*/
|
|
constructor(controller) {
|
|
super();
|
|
this.registerRequiredCSS('css_overview/cssOverviewProcessingView.css');
|
|
|
|
this._formatter = new Intl.NumberFormat('en-US');
|
|
this._controller = controller;
|
|
this._render();
|
|
}
|
|
|
|
_render() {
|
|
const cancelButton = UI.UIUtils.createTextButton(
|
|
ls`Cancel`, () => this._controller.dispatchEventToListeners(Events.RequestOverviewCancel), '',
|
|
true /* primary */);
|
|
this.setDefaultFocusedElement(cancelButton);
|
|
|
|
this.fragment = UI.Fragment.Fragment.build`
|
|
<div class="vbox overview-processing-view">
|
|
<h1>Processing page</h1>
|
|
<div>${cancelButton}</div>
|
|
</div>
|
|
`;
|
|
|
|
this.contentElement.appendChild(this.fragment.element());
|
|
this.contentElement.style.overflow = 'auto';
|
|
}
|
|
}
|