| 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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 { | 360 { |
| 361 WebInspector.console.show(); | 361 WebInspector.console.show(); |
| 362 } | 362 } |
| 363 errorWarningCount.addEventListener("click", showConsole, false); | 363 errorWarningCount.addEventListener("click", showConsole, false); |
| 364 this._updateErrorAndWarningCounts(); | 364 this._updateErrorAndWarningCounts(); |
| 365 | 365 |
| 366 WebInspector.extensionServerProxy.setFrontendReady(); | 366 WebInspector.extensionServerProxy.setFrontendReady(); |
| 367 | 367 |
| 368 WebInspector.databaseModel = new WebInspector.DatabaseModel(); | 368 WebInspector.databaseModel = new WebInspector.DatabaseModel(); |
| 369 WebInspector.domStorageModel = new WebInspector.DOMStorageModel(); | 369 WebInspector.domStorageModel = new WebInspector.DOMStorageModel(); |
| 370 WebInspector.cpuProfilerModel = new WebInspector.CPUProfilerModel(); | 370 WebInspector.cpuProfilerModel = new WebInspector.CPUProfilerModel(mainTa
rget); |
| 371 | 371 |
| 372 InspectorAgent.enable(inspectorAgentEnableCallback.bind(this)); | 372 InspectorAgent.enable(inspectorAgentEnableCallback.bind(this)); |
| 373 | 373 |
| 374 /** | 374 /** |
| 375 * @this {WebInspector.Main} | 375 * @this {WebInspector.Main} |
| 376 */ | 376 */ |
| 377 function inspectorAgentEnableCallback() | 377 function inspectorAgentEnableCallback() |
| 378 { | 378 { |
| 379 WebInspector.inspectorView.showInitialPanel(); | 379 WebInspector.inspectorView.showInitialPanel(); |
| 380 | 380 |
| (...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 606 InspectorFrontendHost.inspectElementCompleted(); | 606 InspectorFrontendHost.inspectElementCompleted(); |
| 607 WebInspector._notFirstInspectElement = true; | 607 WebInspector._notFirstInspectElement = true; |
| 608 object.release(); | 608 object.release(); |
| 609 } | 609 } |
| 610 | 610 |
| 611 if (object.type === "function") { | 611 if (object.type === "function") { |
| 612 /** | 612 /** |
| 613 * @param {?Protocol.Error} error | 613 * @param {?Protocol.Error} error |
| 614 * @param {!DebuggerAgent.FunctionDetails} response | 614 * @param {!DebuggerAgent.FunctionDetails} response |
| 615 */ | 615 */ |
| 616 DebuggerAgent.getFunctionDetails(object.objectId, didGetDetails); | 616 object.functionDetails(didGetDetails); |
| 617 return; | 617 return; |
| 618 } | 618 } |
| 619 | 619 |
| 620 function didGetDetails(error, response) | 620 /** |
| 621 * @param {?DebuggerAgent.FunctionDetails} response |
| 622 */ |
| 623 function didGetDetails(response) |
| 621 { | 624 { |
| 622 object.release(); | 625 object.release(); |
| 623 | 626 |
| 624 if (error) { | 627 if (!response) |
| 625 console.error(error); | |
| 626 return; | |
| 627 } | |
| 628 | |
| 629 var uiLocation = WebInspector.debuggerModel.rawLocationToUILocation(
response.location); | |
| 630 if (!uiLocation) | |
| 631 return; | 628 return; |
| 632 | 629 |
| 633 // FIXME: Dependency violation. | 630 WebInspector.Revealer.reveal(WebInspector.DebuggerModel.Location.fro
mPayload(object.target(), response.location).toUILocation()); |
| 634 /** @type {!WebInspector.SourcesPanel} */ (WebInspector.inspectorVie
w.panel("sources")).showUILocation(uiLocation, true); | |
| 635 } | 631 } |
| 636 | 632 |
| 637 if (hints.copyToClipboard) | 633 if (hints.copyToClipboard) |
| 638 InspectorFrontendHost.copyText(object.value); | 634 InspectorFrontendHost.copyText(object.value); |
| 639 object.release(); | 635 object.release(); |
| 640 }, | 636 }, |
| 641 | 637 |
| 642 /** | 638 /** |
| 643 * @override | 639 * @override |
| 644 * @param {string} reason | 640 * @param {string} reason |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 | 744 |
| 749 WebInspector.__defineGetter__("inspectedPageURL", function() | 745 WebInspector.__defineGetter__("inspectedPageURL", function() |
| 750 { | 746 { |
| 751 return WebInspector.resourceTreeModel.inspectedPageURL(); | 747 return WebInspector.resourceTreeModel.inspectedPageURL(); |
| 752 }); | 748 }); |
| 753 | 749 |
| 754 WebInspector.panel = function(name) | 750 WebInspector.panel = function(name) |
| 755 { | 751 { |
| 756 return WebInspector.inspectorView.panel(name); | 752 return WebInspector.inspectorView.panel(name); |
| 757 } | 753 } |
| OLD | NEW |