| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 /** | 5 /** |
| 6 * @fileoverview | 6 * @fileoverview |
| 7 * Loading dialog for AppRemoting apps. | 7 * Loading dialog for AppRemoting apps. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 'use strict'; | 10 'use strict'; |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 var kConnectionTimeout = 15 * 60 * 1000; | 43 var kConnectionTimeout = 15 * 60 * 1000; |
| 44 | 44 |
| 45 var options = /** @type {remoting.MessageWindowOptions} */ ({ | 45 var options = /** @type {remoting.MessageWindowOptions} */ ({ |
| 46 title: remoting.app.getApplicationName(), | 46 title: remoting.app.getApplicationName(), |
| 47 message: chrome.i18n.getMessage(/*i18n-content*/'FOOTER_CONNECTING'), | 47 message: chrome.i18n.getMessage(/*i18n-content*/'FOOTER_CONNECTING'), |
| 48 buttonLabel: chrome.i18n.getMessage(/*i18n-content*/'CANCEL'), | 48 buttonLabel: chrome.i18n.getMessage(/*i18n-content*/'CANCEL'), |
| 49 onResult: remoting.MessageWindow.quitApp, | 49 onResult: remoting.MessageWindow.quitApp, |
| 50 duration: kConnectionTimeout, | 50 duration: kConnectionTimeout, |
| 51 onTimeout: remoting.LoadingWindow.onTimeout_, | 51 onTimeout: remoting.LoadingWindow.onTimeout_, |
| 52 htmlFile: 'loading_window.html', | 52 htmlFile: 'loading_window.html', |
| 53 frame: 'none' | 53 frame: 'none', |
| 54 minimumWidth: 200 |
| 54 }); | 55 }); |
| 55 var transparencyWarning = ''; | 56 var transparencyWarning = ''; |
| 56 if (remoting.platformIsMac()) { | 57 if (remoting.platformIsMac()) { |
| 57 options.infoBox = | 58 options.infoBox = |
| 58 chrome.i18n.getMessage(/*i18n-content*/'NO_TRANSPARENCY_WARNING'); | 59 chrome.i18n.getMessage(/*i18n-content*/'NO_TRANSPARENCY_WARNING'); |
| 59 } | 60 } |
| 60 remoting.loadingWindow_ = new remoting.MessageWindow(options); | 61 remoting.loadingWindow_ = new remoting.MessageWindow(options); |
| 61 }; | 62 }; |
| 62 | 63 |
| 63 /** | 64 /** |
| 64 * Close the loading window. | 65 * Close the loading window. |
| 65 */ | 66 */ |
| 66 remoting.LoadingWindow.close = function() { | 67 remoting.LoadingWindow.close = function() { |
| 67 if (remoting.loadingWindow_) { | 68 if (remoting.loadingWindow_) { |
| 68 remoting.loadingWindow_.close(); | 69 remoting.loadingWindow_.close(); |
| 69 } | 70 } |
| 70 remoting.loadingWindow_ = null; | 71 remoting.loadingWindow_ = null; |
| 71 }; | 72 }; |
| 72 | 73 |
| 73 /** @type {remoting.MessageWindow} */ | 74 /** @type {remoting.MessageWindow} */ |
| 74 remoting.loadingWindow_ = null; | 75 remoting.loadingWindow_ = null; |
| OLD | NEW |