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

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

Issue 571453002: Correct indentation, JSDoc, etc... to comply with closure linter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 3 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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * Discover the ID of installed cast extension. 8 * Discover the ID of installed cast extension.
9 * @constructor 9 * @constructor
10 */ 10 */
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 * @param {function(boolean)} callback Callback to notify the result. 64 * @param {function(boolean)} callback Callback to notify the result.
65 * @private 65 * @private
66 */ 66 */
67 CastExtensionDiscoverer.isExtensionInstalled_ = 67 CastExtensionDiscoverer.isExtensionInstalled_ =
68 function(extensionId, callback) { 68 function(extensionId, callback) {
69 69
70 var xhr = new XMLHttpRequest(); 70 var xhr = new XMLHttpRequest();
71 var url = 'chrome-extension://' + extensionId + '/cast_sender.js'; 71 var url = 'chrome-extension://' + extensionId + '/cast_sender.js';
72 xhr.open('GET', url, true); 72 xhr.open('GET', url, true);
73 xhr.onerror = function() { callback(false); }; 73 xhr.onerror = function() { callback(false); };
74 xhr.onreadystatechange = 74 /** @param {*} event */
75 /** @param {*} response */ 75 xhr.onreadystatechange = function(event) {
76 function(event) { 76 if (xhr.readyState == 4 && xhr.status === 200) {
77 if (xhr.readyState == 4 && xhr.status === 200) { 77 // Cast extension found.
78 // Cast extension found. 78 callback(true);
79 callback(true); 79 }
80 } 80 }.wrap(this);
81 }.wrap(this);
82 xhr.send(); 81 xhr.send();
83 }; 82 };
OLDNEW
« no previous file with comments | « ui/file_manager/video_player/js/background.js ('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