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