Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: remoting/webapp/app_remoting/js/loading_window.js

Issue 955283002: Converted remoting.Error from an enum to a class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Smaller diff. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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';
11 11
12 /** @suppress {duplicate} */ 12 /** @suppress {duplicate} */
13 var remoting = remoting || {}; 13 var remoting = remoting || {};
14 14
15 /** 15 /**
16 * Namespace for loading window functions. 16 * Namespace for loading window functions.
17 * @type {Object} 17 * @type {Object}
18 */ 18 */
19 remoting.LoadingWindow = function() {}; 19 remoting.LoadingWindow = function() {};
20 20
21 /** 21 /**
22 * When the loading window times out, replace it with a generic 22 * When the loading window times out, replace it with a generic
23 * "Service Unavailable" message. 23 * "Service Unavailable" message.
24 * @private 24 * @private
25 */ 25 */
26 remoting.LoadingWindow.onTimeout_ = function() { 26 remoting.LoadingWindow.onTimeout_ = function() {
27 remoting.MessageWindow.showErrorMessage( 27 remoting.MessageWindow.showErrorMessage(
28 remoting.app.getApplicationName(), 28 remoting.app.getApplicationName(),
29 chrome.i18n.getMessage(remoting.Error.SERVICE_UNAVAILABLE)); 29 chrome.i18n.getMessage(remoting.Error.Tag.SERVICE_UNAVAILABLE));
30 }; 30 };
31 31
32 /** 32 /**
33 * Show the loading dialog and start a timer When the timer expires, an error 33 * Show the loading dialog and start a timer When the timer expires, an error
34 * message will be displayed and the application will quit. 34 * message will be displayed and the application will quit.
35 */ 35 */
36 remoting.LoadingWindow.show = function() { 36 remoting.LoadingWindow.show = function() {
37 if (remoting.loadingWindow_) { 37 if (remoting.loadingWindow_) {
38 return; 38 return;
39 } 39 }
(...skipping 22 matching lines...) Expand all
62 */ 62 */
63 remoting.LoadingWindow.close = function() { 63 remoting.LoadingWindow.close = function() {
64 if (remoting.loadingWindow_) { 64 if (remoting.loadingWindow_) {
65 remoting.loadingWindow_.close(); 65 remoting.loadingWindow_.close();
66 } 66 }
67 remoting.loadingWindow_ = null; 67 remoting.loadingWindow_ = null;
68 }; 68 };
69 69
70 /** @type {remoting.MessageWindow} */ 70 /** @type {remoting.MessageWindow} */
71 remoting.loadingWindow_ = null; 71 remoting.loadingWindow_ = null;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698