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

Side by Side Diff: remoting/webapp/build-webapp.py

Issue 1094133003: Added (incomplete) implementation of HostListApi using GCD. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gcd-client-fix
Patch Set: for submit Created 5 years, 8 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
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/host_controller.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Creates a directory with with the unpacked contents of the remoting webapp. 6 """Creates a directory with with the unpacked contents of the remoting webapp.
7 7
8 The directory will contain a copy-of or a link-to to all remoting webapp 8 The directory will contain a copy-of or a link-to to all remoting webapp
9 resources. This includes HTML/JS and any plugin binaries. The script also 9 resources. This includes HTML/JS and any plugin binaries. The script also
10 massages resulting files appropriately with host plugin data. Finally, 10 massages resulting files appropriately with host plugin data. Finally,
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 replaceString(destination, 'DIRECTORY_BOT_JID', 343 replaceString(destination, 'DIRECTORY_BOT_JID',
344 os.environ.get('DIRECTORY_BOT_JID', 344 os.environ.get('DIRECTORY_BOT_JID',
345 'remoting@bot.talk.google.com')) 345 'remoting@bot.talk.google.com'))
346 replaceString(destination, 'THIRD_PARTY_AUTH_REDIRECT_URL', 346 replaceString(destination, 'THIRD_PARTY_AUTH_REDIRECT_URL',
347 thirdPartyAuthUrlJs) 347 thirdPartyAuthUrlJs)
348 348
349 # Set the correct API keys. 349 # Set the correct API keys.
350 # For overriding the client ID/secret via env vars, see google_api_keys.py. 350 # For overriding the client ID/secret via env vars, see google_api_keys.py.
351 apiClientId = google_api_keys.GetClientID('REMOTING') 351 apiClientId = google_api_keys.GetClientID('REMOTING')
352 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') 352 apiClientSecret = google_api_keys.GetClientSecret('REMOTING')
353 apiKey = google_api_keys.GetAPIKeyRemoting()
353 354
354 if is_app_remoting_webapp and buildtype != 'Dev': 355 if is_app_remoting_webapp and buildtype != 'Dev':
355 if not app_client_id: 356 if not app_client_id:
356 raise Exception('Invalid app_client_id passed in: "' + 357 raise Exception('Invalid app_client_id passed in: "' +
357 app_client_id + '"') 358 app_client_id + '"')
358 apiClientIdV2 = app_client_id + '.apps.googleusercontent.com' 359 apiClientIdV2 = app_client_id + '.apps.googleusercontent.com'
359 else: 360 else:
360 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API') 361 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API')
361 362
362 replaceString(destination, 'API_CLIENT_ID', apiClientId) 363 replaceString(destination, 'API_CLIENT_ID', apiClientId)
363 replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret) 364 replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret)
365 replaceString(destination, 'API_KEY', apiKey)
364 366
365 # Write the application capabilities. 367 # Write the application capabilities.
366 appCapabilities = ','.join( 368 appCapabilities = ','.join(
367 ['remoting.ClientSession.Capability.' + x for x in app_capabilities]) 369 ['remoting.ClientSession.Capability.' + x for x in app_capabilities])
368 findAndReplace(os.path.join(destination, 'app_capabilities.js'), 370 findAndReplace(os.path.join(destination, 'app_capabilities.js'),
369 "'APPLICATION_CAPABILITIES'", appCapabilities) 371 "'APPLICATION_CAPABILITIES'", appCapabilities)
370 372
371 # Use a consistent extension id for dev builds. 373 # Use a consistent extension id for dev builds.
372 # AppRemoting builds always use the dev app id - the correct app id gets 374 # AppRemoting builds always use the dev app id - the correct app id gets
373 # written into the manifest later. 375 # written into the manifest later.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') 445 parser.add_argument('--use_gcd', choices=['0', '1'], default='0')
444 446
445 args = parser.parse_args() 447 args = parser.parse_args()
446 args.use_gcd = (args.use_gcd != '0') 448 args.use_gcd = (args.use_gcd != '0')
447 args.app_capabilities = set(args.app_capabilities) 449 args.app_capabilities = set(args.app_capabilities)
448 return buildWebApp(**vars(args)) 450 return buildWebApp(**vars(args))
449 451
450 452
451 if __name__ == '__main__': 453 if __name__ == '__main__':
452 sys.exit(main()) 454 sys.exit(main())
OLDNEW
« no previous file with comments | « remoting/remoting_webapp_files.gypi ('k') | remoting/webapp/crd/js/host_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698