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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 /** @private {remoting.ContextMenuAdapter} */ | 44 /** @private {remoting.ContextMenuAdapter} */ |
45 var menuAdapter = new remoting.ContextMenuChrome(); | 45 var menuAdapter = new remoting.ContextMenuChrome(); |
46 | 46 |
47 // Initialize the context menus. | 47 // Initialize the context menus. |
48 if (!remoting.platformIsChromeOS()) { | 48 if (!remoting.platformIsChromeOS()) { |
49 menuAdapter = | 49 menuAdapter = |
50 new remoting.ContextMenuDom(document.getElementById('context-menu')); | 50 new remoting.ContextMenuDom(document.getElementById('context-menu')); |
51 } | 51 } |
52 | 52 |
53 this.contextMenu_ = | 53 this.contextMenu_ = new remoting.ApplicationContextMenu( |
54 new remoting.ApplicationContextMenu(menuAdapter, this.plugin_); | 54 menuAdapter, this.plugin_, connectionInfo.session()); |
55 this.contextMenu_.setHostId(connectionInfo.host().hostId); | 55 this.contextMenu_.setHostId(connectionInfo.host().hostId); |
56 | 56 |
57 /** @private */ | 57 /** @private */ |
58 this.keyboardLayoutsMenu_ = new remoting.KeyboardLayoutsMenu(menuAdapter); | 58 this.keyboardLayoutsMenu_ = new remoting.KeyboardLayoutsMenu(menuAdapter); |
59 | 59 |
60 /** @private */ | 60 /** @private */ |
61 this.windowActivationMenu_ = new remoting.WindowActivationMenu(menuAdapter); | 61 this.windowActivationMenu_ = new remoting.WindowActivationMenu(menuAdapter); |
62 | 62 |
63 var baseView = new remoting.ConnectedView( | 63 var baseView = new remoting.ConnectedView( |
64 this.plugin_, containerElement, | 64 this.plugin_, containerElement, |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 }).catch(remoting.Error.handler(function(/** remoting.Error */ error) { | 245 }).catch(remoting.Error.handler(function(/** remoting.Error */ error) { |
246 console.log('Failed to refresh access token: ' + error.toString()); | 246 console.log('Failed to refresh access token: ' + error.toString()); |
247 })); | 247 })); |
248 }; | 248 }; |
249 | 249 |
250 // The access token last received from getNewToken. Saved to ensure that we | 250 // The access token last received from getNewToken. Saved to ensure that we |
251 // get a fresh token each time. | 251 // get a fresh token each time. |
252 var previousToken_ = ''; | 252 var previousToken_ = ''; |
253 | 253 |
254 })(); | 254 })(); |
OLD | NEW |