OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 * This class implements the functionality that is specific to application | 7 * This class implements the functionality that is specific to application |
8 * remoting ("AppRemoting" or AR). | 8 * remoting ("AppRemoting" or AR). |
9 */ | 9 */ |
10 | 10 |
11 'use strict'; | 11 'use strict'; |
12 | 12 |
13 /** @suppress {duplicate} */ | 13 /** @suppress {duplicate} */ |
14 var remoting = remoting || {}; | 14 var remoting = remoting || {}; |
15 | 15 |
16 /** | 16 /** |
17 * @param {remoting.Application} app The main app that owns this delegate. | 17 * @param {remoting.Application} app The main app that owns this delegate. |
18 * @constructor | 18 * @constructor |
19 * @implements {remoting.Application.Delegate} | 19 * @implements {remoting.Application.Delegate} |
20 */ | 20 */ |
21 remoting.AppRemoting = function(app) { | 21 remoting.AppRemoting = function(app) { |
22 app.setDelegate(this); | 22 app.setDelegate(this); |
23 | 23 |
24 /** | 24 /** @private {remoting.ApplicationContextMenu} */ |
25 * @type {remoting.ApplicationContextMenu} | |
26 * @private | |
27 */ | |
28 this.contextMenu_ = null; | 25 this.contextMenu_ = null; |
29 | 26 |
30 /** | 27 /** @private {remoting.KeyboardLayoutsMenu} */ |
31 * @type {remoting.KeyboardLayoutsMenu} | |
32 * @private | |
33 */ | |
34 this.keyboardLayoutsMenu_ = null; | 28 this.keyboardLayoutsMenu_ = null; |
35 | 29 |
36 /** | 30 /** @private {remoting.WindowActivationMenu} */ |
37 * @type {remoting.WindowActivationMenu} | |
38 * @private | |
39 */ | |
40 this.windowActivationMenu_ = null; | 31 this.windowActivationMenu_ = null; |
41 | 32 |
42 /** | 33 /** @private {number} */ |
43 * @type {number} | |
44 * @private | |
45 */ | |
46 this.pingTimerId_ = 0; | 34 this.pingTimerId_ = 0; |
47 }; | 35 }; |
48 | 36 |
49 /** | 37 /** |
50 * Type definition for the RunApplicationResponse returned by the API. | 38 * Type definition for the RunApplicationResponse returned by the API. |
51 * | 39 * |
52 * @constructor | 40 * @constructor |
53 * @private | 41 * @private |
54 */ | 42 */ |
55 remoting.AppRemoting.AppHostResponse = function() { | 43 remoting.AppRemoting.AppHostResponse = function() { |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 * @param {remoting.Error} errorTag The error to be localized and displayed. | 337 * @param {remoting.Error} errorTag The error to be localized and displayed. |
350 * @return {void} Nothing. | 338 * @return {void} Nothing. |
351 */ | 339 */ |
352 remoting.AppRemoting.prototype.handleError = function(errorTag) { | 340 remoting.AppRemoting.prototype.handleError = function(errorTag) { |
353 console.error('Connection failed: ' + errorTag); | 341 console.error('Connection failed: ' + errorTag); |
354 remoting.LoadingWindow.close(); | 342 remoting.LoadingWindow.close(); |
355 remoting.MessageWindow.showErrorMessage( | 343 remoting.MessageWindow.showErrorMessage( |
356 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), | 344 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), |
357 chrome.i18n.getMessage(/** @type {string} */ (errorTag))); | 345 chrome.i18n.getMessage(/** @type {string} */ (errorTag))); |
358 }; | 346 }; |
OLD | NEW |