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

Unified Diff: ui/file_manager/video_player/js/cast/caster.js

Issue 443083002: Video Player: Check Cast extension before launching cast feature (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 side-by-side diff with in-line comments
Download patch
Index: ui/file_manager/video_player/js/cast/caster.js
diff --git a/ui/file_manager/video_player/js/cast/caster.js b/ui/file_manager/video_player/js/cast/caster.js
index 9ccc5284241a4e6633467b9c3267ecc1ad3e27ed..6024c7c08d67e0485c1e55942d74afd875ba56b0 100644
--- a/ui/file_manager/video_player/js/cast/caster.js
+++ b/ui/file_manager/video_player/js/cast/caster.js
@@ -15,10 +15,13 @@ window.__defineGetter__('localStorage', function() { return {}; });
var APPLICATION_ID = '214CC863';
util.addPageLoadHandler(function() {
- // TODO(yoshiki): Check if the Google Cast extension is installed or not.
- // If not installed, we should skip all cast-related functionality.
-
- loadCastAPI(initializeApi);
+ CastExtensionDiscoverer.findInstalledExtension(function(foundId) {
+ console.log(foundId);
fukino 2014/08/07 00:35:04 nit: Remaining debug print? If not, more readable
yoshiki 2014/08/07 06:33:46 It should be removed.
+ if (foundId)
+ loadCastAPI(initializeApi);
+ else
+ console.info('No Google Cast extension is installed.');
+ });
});
/**

Powered by Google App Engine
This is Rietveld 408576698