| 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 * 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 * | 10 * |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 { | 50 { |
| 51 WebInspector.Object.call(this); | 51 WebInspector.Object.call(this); |
| 52 this._delegate = delegate; | 52 this._delegate = delegate; |
| 53 | 53 |
| 54 this._tabbedPane = new WebInspector.TabbedPane(); | 54 this._tabbedPane = new WebInspector.TabbedPane(); |
| 55 this._tabbedPane.setPlaceholderText(placeholderText); | 55 this._tabbedPane.setPlaceholderText(placeholderText); |
| 56 this._tabbedPane.setTabDelegate(new WebInspector.EditorContainerTabDelegate(
this)); | 56 this._tabbedPane.setTabDelegate(new WebInspector.EditorContainerTabDelegate(
this)); |
| 57 | 57 |
| 58 this._tabbedPane.setCloseableTabs(true); | 58 this._tabbedPane.setCloseableTabs(true); |
| 59 this._tabbedPane.setAllowTabReorder(true, true); | 59 this._tabbedPane.setAllowTabReorder(true, true); |
| 60 this._tabbedPane.insertBeforeTabStrip(createElementWithClass("div", "sources
-editor-tabstrip-left")); | |
| 61 this._tabbedPane.appendAfterTabStrip(createElementWithClass("div", "sources-
editor-tabstrip-right")); | |
| 62 | 60 |
| 63 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabClosed,
this._tabClosed, this); | 61 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabClosed,
this._tabClosed, this); |
| 64 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabSelected
, this._tabSelected, this); | 62 this._tabbedPane.addEventListener(WebInspector.TabbedPane.Events.TabSelected
, this._tabSelected, this); |
| 65 | 63 |
| 66 this._tabIds = new Map(); | 64 this._tabIds = new Map(); |
| 67 this._files = {}; | 65 this._files = {}; |
| 68 | 66 |
| 69 this._previouslyViewedFilesSetting = setting; | 67 this._previouslyViewedFilesSetting = setting; |
| 70 this._history = WebInspector.TabbedEditorContainer.History.fromObject(this._
previouslyViewedFilesSetting.get()); | 68 this._history = WebInspector.TabbedEditorContainer.History.fromObject(this._
previouslyViewedFilesSetting.get()); |
| 71 } | 69 } |
| (...skipping 27 matching lines...) Expand all Loading... |
| 99 | 97 |
| 100 /** | 98 /** |
| 101 * @return {!Array.<!WebInspector.Widget>} | 99 * @return {!Array.<!WebInspector.Widget>} |
| 102 */ | 100 */ |
| 103 fileViews: function() | 101 fileViews: function() |
| 104 { | 102 { |
| 105 return /** @type {!Array.<!WebInspector.Widget>} */ (this._tabbedPane.ta
bViews()); | 103 return /** @type {!Array.<!WebInspector.Widget>} */ (this._tabbedPane.ta
bViews()); |
| 106 }, | 104 }, |
| 107 | 105 |
| 108 /** | 106 /** |
| 107 * @return {!WebInspector.Toolbar} |
| 108 */ |
| 109 leftToolbar: function() |
| 110 { |
| 111 return this._tabbedPane.leftToolbar(); |
| 112 }, |
| 113 |
| 114 /** |
| 115 * @return {!WebInspector.Toolbar} |
| 116 */ |
| 117 rightToolbar: function() |
| 118 { |
| 119 return this._tabbedPane.rightToolbar(); |
| 120 }, |
| 121 |
| 122 /** |
| 109 * @param {!Element} parentElement | 123 * @param {!Element} parentElement |
| 110 */ | 124 */ |
| 111 show: function(parentElement) | 125 show: function(parentElement) |
| 112 { | 126 { |
| 113 this._tabbedPane.show(parentElement); | 127 this._tabbedPane.show(parentElement); |
| 114 }, | 128 }, |
| 115 | 129 |
| 116 /** | 130 /** |
| 117 * @param {!WebInspector.UISourceCode} uiSourceCode | 131 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 118 */ | 132 */ |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 748 /** | 762 /** |
| 749 * @override | 763 * @override |
| 750 * @param {string} tabId | 764 * @param {string} tabId |
| 751 * @param {!WebInspector.ContextMenu} contextMenu | 765 * @param {!WebInspector.ContextMenu} contextMenu |
| 752 */ | 766 */ |
| 753 onContextMenu: function(tabId, contextMenu) | 767 onContextMenu: function(tabId, contextMenu) |
| 754 { | 768 { |
| 755 this._editorContainer._onContextMenu(tabId, contextMenu); | 769 this._editorContainer._onContextMenu(tabId, contextMenu); |
| 756 } | 770 } |
| 757 } | 771 } |
| OLD | NEW |