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

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

Issue 2168223002: DevTools: keep widgets in widget hierarchy upon hide, split attach/detach cycle from show/hide. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 5 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com). 3 * Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
4 * Copyright (C) 2009 Joseph Pecoraro 4 * Copyright (C) 2009 Joseph Pecoraro
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1016 1016
1017 /** 1017 /**
1018 * @param {!WebInspector.DebuggerModel} debuggerModel 1018 * @param {!WebInspector.DebuggerModel} debuggerModel
1019 */ 1019 */
1020 WebInspector.TargetCrashedScreen.show = function(debuggerModel) 1020 WebInspector.TargetCrashedScreen.show = function(debuggerModel)
1021 { 1021 {
1022 var dialog = new WebInspector.Dialog(); 1022 var dialog = new WebInspector.Dialog();
1023 dialog.setWrapsContent(true); 1023 dialog.setWrapsContent(true);
1024 dialog.addCloseButton(); 1024 dialog.addCloseButton();
1025 dialog.setDimmed(true); 1025 dialog.setDimmed(true);
1026 var hideBound = dialog.detach.bind(dialog, false); 1026 var hideBound = dialog.detach.bind(dialog);
1027 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjec tCleared, hideBound); 1027 debuggerModel.addEventListener(WebInspector.DebuggerModel.Events.GlobalObjec tCleared, hideBound);
1028 1028
1029 new WebInspector.TargetCrashedScreen(onHide).show(dialog.element); 1029 new WebInspector.TargetCrashedScreen(onHide).show(dialog.element);
1030 dialog.show(); 1030 dialog.show();
1031 1031
1032 function onHide() 1032 function onHide()
1033 { 1033 {
1034 debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.Glob alObjectCleared, hideBound); 1034 debuggerModel.removeEventListener(WebInspector.DebuggerModel.Events.Glob alObjectCleared, hideBound);
1035 } 1035 }
1036 } 1036 }
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 * @return {?Element} 1112 * @return {?Element}
1113 */ 1113 */
1114 settingElement: function() 1114 settingElement: function()
1115 { 1115 {
1116 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); 1116 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers"));
1117 } 1117 }
1118 } 1118 }
1119 1119
1120 1120
1121 new WebInspector.Main(); 1121 new WebInspector.Main();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698