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

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: Fixed style errors and localized strings. 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
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..5088e03d30d3bd1c5d35d27f943ae25b411773e0 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(getPlaylistCallback);
+ chrome.mediaPlayerPrivate.onPlaylistChanged.addListener(function() {
+ chrome.mediaPlayerPrivate.getPlaylist(getPlaylistCallback);
+ });
};
function getDisplayNameFromPath(path) {
@@ -96,7 +99,7 @@ function getDisplayNameFromPath(path) {
};
function setPlaylistOffset(offset) {
- chrome.send("setCurrentPlaylistOffset", ['' + offset]);
+ chrome.mediaPlayerPrivate.setPlaylistPosition(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>

Powered by Google App Engine
This is Rietveld 408576698