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 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
85 * Initialize the application and register all event handlers. After this | 85 * Initialize the application and register all event handlers. After this |
86 * is called, the app is running and waiting for user events. | 86 * is called, the app is running and waiting for user events. |
87 * | 87 * |
88 * @param {remoting.SessionConnector} connector | 88 * @param {remoting.SessionConnector} connector |
89 * @return {void} Nothing. | 89 * @return {void} Nothing. |
90 */ | 90 */ |
91 remoting.AppRemoting.prototype.init = function(connector) { | 91 remoting.AppRemoting.prototype.init = function(connector) { |
92 remoting.initGlobalObjects(); | 92 remoting.initGlobalObjects(); |
93 remoting.initIdentity(remoting.onUserInfoAvailable); | 93 remoting.initIdentity(remoting.onUserInfoAvailable); |
94 | 94 |
95 remoting.initGlobalEventHandlers(); | 95 // TODO(jamiewalch): Remove ClientSession's dependency on remoting.fullscreen |
| 96 // so that this is no longer required. |
| 97 remoting.fullscreen = new remoting.FullscreenAppsV2(); |
96 | 98 |
97 var restoreHostWindows = function() { | 99 var restoreHostWindows = function() { |
98 if (remoting.clientSession) { | 100 if (remoting.clientSession) { |
99 remoting.clientSession.sendClientMessage('restoreAllWindows', ''); | 101 remoting.clientSession.sendClientMessage('restoreAllWindows', ''); |
100 } | 102 } |
101 }; | 103 }; |
102 chrome.app.window.current().onRestored.addListener(restoreHostWindows); | 104 chrome.app.window.current().onRestored.addListener(restoreHostWindows); |
103 | 105 |
104 remoting.windowShape.updateClientWindowShape(); | 106 remoting.windowShape.updateClientWindowShape(); |
105 | 107 |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 remoting.MessageWindow.showErrorMessage( | 347 remoting.MessageWindow.showErrorMessage( |
346 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), | 348 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), |
347 chrome.i18n.getMessage(/** @type {string} */ (errorTag))); | 349 chrome.i18n.getMessage(/** @type {string} */ (errorTag))); |
348 }; | 350 }; |
349 | 351 |
350 /** @return {string} */ | 352 /** @return {string} */ |
351 remoting.AppRemoting.prototype.runApplicationUrl = function() { | 353 remoting.AppRemoting.prototype.runApplicationUrl = function() { |
352 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + | 354 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + |
353 remoting.settings.getAppRemotingApplicationId() + '/run'; | 355 remoting.settings.getAppRemotingApplicationId() + '/run'; |
354 }; | 356 }; |
OLD | NEW |