diff options
14 files changed, 14 insertions, 647 deletions
diff --git a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc index aa1ef26..128e2bc 100644 --- a/chrome/browser/chromeos/file_manager/file_browser_handlers.cc +++ b/chrome/browser/chromeos/file_manager/file_browser_handlers.cc @@ -133,25 +133,6 @@ FileBrowserHandlerList FindFileBrowserHandlersForURL( return results; } -// Finds a file browser handler that matches |extension_id| and |action_id| -// from |handler_list|. Returns a mutable iterator to the handler if -// found. Returns handler_list->end() if not found. -FileBrowserHandlerList::iterator -FindFileBrowserHandlerForExtensionIdAndActionId( - FileBrowserHandlerList* handler_list, - const std::string& extension_id, - const std::string& action_id) { - DCHECK(handler_list); - - FileBrowserHandlerList::iterator iter = handler_list->begin(); - while (iter != handler_list->end() && - !((*iter)->extension_id() == extension_id && - (*iter)->id() == action_id)) { - ++iter; - } - return iter; -} - // This class is used to execute a file browser handler task. Here's how this // works: // @@ -544,25 +525,6 @@ FileBrowserHandlerList FindFileBrowserHandlers( } } - // "watch" and "gallery" are defined in the file manager's manifest.json. - FileBrowserHandlerList::iterator watch_iter = - FindFileBrowserHandlerForExtensionIdAndActionId( - &common_handlers, kFileManagerAppId, "watch"); - FileBrowserHandlerList::iterator gallery_iter = - FindFileBrowserHandlerForExtensionIdAndActionId( - &common_handlers, kFileManagerAppId, "gallery"); - if (watch_iter != common_handlers.end() && - gallery_iter != common_handlers.end()) { - // Both "watch" and "gallery" actions are applicable which means that the - // selection is all videos. Showing them both is confusing, so we only keep - // the one that makes more sense ("watch" for single selection, "gallery" - // for multiple selection). - if (file_list.size() == 1) - common_handlers.erase(gallery_iter); - else - common_handlers.erase(watch_iter); - } - return common_handlers; } diff --git a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc index 3006144..752c71d 100644 --- a/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc +++ b/chrome/browser/chromeos/file_manager/file_manager_browsertest.cc @@ -727,10 +727,7 @@ INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P( OpenSpecialTypes, FileManagerBrowserTest, - ::testing::Values(TestParameter(IN_GUEST_MODE, "videoOpenDownloads"), - TestParameter(NOT_IN_GUEST_MODE, "videoOpenDownloads"), - TestParameter(NOT_IN_GUEST_MODE, "videoOpenDrive"), - TestParameter(IN_GUEST_MODE, "audioOpenDownloads"), + ::testing::Values(TestParameter(IN_GUEST_MODE, "audioOpenDownloads"), TestParameter(NOT_IN_GUEST_MODE, "audioOpenDownloads"), TestParameter(NOT_IN_GUEST_MODE, "audioOpenDrive"), TestParameter(IN_GUEST_MODE, "galleryOpenDownloads"), diff --git a/chrome/browser/chromeos/file_manager/file_tasks.h b/chrome/browser/chromeos/file_manager/file_tasks.h index 7ee47eb..1a8251f 100644 --- a/chrome/browser/chromeos/file_manager/file_tasks.h +++ b/chrome/browser/chromeos/file_manager/file_tasks.h @@ -18,8 +18,8 @@ // https://developer.chrome.com/extensions/fileBrowserHandler.html // // 2) Built-in handlers provided from Files.app. Files.app provides lots of -// file_browser_handlers, such as "play", "watch", "mount-archive". These -// built-in handlers are often handled in special manners inside Files.app. +// file_browser_handlers, such as "play", "mount-archive". These built-in +// handlers are often handled in special manners inside Files.app. // This information also comes from FileBrowserHandler::GetHandlers(). // // See also: @@ -99,9 +99,9 @@ // chrome.fileBrowserPrivate.executeTasks() is used to open a file with a // handler (Chrome Extension/App or Drive App). // -// Some built-in handlers such as "play" and "watch" are handled internally -// in Files.app. "mount-archive" is handled very differently. The task -// execution business should be simplified: crbug.com/267313 +// Some built-in handlers such as "play" are handled internally in Files.app. +// "mount-archive" is handled very differently. The task execution business +// should be simplified: crbug.com/267313 // // See also: // chrome/browser/resources/file_manager/js/file_tasks.js diff --git a/chrome/browser/extensions/component_loader.cc b/chrome/browser/extensions/component_loader.cc index e361d680..4825482 100644 --- a/chrome/browser/extensions/component_loader.cc +++ b/chrome/browser/extensions/component_loader.cc @@ -440,8 +440,10 @@ void ComponentLoader::AddDefaultComponentExtensionsForKioskMode( return; // Component extensions needed for kiosk apps. - AddFileManagerExtension(); + // Note: Video player should be avove the file manager, since the video + // player is the default app for video files by default. AddVideoPlayerExtension(); + AddFileManagerExtension(); // Add virtual keyboard. AddKeyboardApp(); @@ -471,8 +473,11 @@ void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages( #endif if (!skip_session_components) { - AddFileManagerExtension(); + // Note: Video player should be avove the file manager, since the video + // player is the default app for video files by default. AddVideoPlayerExtension(); + AddFileManagerExtension(); + AddHangoutServicesExtension(); AddHotwordHelperExtension(); AddImageLoaderExtension(); diff --git a/chrome/browser/resources/component_extension_resources.grd b/chrome/browser/resources/component_extension_resources.grd index 6b6cb3a..a60cf3d 100644 --- a/chrome/browser/resources/component_extension_resources.grd +++ b/chrome/browser/resources/component_extension_resources.grd @@ -80,9 +80,6 @@ <include name="IDR_FILE_MANAGER_AUDIO_PLAYER" file="file_manager/audio_player.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" /> <include name="IDR_FILE_MANAGER_AUDIO_PLAYER_SCRIPTS_JS" file="file_manager/audio_player/js/audio_player_scripts.js" flattenhtml="true" type="BINDATA" /> - <include name="IDR_FILE_MANAGER_VIDEO_PLAYER" file="file_manager/video_player.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" /> - <include name="IDR_FILE_MANAGER_VIDEO_PLAYER_JS" file="file_manager/foreground/js/media/video_player_scripts.js" flattenhtml="true" type="BINDATA" /> - <include name="IDR_FILE_MANAGER_GALLERY" file="file_manager/gallery.html" allowexternalscript="true" flattenhtml="true" type="BINDATA" /> <include name="IDR_FILE_MANAGER_GALLERY_JS" file="file_manager/foreground/js/photo/gallery_scripts.js" flattenhtml="true" type="BINDATA" /> diff --git a/chrome/browser/resources/file_manager/background/js/background.js b/chrome/browser/resources/file_manager/background/js/background.js index 386aa235..604c254 100644 --- a/chrome/browser/resources/file_manager/background/js/background.js +++ b/chrome/browser/resources/file_manager/background/js/background.js @@ -690,10 +690,6 @@ Background.prototype.onExecute_ = function(action, details) { launchAudioPlayer({items: urls, position: 0}); break; - case 'watch': - launchVideoPlayer(urls[0]); - break; - default: var launchEnable = null; var queue = new AsyncUtil.Queue(); @@ -803,21 +799,6 @@ function launchAudioPlayer(playlist, opt_displayedId) { }); } -var videoPlayer = new SingletonAppWindowWrapper('video_player.html', - {hidden: true}); - -/** - * Launches the video player. - * @param {string} url Video url. - * @param {string=} opt_displayedId ProfileID of the desktop where the video - * player should show. - */ -function launchVideoPlayer(url, opt_displayedId) { - videoPlayer.launch({url: url}, false, function(appWindow) { - AppWindowWrapper.focusOnDesktop(videoPlayer.rawAppWindow, opt_displayedId); - }); -} - /** * Launches the app. * @private @@ -871,9 +852,6 @@ Background.prototype.onRestarted_ = function() { }); callback(); }); - - // Reopen video player. - videoPlayer.reopen(); }; /** diff --git a/chrome/browser/resources/file_manager/foreground/css/video_player.css b/chrome/browser/resources/file_manager/foreground/css/video_player.css deleted file mode 100644 index decb63d..0000000 --- a/chrome/browser/resources/file_manager/foreground/css/video_player.css +++ /dev/null @@ -1,103 +0,0 @@ -/* Copyright (c) 2012 The Chromium Authors. All rights reserved. - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. */ - -body { - -webkit-user-select: none; - background: black; - font-family: Noto Sans UI,Droid Sans Fallback,sans-serif; - font-size: 84%; - margin: 0; - overflow: hidden; -} - -#video-player { - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} - -#video-container { - height: 100%; - left: 0; - position: absolute; - top: 0; - width: 100%; -} - -video { - height: 100%; - left: 0; - pointer-events: none; - position: absolute; - top: 0; - width: 100%; -} - -#controls-wrapper { - -webkit-box-align: center; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - bottom: 0; - display: -webkit-box; - left: 0; - position: absolute; - right: 0; -} - -#controls { - -webkit-box-flex: 1; - display: -webkit-box; -} - -#video-player:not([tools]) .tool { - opacity: 0; -} - -#video-player:not([tools]) { - cursor: none; -} - -#video-player[disabled] .tool { - display: none; -} - -.tool { - transition: opacity 180ms linear; -} - -#error-wrapper { - -webkit-box-align: center; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - display: -webkit-box; - height: 100%; - left: 0; - pointer-events: none; - position: absolute; - top: 0; - width: 100%; -} - -#error { - -webkit-box-align: center; - -webkit-box-orient: horizontal; - -webkit-box-pack: center; - background-color: rgba(24, 24, 24, 1); - background-image: -webkit-image-set( - url('../images/media/error.png') 1x, - url('../images/media/2x/error.png') 2x); - background-position: 25px center; - background-repeat: no-repeat; - color: white; - display: -webkit-box; - height: 54px; - padding-left: 70px; - padding-right: 35px; -} - -#error:not([visible]) { - display: none; -} diff --git a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js index 38f3832..63e460e 100644 --- a/chrome/browser/resources/file_manager/foreground/js/file_tasks.js +++ b/chrome/browser/resources/file_manager/foreground/js/file_tasks.js @@ -188,7 +188,6 @@ FileTasks.isInternalTask_ = function(taskId) { return (appId === chrome.runtime.id && taskType === 'file' && (actionId === 'play' || - actionId === 'watch' || actionId === 'mount-archive' || actionId === 'gallery')); }; @@ -235,9 +234,6 @@ FileTasks.prototype.processTasks_ = function(tasks) { } else if (taskParts[2] === 'gallery') { task.iconType = 'image'; task.title = loadTimeData.getString('ACTION_OPEN'); - } else if (taskParts[2] === 'watch') { - task.iconType = 'video'; - task.title = loadTimeData.getString('ACTION_WATCH'); } else if (taskParts[2] === 'open-hosted-generic') { if (this.entries_.length > 1) task.iconType = 'generic'; @@ -551,17 +547,6 @@ FileTasks.prototype.executeInternalTask_ = function(id, entries) { return; } - if (id === 'watch') { - console.assert(entries.length === 1, 'Cannot open multiple videos'); - // TODO(mtomasz): Pass an entry instead. - chrome.fileBrowserPrivate.getProfiles(function(profiles, - currentId, - displayedId) { - fm.backgroundPage.launchVideoPlayer(entries[0].toURL(), displayedId); - }); - return; - } - if (id === 'mount-archive') { this.mountArchivesInternal_(entries); return; diff --git a/chrome/browser/resources/file_manager/foreground/js/media/video_player.js b/chrome/browser/resources/file_manager/foreground/js/media/video_player.js deleted file mode 100644 index a026bf7..0000000 --- a/chrome/browser/resources/file_manager/foreground/js/media/video_player.js +++ /dev/null @@ -1,289 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -'use strict'; - -/** - * Display error message. - * @param {string} message Message id. - */ -function showErrorMessage(message) { - var errorBanner = document.querySelector('#error'); - errorBanner.textContent = - loadTimeData.getString(message); - errorBanner.setAttribute('visible', 'true'); - - // The window is hidden if the video has not loaded yet. - chrome.app.window.current().show(); -} - -/** - * Handles playback (decoder) errors. - */ -function onPlaybackError() { - showErrorMessage('GALLERY_VIDEO_DECODING_ERROR'); - decodeErrorOccured = true; - - // Disable inactivity watcher, and disable the ui, by hiding tools manually. - controls.inactivityWatcher.disabled = true; - document.querySelector('#video-player').setAttribute('disabled', 'true'); - - // Detach the video element, since it may be unreliable and reset stored - // current playback time. - controls.cleanup(); - controls.clearState(); - - // Avoid reusing a video element. - video.parentNode.removeChild(video); - video = null; -} - -/** - * @param {Element} playerContainer Main container. - * @param {Element} videoContainer Container for the video element. - * @param {Element} controlsContainer Container for video controls. - * @constructor - */ -function FullWindowVideoControls( - playerContainer, videoContainer, controlsContainer) { - VideoControls.call(this, - controlsContainer, - onPlaybackError, - loadTimeData.getString.bind(loadTimeData), - this.toggleFullScreen_.bind(this), - videoContainer); - - this.playerContainer_ = playerContainer; - - this.updateStyle(); - window.addEventListener('resize', this.updateStyle.bind(this)); - - document.addEventListener('keydown', function(e) { - if (e.keyIdentifier == 'U+0020') { // Space - this.togglePlayStateWithFeedback(); - e.preventDefault(); - } - if (e.keyIdentifier == 'U+001B') { // Escape - util.toggleFullScreen( - chrome.app.window.current(), - false); // Leave the full screen mode. - e.preventDefault(); - } - }.bind(this)); - - // TODO(mtomasz): Simplify. crbug.com/254318. - videoContainer.addEventListener('click', function(e) { - if (e.ctrlKey) { - this.toggleLoopedModeWithFeedback(true); - if (!this.isPlaying()) - this.togglePlayStateWithFeedback(); - } else { - this.togglePlayStateWithFeedback(); - } - }.bind(this)); - - this.inactivityWatcher_ = new MouseInactivityWatcher(playerContainer); - this.__defineGetter__('inactivityWatcher', function() { - return this.inactivityWatcher_; - }); - - this.inactivityWatcher_.check(); -} - -FullWindowVideoControls.prototype = { __proto__: VideoControls.prototype }; - -/** - * Save the current state so that it survives page/app reload. - */ -FullWindowVideoControls.prototype.onPlayStateChanged = function() { - this.encodeState(); -}; - -/** - * Restore the state after the video is loaded. - */ -FullWindowVideoControls.prototype.restorePlayState = function() { - if (!this.decodeState()) { - VideoControls.prototype.restorePlayState.apply(this, arguments); - this.play(); - } -}; - -/** - * Toggles the full screen mode. - * @private - */ -FullWindowVideoControls.prototype.toggleFullScreen_ = function() { - var appWindow = chrome.app.window.current(); - util.toggleFullScreen(appWindow, !util.isFullScreen(appWindow)); -}; - -// TODO(mtomasz): Convert it to class members: crbug.com/171191. -var decodeErrorOccured; -var video; -var controls; -var metadataCache; -var volumeManager; -var selectedEntry; - -/** - * Initialize the video player window. - */ -function loadVideoPlayer() { - document.ondragstart = function(e) { e.preventDefault() }; - - chrome.fileBrowserPrivate.getStrings(function(strings) { - loadTimeData.data = strings; - - controls = new FullWindowVideoControls( - document.querySelector('#video-player'), - document.querySelector('#video-container'), - document.querySelector('#controls')); - - volumeManager = new VolumeManagerWrapper( - VolumeManagerWrapper.DriveEnabledStatus.DRIVE_ENABLED); - volumeManager.addEventListener('externally-unmounted', - onExternallyUnmounted); - metadataCache = MetadataCache.createFull(volumeManager); - - // If the video player is starting before the first instance of the File - // Manager then it does not have access to filesystem URLs. - // Request it now. - volumeManager.ensureInitialized(reload); - var reloadVideo = function(e) { - if (decodeErrorOccured && - // Ignore shortcut keys - !e.ctrlKey && !e.altKey && !e.shiftKey && !e.metaKey) { - reload(); - e.preventDefault(); - } - }; - - document.addEventListener('keydown', reloadVideo, true); - document.addEventListener('click', reloadVideo, true); - }); -} - -/** - * Closes video player when a volume containing the played item is unmounted. - * @param {Event} event The unmount event. - */ -function onExternallyUnmounted(event) { - if (!selectedEntry) - return; - - if (volumeManager.getVolumeInfo(selectedEntry) === event.volumeInfo) - window.close(); -} - -/** - * Unload the player. - */ -function unload() { - if (volumeManager) - volumeManager.dispose(); - - if (!controls.getMedia()) - return; - - controls.savePosition(true /* exiting */); - controls.cleanup(); -} - -/** - * Reload the player. - */ -function reload() { - // Re-enable ui and hide error message if already displayed. - document.querySelector('#video-player').removeAttribute('disabled'); - document.querySelector('#error').removeAttribute('visible'); - controls.inactivityWatcher.disabled = false; - decodeErrorOccured = false; - - var url; - if (window.appState) { - util.saveAppState(); - url = window.appState.url; - } else { - url = document.location.search.substr(1); - } - - document.title = decodeURIComponent(url.split('/').pop()); - var queue = new AsyncUtil.Queue(); - - queue.run(function(callback) { - webkitResolveLocalFileSystemURL(url, - function(entry) { - selectedEntry = entry; - callback(); - }, function() { - console.warn('Failed to resolve entry for: ' + url); - callback(); - }); - }); - - - queue.run(function(callback) { - if (!selectedEntry) { - showErrorMessage('GALLERY_VIDEO_ERROR'); - return; - } - metadataCache.get(selectedEntry, 'streaming', function(streaming) { - if (streaming && !navigator.onLine) { - showErrorMessage('GALLERY_VIDEO_OFFLINE'); - return; - } - - // Detach the previous video element, if exists. - if (video) - video.parentNode.removeChild(video); - - video = document.createElement('video'); - document.querySelector('#video-container').appendChild(video); - controls.attachMedia(video); - - video.src = selectedEntry.toURL(); - video.load(); - video.addEventListener('loadedmetadata', function() { - // TODO: chrome.app.window soon will be able to resize the content area. - // Until then use approximate title bar height. - var TITLE_HEIGHT = 33; - - var aspect = video.videoWidth / video.videoHeight; - var newWidth = video.videoWidth; - var newHeight = video.videoHeight + TITLE_HEIGHT; - - var shrinkX = newWidth / window.screen.availWidth; - var shrinkY = newHeight / window.screen.availHeight; - if (shrinkX > 1 || shrinkY > 1) { - if (shrinkY > shrinkX) { - newHeight = newHeight / shrinkY; - newWidth = (newHeight - TITLE_HEIGHT) * aspect; - } else { - newWidth = newWidth / shrinkX; - newHeight = newWidth / aspect + TITLE_HEIGHT; - } - } - - var oldLeft = window.screenX; - var oldTop = window.screenY; - var oldWidth = window.outerWidth; - var oldHeight = window.outerHeight; - - if (!oldWidth && !oldHeight) { - oldLeft = window.screen.availWidth / 2; - oldTop = window.screen.availHeight / 2; - } - - var appWindow = chrome.app.window.current(); - appWindow.resizeTo(newWidth, newHeight); - appWindow.moveTo(oldLeft - (newWidth - oldWidth) / 2, - oldTop - (newHeight - oldHeight) / 2); - appWindow.show(); - }); - }); - }); -} - -util.addPageLoadHandler(loadVideoPlayer); diff --git a/chrome/browser/resources/file_manager/foreground/js/media/video_player_scripts.js b/chrome/browser/resources/file_manager/foreground/js/media/video_player_scripts.js deleted file mode 100644 index 54ea178..0000000 --- a/chrome/browser/resources/file_manager/foreground/js/media/video_player_scripts.js +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// The include directives are put into Javascript-style comments to prevent -// parsing errors in non-flattened mode. The flattener still sees them. -// Note that this makes the flattener to comment out the first line of the -// included file but that's all right since any javascript file should start -// with a copyright comment anyway. - -//<include src="../../../../../../../ui/webui/resources/js/cr.js"/> -//<include src="../../../../../../../ui/webui/resources/js/cr/event_target.js"/> -//<include src="../../../../../../../ui/webui/resources/js/cr/ui/array_data_model.js"/> -//<include src="../../../../../../../ui/webui/resources/js/load_time_data.js"/> - -(function() { -// 'strict mode' is invoked for this scope. - -//<include src="../../../common/js/async_util.js"/> -//<include src="../../../common/js/util.js"/> -//<include src="../../../common/js/path_util.js"/> -//<include src="../file_type.js"/> -//<include src="../volume_manager_wrapper.js"> -//<include src="../metadata/metadata_cache.js"/> - -//<include src="media_controls.js"/> -//<include src="util.js"/> -//<include src="video_player.js"/> -//<include src="player_testapi.js"/> - -window.reload = reload; -window.unload = unload; - -})(); diff --git a/chrome/browser/resources/file_manager/manifest.json b/chrome/browser/resources/file_manager/manifest.json index 0ef6c24..2596b00 100644 --- a/chrome/browser/resources/file_manager/manifest.json +++ b/chrome/browser/resources/file_manager/manifest.json @@ -57,27 +57,6 @@ ] }, { - "id": "watch", - "default_title": "__MSG_PLAY_MEDIA__", - "default_icon": "common/images/file_types/200/video.png", - "file_filters": [ - "filesystem:*.3gp", - "filesystem:*.avi", - "filesystem:*.m4v", - "filesystem:*.mkv", - "filesystem:*.mov", - "filesystem:*.mp4", - "filesystem:*.mpeg", - "filesystem:*.mpeg4", - "filesystem:*.mpg", - "filesystem:*.mpg4", - "filesystem:*.ogm", - "filesystem:*.ogv", - "filesystem:*.ogx", - "filesystem:*.webm" - ] - }, - { "id": "mount-archive", "default_title": "__MSG_MOUNT_ARCHIVE__", "default_icon": "common/images/file_types/200/archive.png", diff --git a/chrome/browser/resources/file_manager/video_player.html b/chrome/browser/resources/file_manager/video_player.html deleted file mode 100644 index cb1ac0a..0000000 --- a/chrome/browser/resources/file_manager/video_player.html +++ /dev/null @@ -1,57 +0,0 @@ -<!-- - -- Copyright (c) 2012 The Chromium Authors. All rights reserved. - -- Use of this source code is governed by a BSD-style license that can be - -- found in the LICENSE file. - --> -<html> -<head> - <!-- We have to set some default title, or chrome will use the page name. - -- As soon as the i18n'd strings are loaded we replace it with the correct - -- string. Until then, use an invisible non-whitespace character. - --> - <title></title> - <link rel="icon" type="image/png" href="chrome://theme/IDR_FILE_MANAGER_IMG_FILETYPE_VIDEO"> - <link rel="stylesheet" type="text/css" href="foreground/css/media_controls.css"> - <link rel="stylesheet" type="text/css" href="foreground/css/video_player.css"> - - <!-- Don't load video_player_scripts.js when flattening is disabled --> - <if expr="False"><!-- </if> - <script src="foreground/js/media/video_player_scripts.js"></script> - <if expr="False"> --></if> - - <if expr="False"> - <!-- This section is used when the file manager is loaded with - 'filemgr-ext-path' command-line flag. --> - <!-- Keep the list in sync with video_player_scripts.js. --> - <script src="chrome://resources/js/cr.js"></script> - <script src="chrome://resources/js/cr/event_target.js"></script> - <script src="chrome://resources/js/cr/ui/array_data_model.js"></script> - <script src="chrome://resources/js/load_time_data.js"></script> - - <script src="common/js/async_util.js"></script> - <script src="common/js/util.js"></script> - <script src="common/js/path_util.js"></script> - - <script src="foreground/js/file_type.js"></script> - <script src="foreground/js/volume_manager_wrapper.js"></script> - <script src="foreground/js/metadata/metadata_cache.js"></script> - - <script src="foreground/js/media/media_controls.js"></script> - <script src="foreground/js/media/util.js"></script> - <script src="foreground/js/media/video_player.js"></script> - <script src="foreground/js/media/player_testapi.js"></script> - </if> -</head> -<body> - <div id="video-player" tools> - <div id="video-container"> - </div> - <div id="controls-wrapper"> - <div id="controls" class="tool"></div> - </div> - <div id="error-wrapper"> - <div id="error"></div> - </div> - </div> -</body> -</html> diff --git a/chrome/browser/resources/video_player/manifest.json b/chrome/browser/resources/video_player/manifest.json index ce76c9d..66bce14 100644 --- a/chrome/browser/resources/video_player/manifest.json +++ b/chrome/browser/resources/video_player/manifest.json @@ -41,8 +41,7 @@ "webm" ], // TODO(yoshiki): localize this. - // TODO(yoshiki): change the text after removing the emdebed player. - "title": "Watch in VideoPlayer.app" + "title": "Watch" } }, "app": { diff --git a/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js b/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js index 0da4d40..969569c 100644 --- a/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js +++ b/chrome/test/data/extensions/api_test/file_manager_browsertest/open_special_types.js @@ -98,50 +98,6 @@ function audioOpen(path) { } /** - * Tests if the video player shows up for the selected movie and that it is - * loaded successfully. - * - * @param {string} path Directory path to be tested. - */ -function videoOpen(path) { - var appId; - var videoAppId; - StepsRunner.run([ - function() { - setupAndWaitUntilReady(null, path, this.next); - }, - function(inAppId) { - appId = inAppId; - // Select the song. - callRemoteTestUtil( - 'openFile', appId, ['world.ogv'], this.next); - }, - function(result) { - chrome.test.assertTrue(result); - // Wait for the video player. - waitForWindow('video_player.html').then(this.next); - }, - function(inAppId) { - videoAppId = inAppId; - // Wait for the video tag and verify the source. - waitForElement(videoAppId, 'video[src]').then(this.next); - }, - function(element) { - chrome.test.assertEq( - 'filesystem:chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj/' + - 'external' + path + '/world.ogv', - element.attributes.src); - // Wait for the window's inner dimensions. Should be changed to the video - // size once the metadata is loaded. - waitForWindowGeometry(videoAppId, 320, 192).then(this.next); - }, - function(element) { - checkIfNoErrorsOccured(this.next); - } - ]); -} - -/** * Tests if we can open and unmount a zip file. * @param {string} path Directory path to be tested. */ @@ -216,10 +172,6 @@ testcase.audioOpenDownloads = function() { audioOpen(RootPath.DOWNLOADS); }; -testcase.videoOpenDownloads = function() { - videoOpen(RootPath.DOWNLOADS); -}; - testcase.galleryOpenDrive = function() { galleryOpen(RootPath.DRIVE); }; @@ -228,10 +180,6 @@ testcase.audioOpenDrive = function() { audioOpen(RootPath.DRIVE); }; -testcase.videoOpenDrive = function() { - videoOpen(RootPath.DRIVE); -}; - testcase.zipOpenDownloads = function() { zipOpen(RootPath.DOWNLOADS); }; |