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

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

Issue 672553002: DevTools: [FlameChart] focus flamechart when it gets shown (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileView.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 431 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 this.registerRequiredCSS("profiler/heapProfiler.css"); 442 this.registerRequiredCSS("profiler/heapProfiler.css");
443 this.registerRequiredCSS("profiler/profilesPanel.css"); 443 this.registerRequiredCSS("profiler/profilesPanel.css");
444 444
445 this._searchableView = new WebInspector.SearchableView(this); 445 this._searchableView = new WebInspector.SearchableView(this);
446 446
447 var mainView = new WebInspector.VBox(); 447 var mainView = new WebInspector.VBox();
448 this._searchableView.show(mainView.element); 448 this._searchableView.show(mainView.element);
449 mainView.show(this.mainElement()); 449 mainView.show(this.mainElement());
450 450
451 this.profilesItemTreeElement = new WebInspector.ProfilesSidebarTreeElement(t his); 451 this.profilesItemTreeElement = new WebInspector.ProfilesSidebarTreeElement(t his);
452 this.sidebarTree.setFocusable(false);
452 this.sidebarTree.appendChild(this.profilesItemTreeElement); 453 this.sidebarTree.appendChild(this.profilesItemTreeElement);
453 454
454 this.profileViews = createElement("div"); 455 this.profileViews = createElement("div");
455 this.profileViews.id = "profile-views"; 456 this.profileViews.id = "profile-views";
456 this.profileViews.classList.add("vbox"); 457 this.profileViews.classList.add("vbox");
457 this._searchableView.element.appendChild(this.profileViews); 458 this._searchableView.element.appendChild(this.profileViews);
458 459
459 var statusBarContainer = createElementWithClass("div", "profiles-status-bar" ); 460 var statusBarContainer = createElementWithClass("div", "profiles-status-bar" );
460 mainView.element.insertBefore(statusBarContainer, mainView.element.firstChil d); 461 mainView.element.insertBefore(statusBarContainer, mainView.element.firstChil d);
461 this._statusBarElement = statusBarContainer.createChild("div", "status-bar") ; 462 this._statusBarElement = statusBarContainer.createChild("div", "status-bar") ;
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 if (!profile || (profile.profileType().profileBeingRecorded() === profil e) && !profile.profileType().hasTemporaryView()) 791 if (!profile || (profile.profileType().profileBeingRecorded() === profil e) && !profile.profileType().hasTemporaryView())
791 return null; 792 return null;
792 793
793 var view = this._viewForProfile(profile); 794 var view = this._viewForProfile(profile);
794 if (view === this.visibleView) 795 if (view === this.visibleView)
795 return view; 796 return view;
796 797
797 this.closeVisibleView(); 798 this.closeVisibleView();
798 799
799 view.show(this.profileViews); 800 view.show(this.profileViews);
801 view.focus();
800 802
801 this.visibleView = view; 803 this.visibleView = view;
802 804
803 var profileTypeSection = this._typeIdToSidebarSection[profile.profileTyp e().id]; 805 var profileTypeSection = this._typeIdToSidebarSection[profile.profileTyp e().id];
804 var sidebarElement = profileTypeSection.sidebarElementForProfile(profile ); 806 var sidebarElement = profileTypeSection.sidebarElementForProfile(profile );
805 sidebarElement.revealAndSelect(); 807 sidebarElement.revealAndSelect();
806 808
807 this._profileViewStatusBarItemsContainer.removeChildren(); 809 this._profileViewStatusBarItemsContainer.removeChildren();
808 810
809 var statusBarItems = view.statusBarItems; 811 var statusBarItems = view.statusBarItems;
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 1342
1341 WebInspector.ProfilesPanelFactory.prototype = { 1343 WebInspector.ProfilesPanelFactory.prototype = {
1342 /** 1344 /**
1343 * @return {!WebInspector.Panel} 1345 * @return {!WebInspector.Panel}
1344 */ 1346 */
1345 createPanel: function() 1347 createPanel: function()
1346 { 1348 {
1347 return WebInspector.ProfilesPanel._instance(); 1349 return WebInspector.ProfilesPanel._instance();
1348 } 1350 }
1349 } 1351 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/profiler/CPUProfileView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698