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

Side by Side Diff: ui/file_manager/video_player/js/cast/cast_extension_discoverer.js

Issue 1987173002: Video Player: Support Media Router to cast Drive videos. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address review comments. Created 4 years, 7 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 * Discover the ID of installed cast extension. 6 * Discover the ID of installed cast extension.
7 * @constructor 7 * @constructor
8 * @struct 8 * @struct
9 */ 9 */
10 function CastExtensionDiscoverer() {} 10 function CastExtensionDiscoverer() {}
11 11
12 /** 12 /**
13 * Tentatice IDs to try. 13 * Tentatice IDs to try.
14 * @type {!Array<string>} 14 * @type {!Array<string>}
15 * @const 15 * @const
16 */ 16 */
17 CastExtensionDiscoverer.CAST_EXTENSION_IDS = [ 17 CastExtensionDiscoverer.CAST_EXTENSION_IDS = [
18 'pkedcjkdefgpdelpbcmbmeomcjbeemfm', // MR official
18 'boadgeojelhgndaghljhdicfkmllpafd', // release 19 'boadgeojelhgndaghljhdicfkmllpafd', // release
19 'dliochdbjfkdbacpmhlcpmleaejidimm', // beta 20 'dliochdbjfkdbacpmhlcpmleaejidimm', // beta
20 'hfaagokkkhdbgiakmmlclaapfelnkoah', 21 'enhhojjnijigcajfphajepfemndkmdlo', // dev
21 'fmfcbgogabcbclcofgocippekhfcmgfj', 22 'fmfcbgogabcbclcofgocippekhfcmgfj', // staging
22 'enhhojjnijigcajfphajepfemndkmdlo' 23 'fjhoaacokmgbjemoflkofnenfaiekifl' // stable used during MR development.
23 ]; 24 ];
24 25
25 /** 26 /**
26 * @param {function(?string)} callback Callback called with the extension ID. 27 * @param {function(?string)} callback Callback called with the extension ID.
27 * The ID may be null if extension is not found. 28 * The ID may be null if extension is not found.
28 */ 29 */
29 CastExtensionDiscoverer.findInstalledExtension = function(callback) { 30 CastExtensionDiscoverer.findInstalledExtension = function(callback) {
30 CastExtensionDiscoverer.findInstalledExtensionHelper_(0, callback); 31 CastExtensionDiscoverer.findInstalledExtensionHelper_(0, callback);
31 }; 32 };
32 33
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 xhr.onerror = function() { callback(false); }; 72 xhr.onerror = function() { callback(false); };
72 /** @param {*} event */ 73 /** @param {*} event */
73 xhr.onreadystatechange = function(event) { 74 xhr.onreadystatechange = function(event) {
74 if (xhr.readyState == 4 && xhr.status === 200) { 75 if (xhr.readyState == 4 && xhr.status === 200) {
75 // Cast extension found. 76 // Cast extension found.
76 callback(true); 77 callback(true);
77 } 78 }
78 }.wrap(this); 79 }.wrap(this);
79 xhr.send(); 80 xhr.send();
80 }; 81 };
OLDNEW
« no previous file with comments | « ui/file_manager/video_player/css/media_controls.css ('k') | ui/file_manager/video_player/js/cast/cast_video_element.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698