blob: f5021e6cf0fc281c550a4cdc783f1b31b107b9ea [file] [log] [blame]
Blink Reformat4c46d092018-04-07 15:32:371// Copyright 2018 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Paul Lewis17e384e2020-01-08 15:46:515import * as Common from '../common/common.js';
Paul Lewis9950e182019-12-16 16:06:076import {VBox} from './Widget.js';
7
8export class TargetCrashedScreen extends VBox {
Blink Reformat4c46d092018-04-07 15:32:379 /**
Tim van der Lippe403a88d2020-05-13 11:51:3210 * @param {function():*} hideCallback
Blink Reformat4c46d092018-04-07 15:32:3711 */
12 constructor(hideCallback) {
13 super(true);
Jack Franklin71519f82020-11-03 12:08:5914 this.registerRequiredCSS('ui/targetCrashedScreen.css', {enableLegacyPatching: true});
Blink Reformat4c46d092018-04-07 15:32:3715 this.contentElement.createChild('div', 'message').textContent =
Paul Lewis17e384e2020-01-08 15:46:5116 Common.UIString.UIString('DevTools was disconnected from the page.');
Blink Reformat4c46d092018-04-07 15:32:3717 this.contentElement.createChild('div', 'message').textContent =
Paul Lewis17e384e2020-01-08 15:46:5118 Common.UIString.UIString('Once page is reloaded, DevTools will automatically reconnect.');
Blink Reformat4c46d092018-04-07 15:32:3719 this._hideCallback = hideCallback;
20 }
21
22 /**
23 * @override
24 */
25 willHide() {
26 this._hideCallback.call(null);
27 }
Tim van der Lippe0830b3d2019-10-03 13:20:0728}