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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui/TabbedPane.js

Issue 2617293002: DevTools: TabbedLocations only materialize tabs when needed (Closed)
Patch Set: rework for TabbedLocations Created 3 years, 11 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) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
433 this._updateTabElements(); 433 this._updateTabElements();
434 } 434 }
435 435
436 /** 436 /**
437 * @override 437 * @override
438 */ 438 */
439 wasShown() { 439 wasShown() {
440 var effectiveTab = this._currentTab || this._tabsHistory[0]; 440 var effectiveTab = this._currentTab || this._tabsHistory[0];
441 if (effectiveTab && this._autoSelectFirstItemOnShow) 441 if (effectiveTab && this._autoSelectFirstItemOnShow)
442 this.selectTab(effectiveTab.id); 442 this.selectTab(effectiveTab.id);
443 this.dispatchEventToListeners(UI.TabbedPane.Events.TabsShown, this._currentT ab);
443 } 444 }
444 445
445 /** 446 /**
446 * @param {boolean} enable 447 * @param {boolean} enable
447 */ 448 */
448 setTabSlider(enable) { 449 setTabSlider(enable) {
449 this._sliderEnabled = enable; 450 this._sliderEnabled = enable;
450 this._tabSlider.classList.toggle('enabled', enable); 451 this._tabSlider.classList.toggle('enabled', enable);
451 this._headerElement.classList.add('tabbed-pane-no-tab-borders'); 452 this._headerElement.classList.add('tabbed-pane-no-tab-borders');
452 } 453 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 setAllowTabReorder(allow, automatic) { 825 setAllowTabReorder(allow, automatic) {
825 this._allowTabReorder = allow; 826 this._allowTabReorder = allow;
826 this._automaticReorder = automatic; 827 this._automaticReorder = automatic;
827 } 828 }
828 }; 829 };
829 830
830 /** @enum {symbol} */ 831 /** @enum {symbol} */
831 UI.TabbedPane.Events = { 832 UI.TabbedPane.Events = {
832 TabSelected: Symbol('TabSelected'), 833 TabSelected: Symbol('TabSelected'),
833 TabClosed: Symbol('TabClosed'), 834 TabClosed: Symbol('TabClosed'),
834 TabOrderChanged: Symbol('TabOrderChanged') 835 TabOrderChanged: Symbol('TabOrderChanged'),
836 TabsShown: Symbol('TabsShown')
835 }; 837 };
836 838
837 /** 839 /**
838 * @unrestricted 840 * @unrestricted
839 */ 841 */
840 UI.TabbedPaneTab = class { 842 UI.TabbedPaneTab = class {
841 /** 843 /**
842 * @param {!UI.TabbedPane} tabbedPane 844 * @param {!UI.TabbedPane} tabbedPane
843 * @param {string} id 845 * @param {string} id
844 * @param {string} title 846 * @param {string} title
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
1203 * @param {!Array.<string>} ids 1205 * @param {!Array.<string>} ids
1204 */ 1206 */
1205 closeTabs(tabbedPane, ids) {}, 1207 closeTabs(tabbedPane, ids) {},
1206 1208
1207 /** 1209 /**
1208 * @param {string} tabId 1210 * @param {string} tabId
1209 * @param {!UI.ContextMenu} contextMenu 1211 * @param {!UI.ContextMenu} contextMenu
1210 */ 1212 */
1211 onContextMenu(tabId, contextMenu) {} 1213 onContextMenu(tabId, contextMenu) {}
1212 }; 1214 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698