| 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 'use strict'; | |
| 6 | |
| 7 /** | 5 /** |
| 8 * Discover the ID of installed cast extension. | 6 * Discover the ID of installed cast extension. |
| 9 * @constructor | 7 * @constructor |
| 10 */ | 8 */ |
| 11 function CastExtensionDiscoverer() { | 9 function CastExtensionDiscoverer() { |
| 12 } | 10 } |
| 13 | 11 |
| 14 /** | 12 /** |
| 15 * Tentatice IDs to try. | 13 * Tentatice IDs to try. |
| 16 * @type {Array.<string>} | 14 * @type {Array.<string>} |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 xhr.onerror = function() { callback(false); }; | 71 xhr.onerror = function() { callback(false); }; |
| 74 /** @param {*} event */ | 72 /** @param {*} event */ |
| 75 xhr.onreadystatechange = function(event) { | 73 xhr.onreadystatechange = function(event) { |
| 76 if (xhr.readyState == 4 && xhr.status === 200) { | 74 if (xhr.readyState == 4 && xhr.status === 200) { |
| 77 // Cast extension found. | 75 // Cast extension found. |
| 78 callback(true); | 76 callback(true); |
| 79 } | 77 } |
| 80 }.wrap(this); | 78 }.wrap(this); |
| 81 xhr.send(); | 79 xhr.send(); |
| 82 }; | 80 }; |
| OLD | NEW |