Chromium Code Reviews| 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 124 * @param {!WebInspector.UISourceCode} uiSourceCode | 124 * @param {!WebInspector.UISourceCode} uiSourceCode |
| 125 */ | 125 */ |
| 126 closeFile: function(uiSourceCode) | 126 closeFile: function(uiSourceCode) |
| 127 { | 127 { |
| 128 var tabId = this._tabIds.get(uiSourceCode); | 128 var tabId = this._tabIds.get(uiSourceCode); |
| 129 if (!tabId) | 129 if (!tabId) |
| 130 return; | 130 return; |
| 131 this._closeTabs([tabId]); | 131 this._closeTabs([tabId]); |
| 132 }, | 132 }, |
| 133 | 133 |
| 134 closeAllTabs: function(){ | |
|
dgozman
2016/06/20 18:32:36
closeAllFiles to be consistent with the rest.
dgozman
2016/06/20 18:32:36
style: { on next line
einbinder
2016/06/20 19:28:24
Done.
einbinder
2016/06/20 19:28:24
Done.
| |
| 135 this._tabbedPane.closeAllTabs(); | |
|
dgozman
2016/06/20 18:32:36
Should call this._closeTabs(...) instead.
einbinder
2016/06/20 19:28:24
Done.
| |
| 136 }, | |
| 137 | |
| 134 /** | 138 /** |
| 135 * @return {!Array.<!WebInspector.UISourceCode>} | 139 * @return {!Array.<!WebInspector.UISourceCode>} |
| 136 */ | 140 */ |
| 137 historyUISourceCodes: function() | 141 historyUISourceCodes: function() |
| 138 { | 142 { |
| 139 // FIXME: there should be a way to fetch UISourceCode for its uri. | 143 // FIXME: there should be a way to fetch UISourceCode for its uri. |
| 140 var uriToUISourceCode = {}; | 144 var uriToUISourceCode = {}; |
| 141 for (var id in this._files) { | 145 for (var id in this._files) { |
| 142 var uiSourceCode = this._files[id]; | 146 var uiSourceCode = this._files[id]; |
| 143 uriToUISourceCode[uiSourceCode.url()] = uiSourceCode; | 147 uriToUISourceCode[uiSourceCode.url()] = uiSourceCode; |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 735 /** | 739 /** |
| 736 * @override | 740 * @override |
| 737 * @param {string} tabId | 741 * @param {string} tabId |
| 738 * @param {!WebInspector.ContextMenu} contextMenu | 742 * @param {!WebInspector.ContextMenu} contextMenu |
| 739 */ | 743 */ |
| 740 onContextMenu: function(tabId, contextMenu) | 744 onContextMenu: function(tabId, contextMenu) |
| 741 { | 745 { |
| 742 this._editorContainer._onContextMenu(tabId, contextMenu); | 746 this._editorContainer._onContextMenu(tabId, contextMenu); |
| 743 } | 747 } |
| 744 } | 748 } |
| OLD | NEW |