OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 2 * Copyright (C) 2008 Apple Inc. All Rights Reserved. |
3 * Copyright (C) 2011 Google Inc. All rights reserved. | 3 * Copyright (C) 2011 Google Inc. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1135 if (position === "right") | 1135 if (position === "right") |
1136 vertically = false; | 1136 vertically = false; |
1137 else if (position === "bottom") | 1137 else if (position === "bottom") |
1138 vertically = true; | 1138 vertically = true; |
1139 else | 1139 else |
1140 vertically = WebInspector.inspectorView.element.offsetWidth < 680; | 1140 vertically = WebInspector.inspectorView.element.offsetWidth < 680; |
1141 | 1141 |
1142 if (this.sidebarPaneView && vertically === !this._splitWidget.isVertical
()) | 1142 if (this.sidebarPaneView && vertically === !this._splitWidget.isVertical
()) |
1143 return; | 1143 return; |
1144 | 1144 |
| 1145 if (this.sidebarPaneView && this.sidebarPaneView.shouldHideOnDetach()) |
| 1146 return; // We can't reparent extension iframes. |
| 1147 |
1145 if (this.sidebarPaneView) | 1148 if (this.sidebarPaneView) |
1146 this.sidebarPaneView.detach(); | 1149 this.sidebarPaneView.detach(); |
1147 | 1150 |
1148 this._splitWidget.setVertical(!vertically); | 1151 this._splitWidget.setVertical(!vertically); |
1149 this._splitWidget.element.classList.toggle("sources-split-view-vertical"
, vertically); | 1152 this._splitWidget.element.classList.toggle("sources-split-view-vertical"
, vertically); |
1150 | 1153 |
1151 if (!vertically) | 1154 if (!vertically) |
1152 this._splitWidget.uninstallResizer(this._sourcesView.toolbarContaine
rElement()); | 1155 this._splitWidget.uninstallResizer(this._sourcesView.toolbarContaine
rElement()); |
1153 else | 1156 else |
1154 this._splitWidget.installResizer(this._sourcesView.toolbarContainerE
lement()); | 1157 this._splitWidget.installResizer(this._sourcesView.toolbarContainerE
lement()); |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1223 { | 1226 { |
1224 var pane = /** @type {!WebInspector.ExtensionSidebarPane} */ (event.data
); | 1227 var pane = /** @type {!WebInspector.ExtensionSidebarPane} */ (event.data
); |
1225 this._addExtensionSidebarPane(pane); | 1228 this._addExtensionSidebarPane(pane); |
1226 }, | 1229 }, |
1227 | 1230 |
1228 /** | 1231 /** |
1229 * @param {!WebInspector.ExtensionSidebarPane} pane | 1232 * @param {!WebInspector.ExtensionSidebarPane} pane |
1230 */ | 1233 */ |
1231 _addExtensionSidebarPane: function(pane) | 1234 _addExtensionSidebarPane: function(pane) |
1232 { | 1235 { |
1233 if (pane.panelName() === this.name) { | 1236 if (pane.panelName() === this.name) |
1234 this.setHideOnDetach(); | |
1235 this._extensionSidebarPanesContainer.addPane(pane); | 1237 this._extensionSidebarPanesContainer.addPane(pane); |
1236 } | |
1237 }, | 1238 }, |
1238 | 1239 |
1239 /** | 1240 /** |
1240 * @return {!WebInspector.SourcesView} | 1241 * @return {!WebInspector.SourcesView} |
1241 */ | 1242 */ |
1242 sourcesView: function() | 1243 sourcesView: function() |
1243 { | 1244 { |
1244 return this._sourcesView; | 1245 return this._sourcesView; |
1245 }, | 1246 }, |
1246 | 1247 |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1463 WebInspector.SourcesPanelFactory.prototype = { | 1464 WebInspector.SourcesPanelFactory.prototype = { |
1464 /** | 1465 /** |
1465 * @override | 1466 * @override |
1466 * @return {!WebInspector.Panel} | 1467 * @return {!WebInspector.Panel} |
1467 */ | 1468 */ |
1468 createPanel: function() | 1469 createPanel: function() |
1469 { | 1470 { |
1470 return WebInspector.SourcesPanel.instance(); | 1471 return WebInspector.SourcesPanel.instance(); |
1471 } | 1472 } |
1472 } | 1473 } |
OLD | NEW |