OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 * Functions related to controlling the modal ui state of the app. | 7 * Functions related to controlling the modal ui state of the app. |
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 /** @enum {string} */ | 15 /** @enum {string} */ |
16 remoting.AppMode = { | 16 remoting.AppMode = { |
17 HOME: 'home', | 17 HOME: 'home', |
18 UNAUTHENTICATED: 'auth', | 18 UNAUTHENTICATED: 'auth', |
19 CLIENT: 'client', | 19 CLIENT: 'client', |
20 CLIENT_UNCONNECTED: 'client.unconnected', | 20 CLIENT_UNCONNECTED: 'client.unconnected', |
21 CLIENT_CONNECTING: 'client.connecting', | 21 CLIENT_CONNECTING: 'client.connecting', |
22 CLIENT_CONNECT_FAILED: 'client.connect-failed', | 22 CLIENT_CONNECT_FAILED_IT2ME: 'client.connect-failed.it2me', |
23 CLIENT_SESSION_FINISHED: 'client.session-finished', | 23 CLIENT_CONNECT_FAILED_ME2ME: 'client.connect-failed.me2me', |
| 24 CLIENT_SESSION_FINISHED_IT2ME: 'client.session-finished.it2me', |
| 25 CLIENT_SESSION_FINISHED_ME2ME: 'client.session-finished.me2me', |
24 HOST: 'host', | 26 HOST: 'host', |
25 HOST_WAITING_FOR_CODE: 'host.waiting-for-code', | 27 HOST_WAITING_FOR_CODE: 'host.waiting-for-code', |
26 HOST_WAITING_FOR_CONNECTION: 'host.waiting-for-connection', | 28 HOST_WAITING_FOR_CONNECTION: 'host.waiting-for-connection', |
27 HOST_SHARED: 'host.shared', | 29 HOST_SHARED: 'host.shared', |
28 HOST_SHARE_FAILED: 'host.share-failed', | 30 HOST_SHARE_FAILED: 'host.share-failed', |
29 HOST_SHARE_FINISHED: 'host.share-finished', | 31 HOST_SHARE_FINISHED: 'host.share-finished', |
30 IN_SESSION: 'in-session' | 32 IN_SESSION: 'in-session' |
31 }; | 33 }; |
32 | 34 |
33 /** | 35 /** |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 } | 74 } |
73 }; | 75 }; |
74 | 76 |
75 /** | 77 /** |
76 * Get the major mode that the app is running in. | 78 * Get the major mode that the app is running in. |
77 * @return {string} The app's current major mode. | 79 * @return {string} The app's current major mode. |
78 */ | 80 */ |
79 remoting.getMajorMode = function() { | 81 remoting.getMajorMode = function() { |
80 return remoting.currentMode.split('.')[0]; | 82 return remoting.currentMode.split('.')[0]; |
81 }; | 83 }; |
OLD | NEW |