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

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

Issue 908463003: [Chromoting] Use platformIsMac instead of checking navigator.platform directly. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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';
(...skipping 25 matching lines...) Expand all
36 remoting.LoadingWindow.show = function() { 36 remoting.LoadingWindow.show = function() {
37 if (remoting.loadingWindow_) { 37 if (remoting.loadingWindow_) {
38 return; 38 return;
39 } 39 }
40 40
41 // TODO(garykac): Choose better default timeout. 41 // TODO(garykac): Choose better default timeout.
42 // Timeout is currently 15min to handle when we need to spin up a new VM. 42 // Timeout is currently 15min to handle when we need to spin up a new VM.
43 var kConnectionTimeout = 15 * 60 * 1000; 43 var kConnectionTimeout = 15 * 60 * 1000;
44 44
45 var transparencyWarning = ''; 45 var transparencyWarning = '';
46 if (navigator.platform.indexOf('Mac') != -1) { 46 if (remoting.platformIsMac()) {
47 transparencyWarning = 47 transparencyWarning =
48 chrome.i18n.getMessage(/*i18n-content*/'NO_TRANSPARENCY_WARNING'); 48 chrome.i18n.getMessage(/*i18n-content*/'NO_TRANSPARENCY_WARNING');
49 } 49 }
50 remoting.loadingWindow_ = remoting.MessageWindow.showTimedMessageWindow( 50 remoting.loadingWindow_ = remoting.MessageWindow.showTimedMessageWindow(
51 chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME_APP_STREAMING'), 51 chrome.i18n.getMessage(/*i18n-content*/'PRODUCT_NAME_APP_STREAMING'),
52 chrome.i18n.getMessage(/*i18n-content*/'FOOTER_CONNECTING'), 52 chrome.i18n.getMessage(/*i18n-content*/'FOOTER_CONNECTING'),
53 transparencyWarning, 53 transparencyWarning,
54 chrome.i18n.getMessage(/*i18n-content*/'CANCEL'), 54 chrome.i18n.getMessage(/*i18n-content*/'CANCEL'),
55 remoting.MessageWindow.quitApp, 55 remoting.MessageWindow.quitApp,
56 kConnectionTimeout, 56 kConnectionTimeout,
57 remoting.LoadingWindow.onTimeout_); 57 remoting.LoadingWindow.onTimeout_);
58 }; 58 };
59 59
60 /** 60 /**
61 * Close the loading window. 61 * Close the loading window.
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698