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

Unified Diff: chrome/browser/resources/file_manager/playlist.html

Issue 7067020: Moving mediaplayer to the chrome filebrowser. Observable behaviour should not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Resolved conflicts. Created 9 years, 7 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
« no previous file with comments | « chrome/browser/resources/file_manager/mediaplayer.html ('k') | chrome/browser/resources/mediaplayer.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/file_manager/playlist.html
diff --git a/chrome/browser/resources/playlist.html b/chrome/browser/resources/file_manager/playlist.html
similarity index 87%
rename from chrome/browser/resources/playlist.html
rename to chrome/browser/resources/file_manager/playlist.html
index 598844c63e666eb08de94b6c0af9a393cf7711c2..5c7ff3118436844d067367231bdd84e4f9a98226 100644
--- a/chrome/browser/resources/playlist.html
+++ b/chrome/browser/resources/file_manager/playlist.html
@@ -52,7 +52,7 @@ body {
}
</style>
-<script src="shared/js/local_strings.js"></script>
+<script src="chrome://resources/js/local_strings.js"></script>
<script>
function $(o) {
@@ -82,7 +82,10 @@ function load() {
document.body.addEventListener('drop', function(e) {
if (e.preventDefault) e.preventDefault();
});
- chrome.send("getCurrentPlaylist", []);
+ chrome.mediaPlayerPrivate.getPlaylist(false, getPlaylistCallback);
+ chrome.mediaPlayerPrivate.onPlaylistChanged.addListener(function() {
+ chrome.mediaPlayerPrivate.getPlaylist(false, getPlaylistCallback);
+ });
};
function getDisplayNameFromPath(path) {
@@ -96,7 +99,7 @@ function getDisplayNameFromPath(path) {
};
function setPlaylistOffset(offset) {
- chrome.send("setCurrentPlaylistOffset", ['' + offset]);
+ chrome.mediaPlayerPrivate.playAt(offset);
};
function updateUI() {
@@ -139,9 +142,9 @@ function updateUI() {
}
};
-function playlistChanged(info, playlist) {
- currentPlaylist = playlist;
- currentOffset = info.currentOffset;
+function getPlaylistCallback(playlist) {
+ currentPlaylist = playlist.items;
+ currentOffset = playlist.position;
updateUI();
};
</script>
« no previous file with comments | « chrome/browser/resources/file_manager/mediaplayer.html ('k') | chrome/browser/resources/mediaplayer.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698