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

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

Issue 2867133002: DevTools: Let the drawer tabs be reordered (Closed)
Patch Set: Preserve tab order on appending tabs Created 3 years, 7 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 | « third_party/WebKit/Source/devtools/front_end/ui/InspectorView.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) 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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 console.assert(!this._tabsById.has(id), `Tabbed pane already contains a tab with id '${id}'`); 200 console.assert(!this._tabsById.has(id), `Tabbed pane already contains a tab with id '${id}'`);
201 this._tabsById.set(id, tab); 201 this._tabsById.set(id, tab);
202 if (index !== undefined) 202 if (index !== undefined)
203 this._tabs.splice(index, 0, tab); 203 this._tabs.splice(index, 0, tab);
204 else 204 else
205 this._tabs.push(tab); 205 this._tabs.push(tab);
206 this._tabsHistory.push(tab); 206 this._tabsHistory.push(tab);
207 if (this._tabsHistory[0] === tab && this.isShowing()) 207 if (this._tabsHistory[0] === tab && this.isShowing())
208 this.selectTab(tab.id, userGesture); 208 this.selectTab(tab.id, userGesture);
209 this._updateTabElements(); 209 this._updateTabElements();
210 this.dispatchEventToListeners(UI.TabbedPane.Events.TabOrderChanged, this._ta bs);
dgozman 2017/05/15 17:03:36 Looks like a band-aid fix. Instead, client should
einbinder 2017/05/23 00:12:25 Done.
210 } 211 }
211 212
212 /** 213 /**
213 * @param {string} id 214 * @param {string} id
214 * @param {boolean=} userGesture 215 * @param {boolean=} userGesture
215 */ 216 */
216 closeTab(id, userGesture) { 217 closeTab(id, userGesture) {
217 this.closeTabs([id], userGesture); 218 this.closeTabs([id], userGesture);
218 } 219 }
219 220
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 * @param {!Array.<string>} ids 1226 * @param {!Array.<string>} ids
1226 */ 1227 */
1227 closeTabs(tabbedPane, ids) {}, 1228 closeTabs(tabbedPane, ids) {},
1228 1229
1229 /** 1230 /**
1230 * @param {string} tabId 1231 * @param {string} tabId
1231 * @param {!UI.ContextMenu} contextMenu 1232 * @param {!UI.ContextMenu} contextMenu
1232 */ 1233 */
1233 onContextMenu(tabId, contextMenu) {} 1234 onContextMenu(tabId, contextMenu) {}
1234 }; 1235 };
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/ui/InspectorView.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698