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'; |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 element.hidden = hidden; | 61 element.hidden = hidden; |
62 } | 62 } |
63 remoting.debug.log('App mode: ' + mode); | 63 remoting.debug.log('App mode: ' + mode); |
64 remoting.currentMode = mode; | 64 remoting.currentMode = mode; |
65 if (mode == remoting.AppMode.IN_SESSION) { | 65 if (mode == remoting.AppMode.IN_SESSION) { |
66 document.removeEventListener('keydown', remoting.DebugLog.onKeydown, false); | 66 document.removeEventListener('keydown', remoting.DebugLog.onKeydown, false); |
67 } else { | 67 } else { |
68 document.addEventListener('keydown', remoting.DebugLog.onKeydown, false); | 68 document.addEventListener('keydown', remoting.DebugLog.onKeydown, false); |
69 } | 69 } |
70 if (mode == remoting.AppMode.HOME) { | 70 if (mode == remoting.AppMode.HOME) { |
71 remoting.refreshHostList(); | 71 remoting.hostList.refresh(); |
72 } | 72 } |
73 }; | 73 }; |
74 | 74 |
75 /** | 75 /** |
76 * Get the major mode that the app is running in. | 76 * Get the major mode that the app is running in. |
77 * @return {string} The app's current major mode. | 77 * @return {string} The app's current major mode. |
78 */ | 78 */ |
79 remoting.getMajorMode = function() { | 79 remoting.getMajorMode = function() { |
80 return remoting.currentMode.split('.')[0]; | 80 return remoting.currentMode.split('.')[0]; |
81 }; | 81 }; |
OLD | NEW |