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

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

Issue 2174863003: DevTools: traverse widget hierarchy to reveal views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: lcean Created 4 years, 4 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 837 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 /** 848 /**
849 * @param {boolean} allow 849 * @param {boolean} allow
850 * @param {boolean=} automatic 850 * @param {boolean=} automatic
851 */ 851 */
852 setAllowTabReorder: function(allow, automatic) 852 setAllowTabReorder: function(allow, automatic)
853 { 853 {
854 this._allowTabReorder = allow; 854 this._allowTabReorder = allow;
855 this._automaticReorder = automatic; 855 this._automaticReorder = automatic;
856 }, 856 },
857 857
858 /**
859 * @override
860 * @param {!WebInspector.Widget} child
861 * @return {boolean}
862 */
863 revealChild: function(child)
864 {
865 if (this._currentTabLocked)
866 return false;
867
868 for (var tabId of this.tabIds()) {
869 if (this.tabView(tabId) === child) {
870 this.selectTab(tabId);
871 return true;
872 }
873 }
874 return false;
875 },
876
858 __proto__: WebInspector.VBox.prototype 877 __proto__: WebInspector.VBox.prototype
859 } 878 }
860 879
861 /** 880 /**
862 * @constructor 881 * @constructor
863 * @param {!WebInspector.TabbedPane} tabbedPane 882 * @param {!WebInspector.TabbedPane} tabbedPane
864 * @param {string} id 883 * @param {string} id
865 * @param {string} title 884 * @param {string} title
866 * @param {boolean} closeable 885 * @param {boolean} closeable
867 * @param {!WebInspector.Widget} view 886 * @param {!WebInspector.Widget} view
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 if (this._viewCallback && view) 1452 if (this._viewCallback && view)
1434 this._viewCallback(id, view); 1453 this._viewCallback(id, view);
1435 var shouldFocus = this._tabbedPane.visibleView.element.isSelfOrAnces tor(WebInspector.currentFocusElement()); 1454 var shouldFocus = this._tabbedPane.visibleView.element.isSelfOrAnces tor(WebInspector.currentFocusElement());
1436 this._tabbedPane.changeTabView(id, view); 1455 this._tabbedPane.changeTabView(id, view);
1437 if (shouldFocus) 1456 if (shouldFocus)
1438 view.focus(); 1457 view.focus();
1439 return view; 1458 return view;
1440 } 1459 }
1441 } 1460 }
1442 } 1461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698