Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 973 } | 973 } |
| 974 } | 974 } |
| 975 | 975 |
| 976 /** | 976 /** |
| 977 * @constructor | 977 * @constructor |
| 978 * @extends {WebInspector.VBox} | 978 * @extends {WebInspector.VBox} |
| 979 * @param {string} reason | 979 * @param {string} reason |
| 980 */ | 980 */ |
| 981 WebInspector.RemoteDebuggingTerminatedScreen = function(reason) | 981 WebInspector.RemoteDebuggingTerminatedScreen = function(reason) |
| 982 { | 982 { |
| 983 function reloadDevTools() { | |
|
pfeldman
2016/07/13 17:29:24
{ goes next line, but see below...
| |
| 984 window.location.reload(); | |
| 985 } | |
| 986 | |
| 983 WebInspector.VBox.call(this, true); | 987 WebInspector.VBox.call(this, true); |
| 984 this.registerRequiredCSS("main/remoteDebuggingTerminatedScreen.css"); | 988 this.registerRequiredCSS("main/remoteDebuggingTerminatedScreen.css"); |
| 985 var message = this.contentElement.createChild("div", "message"); | 989 var message = this.contentElement.createChild("div", "message"); |
| 986 message.createChild("span").textContent = WebInspector.UIString("Debugging c onnection was closed. Reason: "); | 990 message.createChild("span").textContent = WebInspector.UIString("Debugging c onnection was closed. Reason: "); |
| 987 message.createChild("span", "reason").textContent = reason; | 991 message.createChild("span", "reason").textContent = reason; |
| 988 this.contentElement.createChild("div", "message").textContent = WebInspector .UIString("Reconnect when ready by reopening DevTools."); | 992 this.contentElement.createChild("div", "message").textContent = WebInspector .UIString("Reconnect when ready by reopening DevTools."); |
| 993 var button = createTextButton(WebInspector.UIString("Reconnect DevTools"), r eloadDevTools); | |
|
pfeldman
2016/07/13 17:29:24
cook kids would do "() => window.location.reload()
paulirish
2016/07/13 19:01:09
the coolest. good call.
| |
| 994 this.contentElement.createChild("div", "button").appendChild(button); | |
| 989 } | 995 } |
| 990 | 996 |
| 991 /** | 997 /** |
| 992 * @param {string} reason | 998 * @param {string} reason |
| 993 */ | 999 */ |
| 994 WebInspector.RemoteDebuggingTerminatedScreen.show = function(reason) | 1000 WebInspector.RemoteDebuggingTerminatedScreen.show = function(reason) |
| 995 { | 1001 { |
| 996 var dialog = new WebInspector.Dialog(); | 1002 var dialog = new WebInspector.Dialog(); |
| 997 dialog.setWrapsContent(true); | 1003 dialog.setWrapsContent(true); |
| 998 dialog.addCloseButton(); | 1004 dialog.addCloseButton(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1117 * @return {?Element} | 1123 * @return {?Element} |
| 1118 */ | 1124 */ |
| 1119 settingElement: function() | 1125 settingElement: function() |
| 1120 { | 1126 { |
| 1121 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); | 1127 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); |
| 1122 } | 1128 } |
| 1123 } | 1129 } |
| 1124 | 1130 |
| 1125 | 1131 |
| 1126 new WebInspector.Main(); | 1132 new WebInspector.Main(); |
| OLD | NEW |