| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 22 matching lines...) Expand all Loading... |
| 33 * @extends {WebInspector.VBox} | 33 * @extends {WebInspector.VBox} |
| 34 */ | 34 */ |
| 35 WebInspector.InspectorView = function() | 35 WebInspector.InspectorView = function() |
| 36 { | 36 { |
| 37 WebInspector.VBox.call(this); | 37 WebInspector.VBox.call(this); |
| 38 WebInspector.Dialog.setModalHostView(this); | 38 WebInspector.Dialog.setModalHostView(this); |
| 39 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); | 39 WebInspector.GlassPane.DefaultFocusedViewStack.push(this); |
| 40 this.setMinimumSize(210, 72); | 40 this.setMinimumSize(210, 72); |
| 41 | 41 |
| 42 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer. | 42 // DevTools sidebar is a vertical split of panels tabbed pane and a drawer. |
| 43 this._drawerSplitView = new WebInspector.SplitView(false, true, "Inspector.d
rawerSplitViewState", 200, 200); | 43 this._drawerSplitWidget = new WebInspector.SplitWidget(false, true, "Inspect
or.drawerSplitViewState", 200, 200); |
| 44 this._drawerSplitView.hideSidebar(); | 44 this._drawerSplitWidget.hideSidebar(); |
| 45 this._drawerSplitView.enableShowModeSaving(); | 45 this._drawerSplitWidget.enableShowModeSaving(); |
| 46 this._drawerSplitView.show(this.element); | 46 this._drawerSplitWidget.show(this.element); |
| 47 | 47 |
| 48 this._tabbedPane = new WebInspector.TabbedPane(); | 48 this._tabbedPane = new WebInspector.TabbedPane(); |
| 49 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane"); | 49 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane"); |
| 50 this._tabbedPane.setRetainTabOrder(true); | 50 this._tabbedPane.setRetainTabOrder(true); |
| 51 if (Runtime.experiments.isEnabled("materialDesign")) | 51 if (Runtime.experiments.isEnabled("materialDesign")) |
| 52 this._tabbedPane.setTabSlider(true); | 52 this._tabbedPane.setTabSlider(true); |
| 53 this._drawerSplitView.setMainView(this._tabbedPane); | 53 this._drawerSplitWidget.setMainWidget(this._tabbedPane); |
| 54 this._drawer = new WebInspector.Drawer(this._drawerSplitView); | 54 this._drawer = new WebInspector.Drawer(this._drawerSplitWidget); |
| 55 | 55 |
| 56 this._panels = {}; | 56 this._panels = {}; |
| 57 // Used by tests. | 57 // Used by tests. |
| 58 WebInspector["panels"] = this._panels; | 58 WebInspector["panels"] = this._panels; |
| 59 | 59 |
| 60 this._history = []; | 60 this._history = []; |
| 61 this._historyIterator = -1; | 61 this._historyIterator = -1; |
| 62 this._keyDownBound = this._keyDown.bind(this); | 62 this._keyDownBound = this._keyDown.bind(this); |
| 63 this._keyPressBound = this._keyPress.bind(this); | 63 this._keyPressBound = this._keyPress.bind(this); |
| 64 /** @type {!Object.<string, !WebInspector.PanelDescriptor>} */ | 64 /** @type {!Object.<string, !WebInspector.PanelDescriptor>} */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 closeButtonElement.addEventListener("click", InspectorFrontendHost.close
Window.bind(InspectorFrontendHost), true); | 131 closeButtonElement.addEventListener("click", InspectorFrontendHost.close
Window.bind(InspectorFrontendHost), true); |
| 132 }, | 132 }, |
| 133 | 133 |
| 134 /** | 134 /** |
| 135 * @param {!WebInspector.PanelDescriptor} panelDescriptor | 135 * @param {!WebInspector.PanelDescriptor} panelDescriptor |
| 136 */ | 136 */ |
| 137 addPanel: function(panelDescriptor) | 137 addPanel: function(panelDescriptor) |
| 138 { | 138 { |
| 139 var panelName = panelDescriptor.name(); | 139 var panelName = panelDescriptor.name(); |
| 140 this._panelDescriptors[panelName] = panelDescriptor; | 140 this._panelDescriptors[panelName] = panelDescriptor; |
| 141 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn
spector.View()); | 141 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn
spector.Widget()); |
| 142 if (this._lastActivePanelSetting.get() === panelName) | 142 if (this._lastActivePanelSetting.get() === panelName) |
| 143 this._tabbedPane.selectTab(panelName); | 143 this._tabbedPane.selectTab(panelName); |
| 144 }, | 144 }, |
| 145 | 145 |
| 146 /** | 146 /** |
| 147 * @param {string} panelName | 147 * @param {string} panelName |
| 148 * @return {boolean} | 148 * @return {boolean} |
| 149 */ | 149 */ |
| 150 hasPanel: function(panelName) | 150 hasPanel: function(panelName) |
| 151 { | 151 { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 * @param {string} id | 309 * @param {string} id |
| 310 */ | 310 */ |
| 311 closeViewInDrawer: function(id) | 311 closeViewInDrawer: function(id) |
| 312 { | 312 { |
| 313 this._drawer.closeView(id); | 313 this._drawer.closeView(id); |
| 314 }, | 314 }, |
| 315 | 315 |
| 316 /** | 316 /** |
| 317 * @param {string} id | 317 * @param {string} id |
| 318 * @param {string} title | 318 * @param {string} title |
| 319 * @param {!WebInspector.View} view | 319 * @param {!WebInspector.Widget} view |
| 320 */ | 320 */ |
| 321 showCloseableViewInDrawer: function(id, title, view) | 321 showCloseableViewInDrawer: function(id, title, view) |
| 322 { | 322 { |
| 323 this._drawer.showCloseableView(id, title, view); | 323 this._drawer.showCloseableView(id, title, view); |
| 324 }, | 324 }, |
| 325 | 325 |
| 326 showDrawer: function() | 326 showDrawer: function() |
| 327 { | 327 { |
| 328 this._drawer.showDrawer(); | 328 this._drawer.showDrawer(); |
| 329 }, | 329 }, |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = { | 540 WebInspector.InspectorView.ToggleDrawerButtonProvider.prototype = { |
| 541 /** | 541 /** |
| 542 * @override | 542 * @override |
| 543 * @return {?WebInspector.ToolbarItem} | 543 * @return {?WebInspector.ToolbarItem} |
| 544 */ | 544 */ |
| 545 item: function() | 545 item: function() |
| 546 { | 546 { |
| 547 return WebInspector.inspectorView._drawer.toggleButton(); | 547 return WebInspector.inspectorView._drawer.toggleButton(); |
| 548 } | 548 } |
| 549 } | 549 } |
| OLD | NEW |