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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 301 /** | 301 /** |
| 302 * @param {!WebInspector.Event} event | 302 * @param {!WebInspector.Event} event |
| 303 */ | 303 */ |
| 304 function onDisconnected(event) | 304 function onDisconnected(event) |
| 305 { | 305 { |
| 306 if (WebInspector._disconnectedScreenWithReasonWasShown) | 306 if (WebInspector._disconnectedScreenWithReasonWasShown) |
| 307 return; | 307 return; |
| 308 WebInspector.RemoteDebuggingTerminatedScreen.show(event.data.reason) ; | 308 WebInspector.RemoteDebuggingTerminatedScreen.show(event.data.reason) ; |
| 309 } | 309 } |
| 310 | 310 |
| 311 var targetType = Runtime.queryParam("isSharedWorker") ? WebInspector.Tar get.Type.ServiceWorker : WebInspector.Target.Type.Page; | 311 var targetType = WebInspector.Target.Type.Page; |
| 312 if (Runtime.queryParam("isSharedWorker")) | |
| 313 targetType = WebInspector.Target.Type.ServiceWorker; | |
| 314 else if (Runtime.queryParam("v8only")) { | |
|
dgozman
2016/06/29 18:37:57
style: extra {}
eostroukhov-old
2016/06/29 22:54:20
Done.
| |
| 315 targetType = WebInspector.Target.Type.V8Inspector; | |
| 316 } | |
| 317 | |
| 312 this._mainTarget = WebInspector.targetManager.createTarget(WebInspector. UIString("Main"), targetType, connection, null); | 318 this._mainTarget = WebInspector.targetManager.createTarget(WebInspector. UIString("Main"), targetType, connection, null); |
| 313 console.timeStamp("Main._mainTargetCreated"); | 319 console.timeStamp("Main._mainTargetCreated"); |
| 314 this._registerShortcuts(); | 320 this._registerShortcuts(); |
| 315 | 321 |
| 316 this._mainTarget.registerInspectorDispatcher(this); | 322 this._mainTarget.registerInspectorDispatcher(this); |
| 317 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E vents.ReloadInspectedPage, this._reloadInspectedPage, this); | 323 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E vents.ReloadInspectedPage, this._reloadInspectedPage, this); |
| 318 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E vents.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); | 324 InspectorFrontendHost.events.addEventListener(InspectorFrontendHostAPI.E vents.EvaluateForTestInFrontend, this._evaluateForTestInFrontend, this); |
| 319 | 325 |
| 320 if (this._mainTarget.isServiceWorker() || this._mainTarget.isPage()) | 326 if (this._mainTarget.isServiceWorker() || this._mainTarget.isPage() || t his._mainTarget.isV8Inspector()) |
| 321 this._mainTarget.runtimeAgent().run(); | 327 this._mainTarget.runtimeAgent().run(); |
| 322 | 328 |
| 323 this._mainTarget.inspectorAgent().enable(); | 329 this._mainTarget.inspectorAgent().enable(); |
| 324 InspectorFrontendHost.readyForTest(); | 330 InspectorFrontendHost.readyForTest(); |
| 325 | 331 |
| 326 // Asynchronously run the extensions. | 332 // Asynchronously run the extensions. |
| 327 setTimeout(lateInitialization, 0); | 333 setTimeout(lateInitialization, 0); |
| 328 | 334 |
| 329 function lateInitialization() | 335 function lateInitialization() |
| 330 { | 336 { |
| (...skipping 781 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1112 * @return {?Element} | 1118 * @return {?Element} |
| 1113 */ | 1119 */ |
| 1114 settingElement: function() | 1120 settingElement: function() |
| 1115 { | 1121 { |
| 1116 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); | 1122 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); |
| 1117 } | 1123 } |
| 1118 } | 1124 } |
| 1119 | 1125 |
| 1120 | 1126 |
| 1121 new WebInspector.Main(); | 1127 new WebInspector.Main(); |
| OLD | NEW |