| 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._drawerTabbedLocation = WebInspector.viewManager.createTabbedLocation("
drawer-view", true, true); | 50 this._drawerTabbedLocation = WebInspector.viewManager.createTabbedLocation(t
his.showDrawer.bind(this), "drawer-view", true); |
| 51 this._drawerTabbedLocation.enableMoreTabsButton(); |
| 51 this._drawerTabbedPane = this._drawerTabbedLocation.tabbedPane(); | 52 this._drawerTabbedPane = this._drawerTabbedLocation.tabbedPane(); |
| 52 this._drawerTabbedPane.setMinimumSize(0, 27); | 53 this._drawerTabbedPane.setMinimumSize(0, 27); |
| 53 var drawerToolbar = new WebInspector.Toolbar("drawer-close-toolbar"); | 54 var drawerToolbar = new WebInspector.Toolbar("drawer-close-toolbar"); |
| 54 var closeDrawerButton = new WebInspector.ToolbarButton(WebInspector.UIString
("Close drawer"), "delete-toolbar-item"); | 55 var closeDrawerButton = new WebInspector.ToolbarButton(WebInspector.UIString
("Close drawer"), "delete-toolbar-item"); |
| 55 closeDrawerButton.addEventListener("click", this.closeDrawer.bind(this)); | 56 closeDrawerButton.addEventListener("click", this.closeDrawer.bind(this)); |
| 56 drawerToolbar.appendToolbarItem(closeDrawerButton); | 57 drawerToolbar.appendToolbarItem(closeDrawerButton); |
| 57 this._drawerTabbedPane.appendAfterTabStrip(drawerToolbar.element); | 58 this._drawerTabbedPane.appendAfterTabStrip(drawerToolbar.element); |
| 58 this._drawerSplitWidget.installResizer(this._drawerTabbedPane.headerElement(
)); | 59 this._drawerSplitWidget.installResizer(this._drawerTabbedPane.headerElement(
)); |
| 59 this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane); | 60 this._drawerSplitWidget.setSidebarWidget(this._drawerTabbedPane); |
| 60 | 61 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 { | 117 { |
| 117 this.element.ownerDocument.removeEventListener("keydown", this._keyDownB
ound, false); | 118 this.element.ownerDocument.removeEventListener("keydown", this._keyDownB
ound, false); |
| 118 this.element.ownerDocument.removeEventListener("keypress", this._keyPres
sBound, false); | 119 this.element.ownerDocument.removeEventListener("keypress", this._keyPres
sBound, false); |
| 119 }, | 120 }, |
| 120 | 121 |
| 121 /** | 122 /** |
| 122 * @override | 123 * @override |
| 123 * @param {string} locationName | 124 * @param {string} locationName |
| 124 * @return {?WebInspector.ViewLocation} | 125 * @return {?WebInspector.ViewLocation} |
| 125 */ | 126 */ |
| 126 revealLocation: function(locationName) | 127 resolveLocation: function(locationName) |
| 127 { | 128 { |
| 128 this.showDrawer(); | |
| 129 return this._drawerTabbedLocation; | 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) |
| (...skipping 466 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 |