| 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  291    * @param {string} id |  291    * @param {string} id | 
|  292    * @param {string} nextTabId |  292    * @param {string} nextTabId | 
|  293    */ |  293    */ | 
|  294   _maybeCloseTab(id, nextTabId) { |  294   _maybeCloseTab(id, nextTabId) { | 
|  295     var uiSourceCode = this._files[id]; |  295     var uiSourceCode = this._files[id]; | 
|  296     var shouldPrompt = uiSourceCode.isDirty() && uiSourceCode.project().canSetFi
     leContent(); |  296     var shouldPrompt = uiSourceCode.isDirty() && uiSourceCode.project().canSetFi
     leContent(); | 
|  297     // FIXME: this should be replaced with common Save/Discard/Cancel dialog. |  297     // FIXME: this should be replaced with common Save/Discard/Cancel dialog. | 
|  298     if (!shouldPrompt || |  298     if (!shouldPrompt || | 
|  299         confirm(Common.UIString('Are you sure you want to close unsaved file: %s
     ?', uiSourceCode.name()))) { |  299         confirm(Common.UIString('Are you sure you want to close unsaved file: %s
     ?', uiSourceCode.name()))) { | 
|  300       uiSourceCode.resetWorkingCopy(); |  300       uiSourceCode.resetWorkingCopy(); | 
|  301       var previousView = this._currentView; |  | 
|  302       if (nextTabId) |  301       if (nextTabId) | 
|  303         this._tabbedPane.selectTab(nextTabId, true); |  302         this._tabbedPane.selectTab(nextTabId, true); | 
|  304       this._tabbedPane.closeTab(id, true); |  303       this._tabbedPane.closeTab(id, true); | 
|  305       return true; |  304       return true; | 
|  306     } |  305     } | 
|  307     return false; |  306     return false; | 
|  308   } |  307   } | 
|  309  |  308  | 
|  310   /** |  309   /** | 
|  311    * @param {!Array.<string>} ids |  310    * @param {!Array.<string>} ids | 
| (...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  803  |  802  | 
|  804   /** |  803   /** | 
|  805    * @override |  804    * @override | 
|  806    * @param {string} tabId |  805    * @param {string} tabId | 
|  807    * @param {!UI.ContextMenu} contextMenu |  806    * @param {!UI.ContextMenu} contextMenu | 
|  808    */ |  807    */ | 
|  809   onContextMenu(tabId, contextMenu) { |  808   onContextMenu(tabId, contextMenu) { | 
|  810     this._editorContainer._onContextMenu(tabId, contextMenu); |  809     this._editorContainer._onContextMenu(tabId, contextMenu); | 
|  811   } |  810   } | 
|  812 }; |  811 }; | 
| OLD | NEW |