| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 * Implements a basic UX control for a connected app remoting session. | 7 * Implements a basic UX control for a connected app remoting session. |
| 8 */ | 8 */ |
| 9 | 9 |
| 10 /** @suppress {duplicate} */ | 10 /** @suppress {duplicate} */ |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 * @implements {base.Disposable} | 34 * @implements {base.Disposable} |
| 35 * @implements {remoting.ProtocolExtension} | 35 * @implements {remoting.ProtocolExtension} |
| 36 */ | 36 */ |
| 37 remoting.AppConnectedView = function(containerElement, connectionInfo) { | 37 remoting.AppConnectedView = function(containerElement, connectionInfo) { |
| 38 /** @private */ | 38 /** @private */ |
| 39 this.plugin_ = connectionInfo.plugin(); | 39 this.plugin_ = connectionInfo.plugin(); |
| 40 | 40 |
| 41 /** @private */ | 41 /** @private */ |
| 42 this.host_ = connectionInfo.host(); | 42 this.host_ = connectionInfo.host(); |
| 43 | 43 |
| 44 /** @private {remoting.ContextMenuAdapter} */ | |
| 45 var menuAdapter = new remoting.ContextMenuChrome(); | 44 var menuAdapter = new remoting.ContextMenuChrome(); |
| 46 | 45 |
| 47 // Initialize the context menus. | 46 // Initialize the context menus. |
| 48 if (!remoting.platformIsChromeOS()) { | 47 if (!remoting.platformIsChromeOS()) { |
| 49 menuAdapter = | 48 menuAdapter = |
| 50 new remoting.ContextMenuDom(document.getElementById('context-menu')); | 49 new remoting.ContextMenuDom(document.getElementById('context-menu')); |
| 51 } | 50 } |
| 52 | 51 |
| 53 this.contextMenu_ = new remoting.ApplicationContextMenu( | 52 this.contextMenu_ = new remoting.ApplicationContextMenu( |
| 54 menuAdapter, this.plugin_, connectionInfo.session()); | 53 menuAdapter, this.plugin_, connectionInfo.session()); |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 }).catch(remoting.Error.handler(function(/** remoting.Error */ error) { | 244 }).catch(remoting.Error.handler(function(/** remoting.Error */ error) { |
| 246 console.log('Failed to refresh access token: ' + error.toString()); | 245 console.log('Failed to refresh access token: ' + error.toString()); |
| 247 })); | 246 })); |
| 248 }; | 247 }; |
| 249 | 248 |
| 250 // The access token last received from getNewToken. Saved to ensure that we | 249 // The access token last received from getNewToken. Saved to ensure that we |
| 251 // get a fresh token each time. | 250 // get a fresh token each time. |
| 252 var previousToken_ = ''; | 251 var previousToken_ = ''; |
| 253 | 252 |
| 254 })(); | 253 })(); |
| OLD | NEW |