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

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

Issue 2493373002: DevTools: rename WebInspector into modules. (Closed)
Patch Set: for bots Created 4 years, 1 month 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) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 10 *
(...skipping 11 matching lines...) Expand all
22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */ 27 */
28 28
29 /** 29 /**
30 * @unrestricted 30 * @unrestricted
31 */ 31 */
32 WebInspector.StackView = class extends WebInspector.VBox { 32 UI.StackView = class extends UI.VBox {
33 /** 33 /**
34 * @param {boolean} isVertical 34 * @param {boolean} isVertical
35 */ 35 */
36 constructor(isVertical) { 36 constructor(isVertical) {
37 super(); 37 super();
38 this._isVertical = isVertical; 38 this._isVertical = isVertical;
39 this._currentSplitWidget = null; 39 this._currentSplitWidget = null;
40 } 40 }
41 41
42 /** 42 /**
43 * @param {!WebInspector.Widget} view 43 * @param {!UI.Widget} view
44 * @param {string=} sidebarSizeSettingName 44 * @param {string=} sidebarSizeSettingName
45 * @param {number=} defaultSidebarWidth 45 * @param {number=} defaultSidebarWidth
46 * @param {number=} defaultSidebarHeight 46 * @param {number=} defaultSidebarHeight
47 * @return {?WebInspector.SplitWidget} 47 * @return {?UI.SplitWidget}
48 */ 48 */
49 appendView(view, sidebarSizeSettingName, defaultSidebarWidth, defaultSidebarHe ight) { 49 appendView(view, sidebarSizeSettingName, defaultSidebarWidth, defaultSidebarHe ight) {
50 var splitWidget = new WebInspector.SplitWidget( 50 var splitWidget = new UI.SplitWidget(
51 this._isVertical, true, sidebarSizeSettingName, defaultSidebarWidth, def aultSidebarHeight); 51 this._isVertical, true, sidebarSizeSettingName, defaultSidebarWidth, def aultSidebarHeight);
52 splitWidget.setMainWidget(view); 52 splitWidget.setMainWidget(view);
53 splitWidget.hideSidebar(); 53 splitWidget.hideSidebar();
54 54
55 if (!this._currentSplitWidget) { 55 if (!this._currentSplitWidget) {
56 splitWidget.show(this.element); 56 splitWidget.show(this.element);
57 } else { 57 } else {
58 this._currentSplitWidget.setSidebarWidget(splitWidget); 58 this._currentSplitWidget.setSidebarWidget(splitWidget);
59 this._currentSplitWidget.showBoth(); 59 this._currentSplitWidget.showBoth();
60 } 60 }
61 61
62 var lastSplitWidget = this._currentSplitWidget; 62 var lastSplitWidget = this._currentSplitWidget;
63 this._currentSplitWidget = splitWidget; 63 this._currentSplitWidget = splitWidget;
64 return lastSplitWidget; 64 return lastSplitWidget;
65 } 65 }
66 66
67 /** 67 /**
68 * @override 68 * @override
69 */ 69 */
70 detachChildWidgets() { 70 detachChildWidgets() {
71 super.detachChildWidgets(); 71 super.detachChildWidgets();
72 this._currentSplitWidget = null; 72 this._currentSplitWidget = null;
73 } 73 }
74 }; 74 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698