Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Side by Side Diff: remoting/webapp/app_remoting/js/app_remoting.js

Issue 895523004: [Chromoting] Add ability to enable/disable GDrive support per-app in gyp. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Application.hasCapability Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 remoting.AppRemoting.prototype.getDefaultRemapKeys = function() { 207 remoting.AppRemoting.prototype.getDefaultRemapKeys = function() {
208 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard 208 // Map Cmd to Ctrl on Mac since hosts typically use Ctrl for keyboard
209 // shortcuts, but we want them to act as natively as possible. 209 // shortcuts, but we want them to act as natively as possible.
210 if (remoting.platformIsMac()) { 210 if (remoting.platformIsMac()) {
211 return '0x0700e3>0x0700e0,0x0700e7>0x0700e4'; 211 return '0x0700e3>0x0700e0,0x0700e7>0x0700e4';
212 } 212 }
213 return ''; 213 return '';
214 }; 214 };
215 215
216 /** 216 /**
217 * @return {Array.<string>} A list of |ClientSession.Capability|s required
218 * by this application.
219 */
220 remoting.AppRemoting.prototype.getRequiredCapabilities = function() {
221 return [
222 remoting.ClientSession.Capability.SEND_INITIAL_RESOLUTION,
223 remoting.ClientSession.Capability.RATE_LIMIT_RESIZE_REQUESTS,
224 remoting.ClientSession.Capability.VIDEO_RECORDER,
225 remoting.ClientSession.Capability.GOOGLE_DRIVE
226 ];
227 };
228
229 /**
230 * Called when a new session has been connected. 217 * Called when a new session has been connected.
231 * 218 *
232 * @param {remoting.ClientSession} clientSession 219 * @param {remoting.ClientSession} clientSession
233 * @return {void} Nothing. 220 * @return {void} Nothing.
234 */ 221 */
235 remoting.AppRemoting.prototype.handleConnected = function(clientSession) { 222 remoting.AppRemoting.prototype.handleConnected = function(clientSession) {
236 remoting.clientSession.sendClientMessage( 223 remoting.clientSession.sendClientMessage(
237 'setUserDisplayInfo', 224 'setUserDisplayInfo',
238 JSON.stringify({fullName: remoting.identity.getCachedUserFullName()})); 225 JSON.stringify({fullName: remoting.identity.getCachedUserFullName()}));
239 226
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 remoting.MessageWindow.showErrorMessage( 334 remoting.MessageWindow.showErrorMessage(
348 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'), 335 chrome.i18n.getMessage(/*i18n-content*/'CONNECTION_FAILED'),
349 chrome.i18n.getMessage(/** @type {string} */ (errorTag))); 336 chrome.i18n.getMessage(/** @type {string} */ (errorTag)));
350 }; 337 };
351 338
352 /** @return {string} */ 339 /** @return {string} */
353 remoting.AppRemoting.prototype.runApplicationUrl = function() { 340 remoting.AppRemoting.prototype.runApplicationUrl = function() {
354 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' + 341 return remoting.settings.APP_REMOTING_API_BASE_URL + '/applications/' +
355 remoting.settings.getAppRemotingApplicationId() + '/run'; 342 remoting.settings.getAppRemotingApplicationId() + '/run';
356 }; 343 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698