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

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

Issue 450903002: Random clean up around Chrome OS file manager code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
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 // This hack prevents a bug on the cast extension. 7 // This hack prevents a bug on the cast extension.
8 // TODO(yoshiki): Remove this once the cast extension supports Chrome apps. 8 // TODO(yoshiki): Remove this once the cast extension supports Chrome apps.
9 // Although localStorage in Chrome app is not supported, but it's used in the 9 // Although localStorage in Chrome app is not supported, but it's used in the
10 // cast extension. This line prevents an exception on using localStorage. 10 // cast extension. This line prevents an exception on using localStorage.
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 console.error('Either "Google Cast API" or "Google Cast" extension ' + 65 console.error('Either "Google Cast API" or "Google Cast" extension ' +
66 'seems not to be installed?'); 66 'seems not to be installed?');
67 }.wrap(), 5000); 67 }.wrap(), 5000);
68 68
69 window['__onGCastApiAvailable'] = function(loaded, errorInfo) { 69 window['__onGCastApiAvailable'] = function(loaded, errorInfo) {
70 clearTimeout(checkTimer); 70 clearTimeout(checkTimer);
71 71
72 if (loaded) 72 if (loaded)
73 callback(); 73 callback();
74 else 74 else
75 console.error('Google Cast exntnsion load failed.', errorInfo); 75 console.error('Google Cast extension load failed.', errorInfo);
76 }.wrap(); 76 }.wrap();
77 } else { 77 } else {
78 setTimeout(callback); // Runs asynchronously. 78 setTimeout(callback); // Runs asynchronously.
79 } 79 }
80 }.wrap(); 80 }.wrap();
81 81
82 script.src = '_modules/mafeflapfdfljijmlienjedomfjfmhpd/cast_sender.js'; 82 script.src = '_modules/mafeflapfdfljijmlienjedomfjfmhpd/cast_sender.js';
83 script.addEventListener('error', onError); 83 script.addEventListener('error', onError);
84 script.addEventListener('load', onLoad); 84 script.addEventListener('load', onLoad);
85 document.body.appendChild(script); 85 document.body.appendChild(script);
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 } 123 }
124 124
125 player.setCastList(receivers); 125 player.setCastList(receivers);
126 } else if (availability == chrome.cast.ReceiverAvailability.UNAVAILABLE) { 126 } else if (availability == chrome.cast.ReceiverAvailability.UNAVAILABLE) {
127 player.setCastList([]); 127 player.setCastList([]);
128 } else { 128 } else {
129 console.error('Unexpected response in onReceiver.', arguments); 129 console.error('Unexpected response in onReceiver.', arguments);
130 player.setCastList([]); 130 player.setCastList([]);
131 } 131 }
132 } 132 }
OLDNEW
« no previous file with comments | « ui/file_manager/video_player/js/cast/cast_video_element.js ('k') | ui/file_manager/video_player/js/cast/media_manager.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698