| 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 29 matching lines...) Expand all Loading... |
| 40 this.setMinimumSize(240, 72); | 40 this.setMinimumSize(240, 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._drawerSplitWidget = new WebInspector.SplitWidget(false, true, "Inspect
or.drawerSplitViewState", 200, 200); | 43 this._drawerSplitWidget = new WebInspector.SplitWidget(false, true, "Inspect
or.drawerSplitViewState", 200, 200); |
| 44 this._drawerSplitWidget.hideSidebar(); | 44 this._drawerSplitWidget.hideSidebar(); |
| 45 this._drawerSplitWidget.hideDefaultResizer(); | 45 this._drawerSplitWidget.hideDefaultResizer(); |
| 46 this._drawerSplitWidget.enableShowModeSaving(); | 46 this._drawerSplitWidget.enableShowModeSaving(); |
| 47 this._drawerSplitWidget.show(this.element); | 47 this._drawerSplitWidget.show(this.element); |
| 48 | 48 |
| 49 // Create drawer tabbed pane. | 49 // Create drawer tabbed pane. |
| 50 this._drawerTabbedPane = new WebInspector.ExtensibleTabbedPane("drawer-view"
, true); | 50 this._drawerTabbedLocation = WebInspector.viewManager.createTabbedLocation("
drawer-view", true, true); |
| 51 this._drawerTabbedPane = this._drawerTabbedLocation.tabbedPane(); |
| 51 this._drawerTabbedPane.setMinimumSize(0, 27); | 52 this._drawerTabbedPane.setMinimumSize(0, 27); |
| 52 this._drawerTabbedPane.enableMoreTabsButton(); | |
| 53 var drawerToolbar = new WebInspector.Toolbar("drawer-close-toolbar"); | 53 var drawerToolbar = new WebInspector.Toolbar("drawer-close-toolbar"); |
| 54 var closeDrawerButton = new WebInspector.ToolbarButton(WebInspector.UIString
("Close drawer"), "delete-toolbar-item"); | 54 var closeDrawerButton = new WebInspector.ToolbarButton(WebInspector.UIString
("Close drawer"), "delete-toolbar-item"); |
| 55 closeDrawerButton.addEventListener("click", this.closeDrawer.bind(this)); | 55 closeDrawerButton.addEventListener("click", this.closeDrawer.bind(this)); |
| 56 drawerToolbar.appendToolbarItem(closeDrawerButton); | 56 drawerToolbar.appendToolbarItem(closeDrawerButton); |
| 57 this._drawerTabbedPane.tabbedPane().appendAfterTabStrip(drawerToolbar.elemen
t); | 57 this._drawerTabbedPane.appendAfterTabStrip(drawerToolbar.element); |
| 58 this._drawerSplitWidget.installResizer(this._drawerTabbedPane.tabbedPane().h
eaderElement()); | 58 this._drawerSplitWidget.installResizer(this._drawerTabbedPane.headerElement(
)); |
| 59 this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane); | 59 this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane); |
| 60 | 60 |
| 61 // Create main area tabbed pane. | 61 // Create main area tabbed pane. |
| 62 this._tabbedPane = new WebInspector.TabbedPane(); | 62 this._tabbedPane = new WebInspector.TabbedPane(); |
| 63 this._tabbedPane.registerRequiredCSS("ui/inspectorViewTabbedPane.css"); | 63 this._tabbedPane.registerRequiredCSS("ui/inspectorViewTabbedPane.css"); |
| 64 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane"); | 64 this._tabbedPane.element.classList.add("inspector-view-tabbed-pane"); |
| 65 this._tabbedPane.setTabSlider(true); | 65 this._tabbedPane.setTabSlider(true); |
| 66 this._tabbedPane.setAllowTabReorder(true, false); | 66 this._tabbedPane.setAllowTabReorder(true, false); |
| 67 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabOrde
rChanged, this._persistPanelOrder, this); | 67 this._tabbedPane.addEventListener(WebInspector.TabbedPane.EventTypes.TabOrde
rChanged, this._persistPanelOrder, this); |
| 68 this._tabOrderSetting = WebInspector.settings.createSetting("InspectorView.p
anelOrder", {}); | 68 this._tabOrderSetting = WebInspector.settings.createSetting("InspectorView.p
anelOrder", {}); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 { | 116 { |
| 117 this.element.ownerDocument.removeEventListener("keydown", this._keyDownB
ound, false); | 117 this.element.ownerDocument.removeEventListener("keydown", this._keyDownB
ound, false); |
| 118 this.element.ownerDocument.removeEventListener("keypress", this._keyPres
sBound, false); | 118 this.element.ownerDocument.removeEventListener("keypress", this._keyPres
sBound, false); |
| 119 }, | 119 }, |
| 120 | 120 |
| 121 /** | 121 /** |
| 122 * @override | 122 * @override |
| 123 * @param {string} locationName | 123 * @param {string} locationName |
| 124 * @return {?WebInspector.ViewLocation} | 124 * @return {?WebInspector.ViewLocation} |
| 125 */ | 125 */ |
| 126 resolveLocation: function(locationName) | 126 revealLocation: function(locationName) |
| 127 { | 127 { |
| 128 this.showDrawer(); | 128 this.showDrawer(); |
| 129 return this._drawerTabbedPane; | 129 return this._drawerTabbedLocation; |
| 130 }, | 130 }, |
| 131 | 131 |
| 132 _loadPanelDesciptors: function() | 132 _loadPanelDesciptors: function() |
| 133 { | 133 { |
| 134 /** | 134 /** |
| 135 * @param {!Runtime.Extension} extension | 135 * @param {!Runtime.Extension} extension |
| 136 * @this {!WebInspector.InspectorView} | 136 * @this {!WebInspector.InspectorView} |
| 137 */ | 137 */ |
| 138 function processPanelExtensions(extension) | 138 function processPanelExtensions(extension) |
| 139 { | 139 { |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 */ | 605 */ |
| 606 handleAction: function(context, actionId) | 606 handleAction: function(context, actionId) |
| 607 { | 607 { |
| 608 if (WebInspector.inspectorView.drawerVisible()) | 608 if (WebInspector.inspectorView.drawerVisible()) |
| 609 WebInspector.inspectorView.closeDrawer(); | 609 WebInspector.inspectorView.closeDrawer(); |
| 610 else | 610 else |
| 611 WebInspector.inspectorView.showDrawer(); | 611 WebInspector.inspectorView.showDrawer(); |
| 612 return true; | 612 return true; |
| 613 } | 613 } |
| 614 } | 614 } |
| OLD | NEW |