| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ | 6 #define CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 // Forces the mediaplayer window to be closed. | 34 // Forces the mediaplayer window to be closed. |
| 35 void CloseWindow(); | 35 void CloseWindow(); |
| 36 | 36 |
| 37 // Clears the current playlist. | 37 // Clears the current playlist. |
| 38 void ClearPlaylist(); | 38 void ClearPlaylist(); |
| 39 | 39 |
| 40 // Enqueues this fileschema url into the current playlist. | 40 // Enqueues this fileschema url into the current playlist. |
| 41 void EnqueueMediaFileUrl(const GURL& url); | 41 void EnqueueMediaFileUrl(const GURL& url); |
| 42 | 42 |
| 43 // Clears out the current playlist, and start playback of the given | |
| 44 // |file_path|. | |
| 45 void ForcePlayMediaFile(Profile* profile, const FilePath& file_path); | |
| 46 | |
| 47 // Clears out the current playlist, and start playback of the given url. | 43 // Clears out the current playlist, and start playback of the given url. |
| 48 void ForcePlayMediaURL(const GURL& url); | 44 void ForcePlayMediaURL(const GURL& url); |
| 49 | 45 |
| 50 // Popup the mediaplayer, this shows the browser, and sets up its | 46 // Popup the mediaplayer, this shows the browser, and sets up its |
| 51 // locations correctly. | 47 // locations correctly. |
| 52 void PopupMediaPlayer(Browser* creator); | 48 void PopupMediaPlayer(); |
| 53 | 49 |
| 54 // Sets the currently playing element to the given positions. | 50 // Sets the currently playing element to the given positions. |
| 55 void SetPlaylistPosition(int position); | 51 void SetPlaylistPosition(int position); |
| 56 | 52 |
| 57 // Returns current playlist. | 53 // Returns current playlist. |
| 58 const UrlVector& GetPlaylist() const; | 54 const UrlVector& GetPlaylist() const; |
| 59 | 55 |
| 60 // Returns current playlist position. | 56 // Returns current playlist position. |
| 61 int GetPlaylistPosition() const; | 57 int GetPlaylistPosition() const; |
| 62 | 58 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 77 | 73 |
| 78 // The current playlist of urls. | 74 // The current playlist of urls. |
| 79 UrlVector current_playlist_; | 75 UrlVector current_playlist_; |
| 80 // The position into the current_playlist_ of the currently playing item. | 76 // The position into the current_playlist_ of the currently playing item. |
| 81 int current_position_; | 77 int current_position_; |
| 82 | 78 |
| 83 bool pending_playback_request_; | 79 bool pending_playback_request_; |
| 84 | 80 |
| 85 MediaPlayer(); | 81 MediaPlayer(); |
| 86 | 82 |
| 87 GURL GetOriginUrl() const; | |
| 88 GURL GetMediaPlayerUrl() const; | 83 GURL GetMediaPlayerUrl() const; |
| 89 | 84 |
| 90 // Browser containing the Mediaplayer. Used to force closes. This is | 85 // Browser containing the Mediaplayer. Used to force closes. This is |
| 91 // created by the PopupMediaplayer call, and is NULLed out when the window | 86 // created by the PopupMediaplayer call, and is NULLed out when the window |
| 92 // is closed. | 87 // is closed. |
| 93 Browser* mediaplayer_browser_; | 88 Browser* mediaplayer_browser_; |
| 94 | 89 |
| 95 // Used to register for events on the windows, like to listen for closes. | 90 // Used to register for events on the windows, like to listen for closes. |
| 96 content::NotificationRegistrar registrar_; | 91 content::NotificationRegistrar registrar_; |
| 97 | 92 |
| 98 friend class MediaPlayerBrowserTest; | 93 friend class MediaPlayerBrowserTest; |
| 99 DISALLOW_COPY_AND_ASSIGN(MediaPlayer); | 94 DISALLOW_COPY_AND_ASSIGN(MediaPlayer); |
| 100 }; | 95 }; |
| 101 | 96 |
| 102 #endif // CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ | 97 #endif // CHROME_BROWSER_CHROMEOS_MEDIA_MEDIA_PLAYER_H_ |
| OLD | NEW |