| 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>
|
|
|