Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(387)

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/ProfilesPanel.js

Issue 2217783002: DevTools: use view locations in the elements and sources sidebars. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 view.focus(); 808 view.focus();
809 809
810 this.visibleView = view; 810 this.visibleView = view;
811 811
812 var profileTypeSection = this._typeIdToSidebarSection[profile.profileTyp e().id]; 812 var profileTypeSection = this._typeIdToSidebarSection[profile.profileTyp e().id];
813 var sidebarElement = profileTypeSection.sidebarElementForProfile(profile ); 813 var sidebarElement = profileTypeSection.sidebarElementForProfile(profile );
814 sidebarElement.revealAndSelect(); 814 sidebarElement.revealAndSelect();
815 815
816 this._profileViewToolbar.removeToolbarItems(); 816 this._profileViewToolbar.removeToolbarItems();
817 817
818 var toolbarItems = view.toolbarItems(); 818 var toolbarItems = view.syncToolbarItems();
819 for (var i = 0; i < toolbarItems.length; ++i) 819 for (var i = 0; i < toolbarItems.length; ++i)
820 this._profileViewToolbar.appendToolbarItem(toolbarItems[i]); 820 this._profileViewToolbar.appendToolbarItem(toolbarItems[i]);
dgozman 2016/08/05 01:32:09 Let's follow up with an OverlayViewLocation with a
821 821
822 return view; 822 return view;
823 }, 823 },
824 824
825 /** 825 /**
826 * @override 826 * @override
827 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId 827 * @param {!HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId
828 * @param {string} perspectiveName 828 * @param {string} perspectiveName
829 */ 829 */
830 showObject: function(snapshotObjectId, perspectiveName) 830 showObject: function(snapshotObjectId, perspectiveName)
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 * @return {boolean} 1286 * @return {boolean}
1287 */ 1287 */
1288 handleAction: function(context, actionId) 1288 handleAction: function(context, actionId)
1289 { 1289 {
1290 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel); 1290 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel);
1291 console.assert(panel && panel instanceof WebInspector.ProfilesPanel); 1291 console.assert(panel && panel instanceof WebInspector.ProfilesPanel);
1292 panel.toggleRecord(); 1292 panel.toggleRecord();
1293 return true; 1293 return true;
1294 } 1294 }
1295 } 1295 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698