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

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

Issue 2413023002: DevTools: restore selected panel upon devtools reload. (Closed)
Patch Set: same w/ removed code Created 4 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 | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/Panel.js » ('j') | 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 621 matching lines...) Expand 10 before | Expand all | Expand 10 after
632 { 632 {
633 this._updateToggleRecordAction(this._toggleRecordAction.toggled()); 633 this._updateToggleRecordAction(this._toggleRecordAction.toggled());
634 this._profileTypeToolbar.removeToolbarItems(); 634 this._profileTypeToolbar.removeToolbarItems();
635 var toolbarItems = this._selectedProfileType.toolbarItems(); 635 var toolbarItems = this._selectedProfileType.toolbarItems();
636 for (var i = 0; i < toolbarItems.length; ++i) 636 for (var i = 0; i < toolbarItems.length; ++i)
637 this._profileTypeToolbar.appendToolbarItem(toolbarItems[i]); 637 this._profileTypeToolbar.appendToolbarItem(toolbarItems[i]);
638 }, 638 },
639 639
640 _reset: function() 640 _reset: function()
641 { 641 {
642 WebInspector.Panel.prototype.reset.call(this);
643
644 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes(); 642 var types = WebInspector.ProfileTypeRegistry.instance.profileTypes();
645 for (var i = 0; i < types.length; i++) 643 for (var i = 0; i < types.length; i++)
646 types[i]._reset(); 644 types[i]._reset();
647 645
648 delete this.visibleView; 646 delete this.visibleView;
649 647
650 this._profileGroups = {}; 648 this._profileGroups = {};
651 this._updateToggleRecordAction(false); 649 this._updateToggleRecordAction(false);
652 this._launcherView.profileFinished(); 650 this._launcherView.profileFinished();
653 651
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1347 * @return {boolean} 1345 * @return {boolean}
1348 */ 1346 */
1349 handleAction: function(context, actionId) 1347 handleAction: function(context, actionId)
1350 { 1348 {
1351 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel); 1349 var panel = WebInspector.context.flavor(WebInspector.ProfilesPanel);
1352 console.assert(panel && panel instanceof WebInspector.ProfilesPanel); 1350 console.assert(panel && panel instanceof WebInspector.ProfilesPanel);
1353 panel.toggleRecord(); 1351 panel.toggleRecord();
1354 return true; 1352 return true;
1355 } 1353 }
1356 } 1354 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/devtools/front_end/ui/Panel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698