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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 | 151 |
152 /** | 152 /** |
153 * @return {!Element} | 153 * @return {!Element} |
154 */ | 154 */ |
155 devtoolsElement: function() | 155 devtoolsElement: function() |
156 { | 156 { |
157 return this._devtoolsView.element; | 157 return this._devtoolsView.element; |
158 }, | 158 }, |
159 | 159 |
160 /** | 160 /** |
| 161 * @return {!Array.<string>} |
| 162 */ |
| 163 panelNames: function() |
| 164 { |
| 165 return Object.keys(this._panelDescriptors); |
| 166 }, |
| 167 |
| 168 /** |
161 * @param {!WebInspector.PanelDescriptor} panelDescriptor | 169 * @param {!WebInspector.PanelDescriptor} panelDescriptor |
162 */ | 170 */ |
163 addPanel: function(panelDescriptor) | 171 addPanel: function(panelDescriptor) |
164 { | 172 { |
165 var panelName = panelDescriptor.name(); | 173 var panelName = panelDescriptor.name(); |
166 this._panelDescriptors[panelName] = panelDescriptor; | 174 this._panelDescriptors[panelName] = panelDescriptor; |
167 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn
spector.View()); | 175 this._tabbedPane.appendTab(panelName, panelDescriptor.title(), new WebIn
spector.View()); |
168 if (this._lastActivePanelSetting.get() === panelName) | 176 if (this._lastActivePanelSetting.get() === panelName) |
169 this._tabbedPane.selectTab(panelName); | 177 this._tabbedPane.selectTab(panelName); |
170 }, | 178 }, |
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
618 bottom: Math.round(insets.bottom * zoomFactor), | 626 bottom: Math.round(insets.bottom * zoomFactor), |
619 right: Math.round(insets.right * zoomFactor)}; | 627 right: Math.round(insets.right * zoomFactor)}; |
620 | 628 |
621 InspectorFrontendHost.setContentsResizingStrategy(zoomedInsets, minSize)
; | 629 InspectorFrontendHost.setContentsResizingStrategy(zoomedInsets, minSize)
; |
622 }, | 630 }, |
623 | 631 |
624 __proto__: WebInspector.View.prototype | 632 __proto__: WebInspector.View.prototype |
625 } | 633 } |
626 | 634 |
627 /** | 635 /** |
| 636 * @constructor |
| 637 * @implements {WebInspector.ActionDelegate} |
| 638 */ |
| 639 WebInspector.InspectorView.DrawerToggleActionDelegate = function() |
| 640 { |
| 641 } |
| 642 |
| 643 WebInspector.InspectorView.DrawerToggleActionDelegate.prototype = { |
| 644 /** |
| 645 * @return {boolean} |
| 646 */ |
| 647 handleAction: function() |
| 648 { |
| 649 if (WebInspector.inspectorView.drawerVisible()) { |
| 650 WebInspector.inspectorView.closeDrawer(); |
| 651 return true; |
| 652 } |
| 653 if (!WebInspector.experimentsSettings.doNotOpenDrawerOnEsc.isEnabled())
{ |
| 654 WebInspector.inspectorView.showDrawer(); |
| 655 return true; |
| 656 } |
| 657 return false; |
| 658 } |
| 659 } |
| 660 |
| 661 /** |
| 662 * @constructor |
| 663 * @implements {WebInspector.ActionDelegate} |
| 664 */ |
| 665 WebInspector.InspectorView.ShowConsoleActionDelegate = function() |
| 666 { |
| 667 } |
| 668 |
| 669 WebInspector.InspectorView.ShowConsoleActionDelegate.prototype = { |
| 670 /** |
| 671 * @return {boolean} |
| 672 */ |
| 673 handleAction: function() |
| 674 { |
| 675 WebInspector.showConsole(); |
| 676 return true; |
| 677 } |
| 678 } |
| 679 |
| 680 /** |
628 * @type {!WebInspector.InspectorView} | 681 * @type {!WebInspector.InspectorView} |
629 */ | 682 */ |
630 WebInspector.inspectorView; | 683 WebInspector.inspectorView; |
OLD | NEW |