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 'use strict'; | 5 'use strict'; |
6 | 6 |
7 /** @suppress {duplicate} */ | 7 /** @suppress {duplicate} */ |
8 var remoting = remoting || {}; | 8 var remoting = remoting || {}; |
9 | 9 |
10 /** | 10 /** |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 * Chromoting again. | 175 * Chromoting again. |
176 * | 176 * |
177 * @param {remoting.Error} error | 177 * @param {remoting.Error} error |
178 * @return {void} Nothing. | 178 * @return {void} Nothing. |
179 */ | 179 */ |
180 remoting.showErrorMessage = function(error) { | 180 remoting.showErrorMessage = function(error) { |
181 l10n.localizeElementFromTag( | 181 l10n.localizeElementFromTag( |
182 document.getElementById('token-refresh-error-message'), | 182 document.getElementById('token-refresh-error-message'), |
183 error); | 183 error); |
184 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED); | 184 var auth_failed = (error == remoting.Error.AUTHENTICATION_FAILED); |
185 if (base.isAppsV2()) { | 185 if (auth_failed && base.isAppsV2()) { |
kelvinp
2015/03/04 21:06:56
I think another problem is that at error.js
https
Jamie
2015/03/04 23:11:19
Kelvin and I discussed in person, and felt that si
| |
186 remoting.handleAuthFailureAndRelaunch(); | 186 remoting.handleAuthFailureAndRelaunch(); |
187 } else { | 187 } else { |
188 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed; | 188 document.getElementById('token-refresh-auth-failed').hidden = !auth_failed; |
189 document.getElementById('token-refresh-other-error').hidden = auth_failed; | 189 document.getElementById('token-refresh-other-error').hidden = auth_failed; |
190 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED); | 190 remoting.setMode(remoting.AppMode.TOKEN_REFRESH_FAILED); |
191 } | 191 } |
192 }; | 192 }; |
193 | 193 |
194 /** | 194 /** |
195 * Determine whether or not the app is running in a window. | 195 * Determine whether or not the app is running in a window. |
(...skipping 12 matching lines...) Expand all Loading... | |
208 } else { | 208 } else { |
209 chrome.windows.get(tab.windowId, null, windowCallback); | 209 chrome.windows.get(tab.windowId, null, windowCallback); |
210 } | 210 } |
211 }; | 211 }; |
212 if (chrome.tabs) { | 212 if (chrome.tabs) { |
213 chrome.tabs.getCurrent(tabCallback); | 213 chrome.tabs.getCurrent(tabCallback); |
214 } else { | 214 } else { |
215 console.error('chome.tabs is not available.'); | 215 console.error('chome.tabs is not available.'); |
216 } | 216 } |
217 } | 217 } |
OLD | NEW |