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

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

Issue 2533483002: [DevTools] Typed events and event listeners. (Closed)
Patch Set: Created 4 years 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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 */ 524 */
525 _hideTabElement(tab) { 525 _hideTabElement(tab) {
526 this._tabsElement.removeChild(tab.tabElement); 526 this._tabsElement.removeChild(tab.tabElement);
527 tab._shown = false; 527 tab._shown = false;
528 } 528 }
529 529
530 _createDropDownButton() { 530 _createDropDownButton() {
531 var dropDownContainer = createElementWithClass('div', 'tabbed-pane-header-ta bs-drop-down-container'); 531 var dropDownContainer = createElementWithClass('div', 'tabbed-pane-header-ta bs-drop-down-container');
532 dropDownContainer.createChild('div', 'glyph'); 532 dropDownContainer.createChild('div', 'glyph');
533 this._dropDownMenu = new UI.DropDownMenu(dropDownContainer); 533 this._dropDownMenu = new UI.DropDownMenu(dropDownContainer);
534 this._dropDownMenu.addEventListener(UI.DropDownMenu.Events.ItemSelected, thi s._dropDownMenuItemSelected, this); 534 this._dropDownMenu.addEventListener(UI.DropDownMenu.ItemSelectedEvent, this. _dropDownMenuItemSelected, this);
535 535
536 return dropDownContainer; 536 return dropDownContainer;
537 } 537 }
538 538
539 /** 539 /**
540 * @param {!Common.Event} event 540 * @param {!UI.DropDownMenu.ItemSelectedEvent} event
541 */ 541 */
542 _dropDownMenuItemSelected(event) { 542 _dropDownMenuItemSelected(event) {
543 var tabId = /** @type {string} */ (event.data); 543 var tabId = event.id;
544 this._lastSelectedOverflowTab = this._tabsById[tabId]; 544 this._lastSelectedOverflowTab = this._tabsById[tabId];
545 this.selectTab(tabId, true); 545 this.selectTab(tabId, true);
546 } 546 }
547 547
548 _totalWidth() { 548 _totalWidth() {
549 return this._headerContentsElement.getBoundingClientRect().width; 549 return this._headerContentsElement.getBoundingClientRect().width;
550 } 550 }
551 551
552 /** 552 /**
553 * @return {number} 553 * @return {number}
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 * @param {!Array.<string>} ids 1209 * @param {!Array.<string>} ids
1210 */ 1210 */
1211 closeTabs(tabbedPane, ids) {}, 1211 closeTabs(tabbedPane, ids) {},
1212 1212
1213 /** 1213 /**
1214 * @param {string} tabId 1214 * @param {string} tabId
1215 * @param {!UI.ContextMenu} contextMenu 1215 * @param {!UI.ContextMenu} contextMenu
1216 */ 1216 */
1217 onContextMenu(tabId, contextMenu) {} 1217 onContextMenu(tabId, contextMenu) {}
1218 }; 1218 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698