OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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. UI states | 7 * Functions related to controlling the modal UI state of the app. UI states |
8 * are expressed as HTML attributes with a dotted hierarchy. For example, the | 8 * are expressed as HTML attributes with a dotted hierarchy. For example, the |
9 * string 'host.shared' will match any elements with an associated attribute | 9 * string 'host.shared' will match any elements with an associated attribute |
10 * of 'host' or 'host.shared', showing those elements and hiding all others. | 10 * of 'host' or 'host.shared', showing those elements and hiding all others. |
11 * Elements with no associated attribute are ignored. | 11 * Elements with no associated attribute are ignored. |
12 */ | 12 */ |
13 | 13 |
14 'use strict'; | 14 'use strict'; |
15 | 15 |
16 /** @suppress {duplicate} */ | 16 /** @suppress {duplicate} */ |
17 var remoting = remoting || {}; | 17 var remoting = remoting || {}; |
18 | 18 |
19 /** @enum {string} */ | 19 /** @enum {string} */ |
20 // TODO(jamiewalch): Move 'in-session' to a separate web-page so that the | 20 // TODO(jamiewalch): Move 'in-session' to a separate web-page so that the |
21 // 'home' state applies to all elements and can be removed. | 21 // 'home' state applies to all elements and can be removed. |
22 remoting.AppMode = { | 22 remoting.AppMode = { |
23 HOME: 'home', | 23 HOME: 'home', |
24 UNAUTHENTICATED: 'home.auth', | |
25 TOKEN_REFRESH_FAILED: 'home.token-refresh-failed', | 24 TOKEN_REFRESH_FAILED: 'home.token-refresh-failed', |
26 HOST: 'home.host', | 25 HOST: 'home.host', |
27 HOST_WAITING_FOR_CODE: 'home.host.waiting-for-code', | 26 HOST_WAITING_FOR_CODE: 'home.host.waiting-for-code', |
28 HOST_WAITING_FOR_CONNECTION: 'home.host.waiting-for-connection', | 27 HOST_WAITING_FOR_CONNECTION: 'home.host.waiting-for-connection', |
29 HOST_SHARED: 'home.host.shared', | 28 HOST_SHARED: 'home.host.shared', |
30 HOST_SHARE_FAILED: 'home.host.share-failed', | 29 HOST_SHARE_FAILED: 'home.host.share-failed', |
31 HOST_SHARE_FINISHED: 'home.host.share-finished', | 30 HOST_SHARE_FINISHED: 'home.host.share-finished', |
32 CLIENT: 'home.client', | 31 CLIENT: 'home.client', |
33 CLIENT_UNCONNECTED: 'home.client.unconnected', | 32 CLIENT_UNCONNECTED: 'home.client.unconnected', |
34 CLIENT_PIN_PROMPT: 'home.client.pin-prompt', | 33 CLIENT_PIN_PROMPT: 'home.client.pin-prompt', |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 break; | 246 break; |
248 } | 247 } |
249 } | 248 } |
250 if (removeFromKeyboardNavigation) { | 249 if (removeFromKeyboardNavigation) { |
251 element.setAttribute(kSavedAttributeName, element.tabIndex); | 250 element.setAttribute(kSavedAttributeName, element.tabIndex); |
252 element.tabIndex = -1; | 251 element.tabIndex = -1; |
253 } | 252 } |
254 } | 253 } |
255 } | 254 } |
256 } | 255 } |
OLD | NEW |