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

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: addressed the comment 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..4b5cd5cb7d78fbf45287187d137f6d6603a70f19 100644
--- a/ui/file_manager/video_player/js/cast/caster.js
+++ b/ui/file_manager/video_player/js/cast/caster.js
@@ -15,10 +15,12 @@ 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) {
+ if (foundId)
+ loadCastAPI(initializeApi);
+ else
+ console.info('No Google Cast extension is installed.');
+ });
});
/**

Powered by Google App Engine
This is Rietveld 408576698