| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 this.registerRequiredCSS("profilesPanel.css"); | 377 this.registerRequiredCSS("profilesPanel.css"); |
| 378 | 378 |
| 379 this.createSidebarViewWithTree(); | 379 this.createSidebarViewWithTree(); |
| 380 | 380 |
| 381 this._searchableView = new WebInspector.SearchableView(this); | 381 this._searchableView = new WebInspector.SearchableView(this); |
| 382 this.splitView.setMainView(this._searchableView); | 382 this.splitView.setMainView(this._searchableView); |
| 383 | 383 |
| 384 this.profilesItemTreeElement = new WebInspector.ProfilesSidebarTreeElement(t
his); | 384 this.profilesItemTreeElement = new WebInspector.ProfilesSidebarTreeElement(t
his); |
| 385 this.sidebarTree.appendChild(this.profilesItemTreeElement); | 385 this.sidebarTree.appendChild(this.profilesItemTreeElement); |
| 386 | 386 |
| 387 this._profileTypesByIdMap = {}; | |
| 388 | |
| 389 this.profileViews = document.createElement("div"); | 387 this.profileViews = document.createElement("div"); |
| 390 this.profileViews.id = "profile-views"; | 388 this.profileViews.id = "profile-views"; |
| 391 this.profileViews.classList.add("vbox"); | 389 this.profileViews.classList.add("vbox"); |
| 392 this._searchableView.element.appendChild(this.profileViews); | 390 this._searchableView.element.appendChild(this.profileViews); |
| 393 | 391 |
| 394 var statusBarContainer = this.splitView.mainElement().createChild("div", "pr
ofiles-status-bar"); | 392 var statusBarContainer = this.splitView.mainElement().createChild("div", "pr
ofiles-status-bar"); |
| 395 this._statusBarElement = statusBarContainer.createChild("div", "status-bar")
; | 393 this._statusBarElement = statusBarContainer.createChild("div", "status-bar")
; |
| 396 | 394 |
| 397 var sidebarTreeBox = this.splitView.sidebarElement().createChild("div", "pro
files-sidebar-tree-box"); | 395 var sidebarTreeBox = this.splitView.sidebarElement().createChild("div", "pro
files-sidebar-tree-box"); |
| 398 sidebarTreeBox.appendChild(this.sidebarTreeElement); | 396 sidebarTreeBox.appendChild(this.sidebarTreeElement); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 /** | 488 /** |
| 491 * @return {!WebInspector.ProfileLauncherView} | 489 * @return {!WebInspector.ProfileLauncherView} |
| 492 */ | 490 */ |
| 493 _createLauncherView: function() | 491 _createLauncherView: function() |
| 494 { | 492 { |
| 495 return new WebInspector.ProfileLauncherView(this); | 493 return new WebInspector.ProfileLauncherView(this); |
| 496 }, | 494 }, |
| 497 | 495 |
| 498 _findProfileTypeByExtension: function(fileName) | 496 _findProfileTypeByExtension: function(fileName) |
| 499 { | 497 { |
| 500 for (var id in this._profileTypesByIdMap) { | 498 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes(); |
| 501 var type = this._profileTypesByIdMap[id]; | 499 for (var i = 0; i < types.length; i++) { |
| 500 var type = types[i]; |
| 502 var extension = type.fileExtension(); | 501 var extension = type.fileExtension(); |
| 503 if (!extension) | 502 if (!extension) |
| 504 continue; | 503 continue; |
| 505 if (fileName.endsWith(type.fileExtension())) | 504 if (fileName.endsWith(type.fileExtension())) |
| 506 return type; | 505 return type; |
| 507 } | 506 } |
| 508 return null; | 507 return null; |
| 509 }, | 508 }, |
| 510 | 509 |
| 511 _registerShortcuts: function() | 510 _registerShortcuts: function() |
| (...skipping 15 matching lines...) Expand all Loading... |
| 527 /** | 526 /** |
| 528 * @param {!File} file | 527 * @param {!File} file |
| 529 */ | 528 */ |
| 530 _loadFromFile: function(file) | 529 _loadFromFile: function(file) |
| 531 { | 530 { |
| 532 this._createFileSelectorElement(); | 531 this._createFileSelectorElement(); |
| 533 | 532 |
| 534 var profileType = this._findProfileTypeByExtension(file.name); | 533 var profileType = this._findProfileTypeByExtension(file.name); |
| 535 if (!profileType) { | 534 if (!profileType) { |
| 536 var extensions = []; | 535 var extensions = []; |
| 537 for (var id in this._profileTypesByIdMap) { | 536 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes()
; |
| 538 var extension = this._profileTypesByIdMap[id].fileExtension(); | 537 for (var i = 0; i < types.length; i++) { |
| 538 var extension = types[i].fileExtension(); |
| 539 if (!extension) | 539 if (!extension) |
| 540 continue; | 540 continue; |
| 541 extensions.push(extension); | 541 extensions.push(extension); |
| 542 } | 542 } |
| 543 WebInspector.log(WebInspector.UIString("Can't load file. Only files
with extensions '%s' can be loaded.", extensions.join("', '"))); | 543 WebInspector.log(WebInspector.UIString("Can't load file. Only files
with extensions '%s' can be loaded.", extensions.join("', '"))); |
| 544 return; | 544 return; |
| 545 } | 545 } |
| 546 | 546 |
| 547 if (!!profileType.profileBeingRecorded()) { | 547 if (!!profileType.profileBeingRecorded()) { |
| 548 WebInspector.log(WebInspector.UIString("Can't load profile when othe
r profile is recording.")); | 548 WebInspector.log(WebInspector.UIString("Can't load profile when othe
r profile is recording.")); |
| 549 return; | 549 return; |
| 550 } | 550 } |
| 551 | 551 |
| 552 profileType.loadFromFile(file); | 552 profileType.loadFromFile(file); |
| 553 }, | 553 }, |
| 554 | 554 |
| 555 /** | 555 /** |
| 556 * @return {boolean} | 556 * @return {boolean} |
| 557 */ | 557 */ |
| 558 toggleRecordButton: function() | 558 toggleRecordButton: function() |
| 559 { | 559 { |
| 560 var type = this._selectedProfileType; | 560 var type = this._selectedProfileType; |
| 561 var isProfiling = type.buttonClicked(); | 561 var isProfiling = type.buttonClicked(); |
| 562 this.recordButton.toggled = isProfiling; | 562 this.recordButton.toggled = isProfiling; |
| 563 this.recordButton.title = type.buttonTooltip; | 563 this.recordButton.title = type.buttonTooltip; |
| 564 if (isProfiling) { | 564 if (isProfiling) { |
| 565 this._launcherView.profileStarted(); | 565 this._launcherView.profileStarted(); |
| 566 if (type.hasTemporaryView()) | 566 if (type.hasTemporaryView()) |
| 567 this._showProfile(type.profileBeingRecorded()); | 567 this.showProfile(type.profileBeingRecorded()); |
| 568 } else { | 568 } else { |
| 569 this._launcherView.profileFinished(); | 569 this._launcherView.profileFinished(); |
| 570 } | 570 } |
| 571 return true; | 571 return true; |
| 572 }, | 572 }, |
| 573 | 573 |
| 574 _profileBeingRecordedRemoved: function() | 574 _profileBeingRecordedRemoved: function() |
| 575 { | 575 { |
| 576 this.recordButton.toggled = false; | 576 this.recordButton.toggled = false; |
| 577 this.recordButton.title = this._selectedProfileType.buttonTooltip; | 577 this.recordButton.title = this._selectedProfileType.buttonTooltip; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 596 if (statusBarItems) { | 596 if (statusBarItems) { |
| 597 for (var i = 0; i < statusBarItems.length; ++i) | 597 for (var i = 0; i < statusBarItems.length; ++i) |
| 598 this._profileTypeStatusBarItemsContainer.appendChild(statusBarIt
ems[i]); | 598 this._profileTypeStatusBarItemsContainer.appendChild(statusBarIt
ems[i]); |
| 599 } | 599 } |
| 600 }, | 600 }, |
| 601 | 601 |
| 602 _reset: function() | 602 _reset: function() |
| 603 { | 603 { |
| 604 WebInspector.Panel.prototype.reset.call(this); | 604 WebInspector.Panel.prototype.reset.call(this); |
| 605 | 605 |
| 606 for (var typeId in this._profileTypesByIdMap) | 606 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes(); |
| 607 this._profileTypesByIdMap[typeId]._reset(); | 607 for (var i = 0; i < types.length; i++) |
| 608 types[i]._reset(); |
| 608 | 609 |
| 609 delete this.visibleView; | 610 delete this.visibleView; |
| 610 delete this.currentQuery; | 611 delete this.currentQuery; |
| 611 this.searchCanceled(); | 612 this.searchCanceled(); |
| 612 | 613 |
| 613 this._profileGroups = {}; | 614 this._profileGroups = {}; |
| 614 this.recordButton.toggled = false; | 615 this.recordButton.toggled = false; |
| 615 if (this._selectedProfileType) | 616 if (this._selectedProfileType) |
| 616 this.recordButton.title = this._selectedProfileType.buttonTooltip; | 617 this.recordButton.title = this._selectedProfileType.buttonTooltip; |
| 617 this._launcherView.profileFinished(); | 618 this._launcherView.profileFinished(); |
| (...skipping 30 matching lines...) Expand all Loading... |
| 648 _garbageCollectButtonClicked: function() | 649 _garbageCollectButtonClicked: function() |
| 649 { | 650 { |
| 650 HeapProfilerAgent.collectGarbage(); | 651 HeapProfilerAgent.collectGarbage(); |
| 651 }, | 652 }, |
| 652 | 653 |
| 653 /** | 654 /** |
| 654 * @param {!WebInspector.ProfileType} profileType | 655 * @param {!WebInspector.ProfileType} profileType |
| 655 */ | 656 */ |
| 656 _registerProfileType: function(profileType) | 657 _registerProfileType: function(profileType) |
| 657 { | 658 { |
| 658 this._profileTypesByIdMap[profileType.id] = profileType; | |
| 659 this._launcherView.addProfileType(profileType); | 659 this._launcherView.addProfileType(profileType); |
| 660 profileType.treeElement = new WebInspector.SidebarSectionTreeElement(pro
fileType.treeItemTitle, null, true); | 660 profileType.treeElement = new WebInspector.SidebarSectionTreeElement(pro
fileType.treeItemTitle, null, true); |
| 661 profileType.treeElement.hidden = true; | 661 profileType.treeElement.hidden = true; |
| 662 this.sidebarTree.appendChild(profileType.treeElement); | 662 this.sidebarTree.appendChild(profileType.treeElement); |
| 663 profileType.treeElement.childrenListElement.addEventListener("contextmen
u", this._handleContextMenuEvent.bind(this), true); | 663 profileType.treeElement.childrenListElement.addEventListener("contextmen
u", this._handleContextMenuEvent.bind(this), true); |
| 664 | 664 |
| 665 /** | 665 /** |
| 666 * @this {WebInspector.ProfilesPanel} | 666 * @this {WebInspector.ProfilesPanel} |
| 667 */ | 667 */ |
| 668 function onAddProfileHeader(event) | 668 function onAddProfileHeader(event) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 | 772 |
| 773 var profileTreeElement = profile.createSidebarTreeElement(); | 773 var profileTreeElement = profile.createSidebarTreeElement(); |
| 774 profile.sidebarElement = profileTreeElement; | 774 profile.sidebarElement = profileTreeElement; |
| 775 profileTreeElement.small = small; | 775 profileTreeElement.small = small; |
| 776 if (alternateTitle) | 776 if (alternateTitle) |
| 777 profileTreeElement.mainTitle = alternateTitle; | 777 profileTreeElement.mainTitle = alternateTitle; |
| 778 profile._profilesTreeElement = profileTreeElement; | 778 profile._profilesTreeElement = profileTreeElement; |
| 779 | 779 |
| 780 sidebarParent.appendChild(profileTreeElement); | 780 sidebarParent.appendChild(profileTreeElement); |
| 781 if (!this.visibleView || this.visibleView === this._launcherView) | 781 if (!this.visibleView || this.visibleView === this._launcherView) |
| 782 this._showProfile(profile); | 782 this.showProfile(profile); |
| 783 }, | 783 }, |
| 784 | 784 |
| 785 /** | 785 /** |
| 786 * @param {!WebInspector.ProfileHeader} profile | 786 * @param {!WebInspector.ProfileHeader} profile |
| 787 */ | 787 */ |
| 788 _removeProfileHeader: function(profile) | 788 _removeProfileHeader: function(profile) |
| 789 { | 789 { |
| 790 if (profile.profileType()._profileBeingRecorded === profile) | 790 if (profile.profileType()._profileBeingRecorded === profile) |
| 791 this._profileBeingRecordedRemoved(); | 791 this._profileBeingRecordedRemoved(); |
| 792 | 792 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 816 this.profilesItemTreeElement.select(); | 816 this.profilesItemTreeElement.select(); |
| 817 this._showLauncherView(); | 817 this._showLauncherView(); |
| 818 sidebarParent.hidden = true; | 818 sidebarParent.hidden = true; |
| 819 } | 819 } |
| 820 }, | 820 }, |
| 821 | 821 |
| 822 /** | 822 /** |
| 823 * @param {?WebInspector.ProfileHeader} profile | 823 * @param {?WebInspector.ProfileHeader} profile |
| 824 * @return {?WebInspector.View} | 824 * @return {?WebInspector.View} |
| 825 */ | 825 */ |
| 826 _showProfile: function(profile) | 826 showProfile: function(profile) |
| 827 { | 827 { |
| 828 if (!profile || (profile.profileType().profileBeingRecorded() === profil
e) && !profile.profileType().hasTemporaryView()) | 828 if (!profile || (profile.profileType().profileBeingRecorded() === profil
e) && !profile.profileType().hasTemporaryView()) |
| 829 return null; | 829 return null; |
| 830 | 830 |
| 831 var view = profile.view(this); | 831 var view = profile.view(this); |
| 832 if (view === this.visibleView) | 832 if (view === this.visibleView) |
| 833 return view; | 833 return view; |
| 834 | 834 |
| 835 this.closeVisibleView(); | 835 this.closeVisibleView(); |
| 836 | 836 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 851 | 851 |
| 852 return view; | 852 return view; |
| 853 }, | 853 }, |
| 854 | 854 |
| 855 /** | 855 /** |
| 856 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId | 856 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId |
| 857 * @param {string} viewName | 857 * @param {string} viewName |
| 858 */ | 858 */ |
| 859 showObject: function(snapshotObjectId, viewName) | 859 showObject: function(snapshotObjectId, viewName) |
| 860 { | 860 { |
| 861 var heapProfiles = this.getProfileType(WebInspector.HeapSnapshotProfileT
ype.TypeId).getProfiles(); | 861 var heapProfiles = WebInspector.ProfileTypeRegistry.instance.heapSnapsho
tProfileType.getProfiles(); |
| 862 for (var i = 0; i < heapProfiles.length; i++) { | 862 for (var i = 0; i < heapProfiles.length; i++) { |
| 863 var profile = heapProfiles[i]; | 863 var profile = heapProfiles[i]; |
| 864 // FIXME: allow to choose snapshot if there are several options. | 864 // FIXME: allow to choose snapshot if there are several options. |
| 865 if (profile.maxJSObjectId >= snapshotObjectId) { | 865 if (profile.maxJSObjectId >= snapshotObjectId) { |
| 866 this._showProfile(profile); | 866 this.showProfile(profile); |
| 867 var view = profile.view(this); | 867 var view = profile.view(this); |
| 868 view.changeView(viewName, function() { | 868 view.changeView(viewName, function() { |
| 869 function didHighlightObject(found) { | 869 function didHighlightObject(found) { |
| 870 if (!found) | 870 if (!found) |
| 871 WebInspector.log("Cannot find corresponding heap sna
pshot node", WebInspector.ConsoleMessage.MessageLevel.Error, true); | 871 WebInspector.log("Cannot find corresponding heap sna
pshot node", WebInspector.ConsoleMessage.MessageLevel.Error, true); |
| 872 } | 872 } |
| 873 view.dataGrid.highlightObjectByHeapSnapshotId(snapshotObject
Id, didHighlightObject.bind(this)); | 873 view.dataGrid.highlightObjectByHeapSnapshotId(snapshotObject
Id, didHighlightObject.bind(this)); |
| 874 }); | 874 }); |
| 875 break; | 875 break; |
| 876 } | 876 } |
| 877 } | 877 } |
| 878 }, | 878 }, |
| 879 | 879 |
| 880 /** | |
| 881 * @param {string} typeId | |
| 882 * @param {number} uid | |
| 883 * @return {?WebInspector.ProfileHeader} | |
| 884 */ | |
| 885 getProfile: function(typeId, uid) | |
| 886 { | |
| 887 return this.getProfileType(typeId).getProfile(uid); | |
| 888 }, | |
| 889 | |
| 890 /** | |
| 891 * @param {!WebInspector.View} view | |
| 892 */ | |
| 893 showView: function(view) | |
| 894 { | |
| 895 this._showProfile(view.profile); | |
| 896 }, | |
| 897 | |
| 898 /** | |
| 899 * @param {string} typeId | |
| 900 * @return {!WebInspector.ProfileType} | |
| 901 */ | |
| 902 getProfileType: function(typeId) | |
| 903 { | |
| 904 return this._profileTypesByIdMap[typeId]; | |
| 905 }, | |
| 906 | |
| 907 /** | |
| 908 * @param {string} typeId | |
| 909 * @param {string} uid | |
| 910 * @return {?WebInspector.View} | |
| 911 */ | |
| 912 showProfile: function(typeId, uid) | |
| 913 { | |
| 914 return this._showProfile(this.getProfile(typeId, Number(uid))); | |
| 915 }, | |
| 916 | |
| 917 closeVisibleView: function() | 880 closeVisibleView: function() |
| 918 { | 881 { |
| 919 if (this.visibleView) | 882 if (this.visibleView) |
| 920 this.visibleView.detach(); | 883 this.visibleView.detach(); |
| 921 delete this.visibleView; | 884 delete this.visibleView; |
| 922 }, | 885 }, |
| 923 | 886 |
| 924 /** | 887 /** |
| 925 * @param {string} query | 888 * @param {string} query |
| 926 * @param {boolean} shouldJump | 889 * @param {boolean} shouldJump |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 965 jumpToPreviousSearchResult: function() | 928 jumpToPreviousSearchResult: function() |
| 966 { | 929 { |
| 967 if (!this._searchResultsView) | 930 if (!this._searchResultsView) |
| 968 return; | 931 return; |
| 969 if (this._searchResultsView !== this.visibleView) | 932 if (this._searchResultsView !== this.visibleView) |
| 970 return; | 933 return; |
| 971 this._searchResultsView.jumpToPreviousSearchResult(); | 934 this._searchResultsView.jumpToPreviousSearchResult(); |
| 972 this._searchableView.updateCurrentMatchIndex(this._searchResultsView.cur
rentSearchResultIndex()); | 935 this._searchableView.updateCurrentMatchIndex(this._searchResultsView.cur
rentSearchResultIndex()); |
| 973 }, | 936 }, |
| 974 | 937 |
| 975 /** | |
| 976 * @return {!Array.<!WebInspector.ProfileHeader>} | |
| 977 */ | |
| 978 _getAllProfiles: function() | |
| 979 { | |
| 980 var profiles = []; | |
| 981 for (var typeId in this._profileTypesByIdMap) | |
| 982 profiles = profiles.concat(this._profileTypesByIdMap[typeId].getProf
iles()); | |
| 983 return profiles; | |
| 984 }, | |
| 985 | |
| 986 searchCanceled: function() | 938 searchCanceled: function() |
| 987 { | 939 { |
| 988 if (this._searchResultsView) { | 940 if (this._searchResultsView) { |
| 989 if (this._searchResultsView.searchCanceled) | 941 if (this._searchResultsView.searchCanceled) |
| 990 this._searchResultsView.searchCanceled(); | 942 this._searchResultsView.searchCanceled(); |
| 991 this._searchResultsView.currentQuery = null; | 943 this._searchResultsView.currentQuery = null; |
| 992 this._searchResultsView = null; | 944 this._searchResultsView = null; |
| 993 } | 945 } |
| 994 this._searchableView.updateSearchMatchesCount(0); | 946 this._searchableView.updateSearchMatchesCount(0); |
| 995 }, | 947 }, |
| (...skipping 19 matching lines...) Expand all Loading... |
| 1015 return; | 967 return; |
| 1016 | 968 |
| 1017 if (WebInspector.inspectorView.currentPanel() !== this) | 969 if (WebInspector.inspectorView.currentPanel() !== this) |
| 1018 return; | 970 return; |
| 1019 | 971 |
| 1020 var object = /** @type {!WebInspector.RemoteObject} */ (target); | 972 var object = /** @type {!WebInspector.RemoteObject} */ (target); |
| 1021 var objectId = object.objectId; | 973 var objectId = object.objectId; |
| 1022 if (!objectId) | 974 if (!objectId) |
| 1023 return; | 975 return; |
| 1024 | 976 |
| 1025 var heapProfiles = this.getProfileType(WebInspector.HeapSnapshotProfileT
ype.TypeId).getProfiles(); | 977 var heapProfiles = WebInspector.ProfileTypeRegistry.instance.heapSnapsho
tProfileType.getProfiles(); |
| 1026 if (!heapProfiles.length) | 978 if (!heapProfiles.length) |
| 1027 return; | 979 return; |
| 1028 | 980 |
| 1029 /** | 981 /** |
| 1030 * @this {WebInspector.ProfilesPanel} | 982 * @this {WebInspector.ProfilesPanel} |
| 1031 */ | 983 */ |
| 1032 function revealInView(viewName) | 984 function revealInView(viewName) |
| 1033 { | 985 { |
| 1034 HeapProfilerAgent.getHeapObjectId(objectId, didReceiveHeapObjectId.b
ind(this, viewName)); | 986 HeapProfilerAgent.getHeapObjectId(objectId, didReceiveHeapObjectId.b
ind(this, viewName)); |
| 1035 } | 987 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1081 { | 1033 { |
| 1082 this.profile = profile; | 1034 this.profile = profile; |
| 1083 WebInspector.SidebarTreeElement.call(this, className, "", "", profile, false
); | 1035 WebInspector.SidebarTreeElement.call(this, className, "", "", profile, false
); |
| 1084 this.refreshTitles(); | 1036 this.refreshTitles(); |
| 1085 } | 1037 } |
| 1086 | 1038 |
| 1087 WebInspector.ProfileSidebarTreeElement.prototype = { | 1039 WebInspector.ProfileSidebarTreeElement.prototype = { |
| 1088 onselect: function() | 1040 onselect: function() |
| 1089 { | 1041 { |
| 1090 if (!this._suppressOnSelect) | 1042 if (!this._suppressOnSelect) |
| 1091 this.treeOutline.panel._showProfile(this.profile); | 1043 this.treeOutline.panel.showProfile(this.profile); |
| 1092 }, | 1044 }, |
| 1093 | 1045 |
| 1094 /** | 1046 /** |
| 1095 * @return {boolean} | 1047 * @return {boolean} |
| 1096 */ | 1048 */ |
| 1097 ondelete: function() | 1049 ondelete: function() |
| 1098 { | 1050 { |
| 1099 this.profile.profileType().removeProfile(this.profile); | 1051 this.profile.profileType().removeProfile(this.profile); |
| 1100 return true; | 1052 return true; |
| 1101 }, | 1053 }, |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 WebInspector.ProfileGroupSidebarTreeElement = function(panel, title, subtitle) | 1094 WebInspector.ProfileGroupSidebarTreeElement = function(panel, title, subtitle) |
| 1143 { | 1095 { |
| 1144 WebInspector.SidebarTreeElement.call(this, "profile-group-sidebar-tree-item"
, title, subtitle, null, true); | 1096 WebInspector.SidebarTreeElement.call(this, "profile-group-sidebar-tree-item"
, title, subtitle, null, true); |
| 1145 this._panel = panel; | 1097 this._panel = panel; |
| 1146 } | 1098 } |
| 1147 | 1099 |
| 1148 WebInspector.ProfileGroupSidebarTreeElement.prototype = { | 1100 WebInspector.ProfileGroupSidebarTreeElement.prototype = { |
| 1149 onselect: function() | 1101 onselect: function() |
| 1150 { | 1102 { |
| 1151 if (this.children.length > 0) | 1103 if (this.children.length > 0) |
| 1152 this._panel._showProfile(this.children[this.children.length - 1].pro
file); | 1104 this._panel.showProfile(this.children[this.children.length - 1].prof
ile); |
| 1153 }, | 1105 }, |
| 1154 | 1106 |
| 1155 __proto__: WebInspector.SidebarTreeElement.prototype | 1107 __proto__: WebInspector.SidebarTreeElement.prototype |
| 1156 } | 1108 } |
| 1157 | 1109 |
| 1158 /** | 1110 /** |
| 1159 * @constructor | 1111 * @constructor |
| 1160 * @extends {WebInspector.SidebarTreeElement} | 1112 * @extends {WebInspector.SidebarTreeElement} |
| 1161 * @param {!WebInspector.ProfilesPanel} panel | 1113 * @param {!WebInspector.ProfilesPanel} panel |
| 1162 */ | 1114 */ |
| (...skipping 27 matching lines...) Expand all Loading... |
| 1190 importScript("HeapSnapshotProxy.js"); | 1142 importScript("HeapSnapshotProxy.js"); |
| 1191 importScript("HeapSnapshotDataGrids.js"); | 1143 importScript("HeapSnapshotDataGrids.js"); |
| 1192 importScript("HeapSnapshotGridNodes.js"); | 1144 importScript("HeapSnapshotGridNodes.js"); |
| 1193 importScript("HeapSnapshotView.js"); | 1145 importScript("HeapSnapshotView.js"); |
| 1194 importScript("ProfileLauncherView.js"); | 1146 importScript("ProfileLauncherView.js"); |
| 1195 importScript("TopDownProfileDataGridTree.js"); | 1147 importScript("TopDownProfileDataGridTree.js"); |
| 1196 importScript("CanvasProfileView.js"); | 1148 importScript("CanvasProfileView.js"); |
| 1197 importScript("CanvasReplayStateView.js"); | 1149 importScript("CanvasReplayStateView.js"); |
| 1198 | 1150 |
| 1199 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); | 1151 WebInspector.ProfileTypeRegistry.instance = new WebInspector.ProfileTypeRegistry
(); |
| OLD | NEW |