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

Unified Diff: third_party/WebKit/Source/devtools/front_end/main/Main.js

Issue 2702523003: [DevTools] Continue GlassPane refactoring. (Closed)
Patch Set: element Created 3 years, 10 months 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/main/Main.js
diff --git a/third_party/WebKit/Source/devtools/front_end/main/Main.js b/third_party/WebKit/Source/devtools/front_end/main/Main.js
index 22e209dc08a5449338d2861daeca16b94d6b55c2..d4d3ecb9cea3855113fa2080d3e92c86a59e6494 100644
--- a/third_party/WebKit/Source/devtools/front_end/main/Main.js
+++ b/third_party/WebKit/Source/devtools/front_end/main/Main.js
@@ -871,11 +871,11 @@ Main.RemoteDebuggingTerminatedScreen = class extends UI.VBox {
*/
static show(reason) {
var dialog = new UI.Dialog();
- dialog.setWrapsContent(true);
+ dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
dialog.addCloseButton();
dialog.setDimmed(true);
- new Main.RemoteDebuggingTerminatedScreen(reason).show(dialog.element);
- dialog.show();
+ new Main.RemoteDebuggingTerminatedScreen(reason).show(dialog.contentElement);
+ dialog.showDialog();
}
};
@@ -902,14 +902,14 @@ Main.TargetCrashedScreen = class extends UI.VBox {
*/
static show(debuggerModel) {
var dialog = new UI.Dialog();
- dialog.setWrapsContent(true);
+ dialog.setSizeBehavior(UI.GlassPane.SizeBehavior.MeasureContent);
dialog.addCloseButton();
dialog.setDimmed(true);
- var hideBound = dialog.detach.bind(dialog, false);
+ var hideBound = dialog.hideDialog.bind(dialog);
debuggerModel.addEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, hideBound);
- new Main.TargetCrashedScreen(onHide).show(dialog.element);
- dialog.show();
+ new Main.TargetCrashedScreen(onHide).show(dialog.contentElement);
+ dialog.showDialog();
function onHide() {
debuggerModel.removeEventListener(SDK.DebuggerModel.Events.GlobalObjectCleared, hideBound);

Powered by Google App Engine
This is Rietveld 408576698