| 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 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 537 * @param {!WebInspector.Event} event | 537 * @param {!WebInspector.Event} event |
| 538 */ | 538 */ |
| 539 _reloadInspectedPage: function(event) | 539 _reloadInspectedPage: function(event) |
| 540 { | 540 { |
| 541 var hard = /** @type {boolean} */ (event.data); | 541 var hard = /** @type {boolean} */ (event.data); |
| 542 WebInspector.Main._reloadPage(hard); | 542 WebInspector.Main._reloadPage(hard); |
| 543 }, | 543 }, |
| 544 | 544 |
| 545 /** | 545 /** |
| 546 * @override | 546 * @override |
| 547 * @param {!RuntimeAgent.RemoteObject} payload | |
| 548 * @param {!Object=} hints | |
| 549 */ | |
| 550 inspect: function(payload, hints) | |
| 551 { | |
| 552 var object = this._mainTarget.runtimeModel.createRemoteObject(payload); | |
| 553 if (object.isNode()) { | |
| 554 WebInspector.Revealer.revealPromise(object).then(object.release.bind
(object)); | |
| 555 return; | |
| 556 } | |
| 557 | |
| 558 if (object.type === "function") { | |
| 559 WebInspector.RemoteFunction.objectAsFunction(object).targetFunctionD
etails().then(didGetDetails); | |
| 560 return; | |
| 561 } | |
| 562 | |
| 563 /** | |
| 564 * @param {?WebInspector.DebuggerModel.FunctionDetails} response | |
| 565 */ | |
| 566 function didGetDetails(response) | |
| 567 { | |
| 568 object.release(); | |
| 569 | |
| 570 if (!response || !response.location) | |
| 571 return; | |
| 572 | |
| 573 WebInspector.Revealer.reveal(WebInspector.debuggerWorkspaceBinding.r
awLocationToUILocation(response.location)); | |
| 574 } | |
| 575 | |
| 576 if (hints.copyToClipboard) | |
| 577 InspectorFrontendHost.copyText(object.value); | |
| 578 object.release(); | |
| 579 }, | |
| 580 | |
| 581 /** | |
| 582 * @override | |
| 583 * @param {string} reason | 547 * @param {string} reason |
| 584 */ | 548 */ |
| 585 detached: function(reason) | 549 detached: function(reason) |
| 586 { | 550 { |
| 587 WebInspector._disconnectedScreenWithReasonWasShown = true; | 551 WebInspector._disconnectedScreenWithReasonWasShown = true; |
| 588 WebInspector.RemoteDebuggingTerminatedScreen.show(reason); | 552 WebInspector.RemoteDebuggingTerminatedScreen.show(reason); |
| 589 }, | 553 }, |
| 590 | 554 |
| 591 /** | 555 /** |
| 592 * @override | 556 * @override |
| (...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 * @return {?Element} | 1098 * @return {?Element} |
| 1135 */ | 1099 */ |
| 1136 settingElement: function() | 1100 settingElement: function() |
| 1137 { | 1101 { |
| 1138 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); | 1102 return WebInspector.SettingsUI.createSettingCheckbox(WebInspector.UIStri
ng("Show rulers"), WebInspector.moduleSetting("showMetricsRulers")); |
| 1139 } | 1103 } |
| 1140 } | 1104 } |
| 1141 | 1105 |
| 1142 | 1106 |
| 1143 new WebInspector.Main(); | 1107 new WebInspector.Main(); |
| OLD | NEW |