| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebMediaPlayer_h | 31 #ifndef WebMediaPlayer_h |
| 32 #define WebMediaPlayer_h | 32 #define WebMediaPlayer_h |
| 33 | 33 |
| 34 #include "WebCallbacks.h" |
| 34 #include "WebCanvas.h" | 35 #include "WebCanvas.h" |
| 35 #include "WebContentDecryptionModule.h" | 36 #include "WebContentDecryptionModule.h" |
| 36 #include "WebMediaSource.h" | 37 #include "WebMediaSource.h" |
| 38 #include "WebSetSinkIdError.h" |
| 37 #include "WebString.h" | 39 #include "WebString.h" |
| 38 #include "WebTimeRange.h" | 40 #include "WebTimeRange.h" |
| 39 #include "third_party/skia/include/core/SkXfermode.h" | 41 #include "third_party/skia/include/core/SkXfermode.h" |
| 40 | 42 |
| 41 namespace blink { | 43 namespace blink { |
| 42 | 44 |
| 43 class WebAudioSourceProvider; | 45 class WebAudioSourceProvider; |
| 44 class WebContentDecryptionModule; | 46 class WebContentDecryptionModule; |
| 45 class WebString; | 47 class WebString; |
| 46 class WebURL; | 48 class WebURL; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 103 |
| 102 virtual void load(LoadType, const WebURL&, CORSMode) = 0; | 104 virtual void load(LoadType, const WebURL&, CORSMode) = 0; |
| 103 | 105 |
| 104 // Playback controls. | 106 // Playback controls. |
| 105 virtual void play() = 0; | 107 virtual void play() = 0; |
| 106 virtual void pause() = 0; | 108 virtual void pause() = 0; |
| 107 virtual bool supportsSave() const = 0; | 109 virtual bool supportsSave() const = 0; |
| 108 virtual void seek(double seconds) = 0; | 110 virtual void seek(double seconds) = 0; |
| 109 virtual void setRate(double) = 0; | 111 virtual void setRate(double) = 0; |
| 110 virtual void setVolume(double) = 0; | 112 virtual void setVolume(double) = 0; |
| 113 |
| 111 virtual void requestRemotePlayback() { }; | 114 virtual void requestRemotePlayback() { }; |
| 112 virtual void requestRemotePlaybackControl() { }; | 115 virtual void requestRemotePlaybackControl() { }; |
| 113 virtual void setPreload(Preload) { }; | 116 virtual void setPreload(Preload) { }; |
| 114 virtual WebTimeRanges buffered() const = 0; | 117 virtual WebTimeRanges buffered() const = 0; |
| 115 virtual WebTimeRanges seekable() const = 0; | 118 virtual WebTimeRanges seekable() const = 0; |
| 116 | 119 |
| 120 // Attempts to switch the audio output device. |
| 121 // Implementations of setSinkId take ownership of the WebCallbacks |
| 122 // object, and the WebCallbacks object takes ownership of the returned |
| 123 // error value, if any. |
| 124 // Note also that setSinkId implementations must make sure that all |
| 125 // methods of the WebCallbacks object, including constructors and |
| 126 // destructors, run in the same thread where the object is created |
| 127 // (i.e., the blink thread). |
| 128 virtual void setSinkId(const WebString& deviceId, WebCallbacks<void, WebSetS
inkIdError>*) = 0; |
| 129 |
| 117 // True if the loaded media has a playable video/audio track. | 130 // True if the loaded media has a playable video/audio track. |
| 118 virtual bool hasVideo() const = 0; | 131 virtual bool hasVideo() const = 0; |
| 119 virtual bool hasAudio() const = 0; | 132 virtual bool hasAudio() const = 0; |
| 120 | 133 |
| 121 // True if the media is being played on a remote device. | 134 // True if the media is being played on a remote device. |
| 122 virtual bool isRemote() const { return false; } | 135 virtual bool isRemote() const { return false; } |
| 123 | 136 |
| 124 // Dimension of the video. | 137 // Dimension of the video. |
| 125 virtual WebSize naturalSize() const = 0; | 138 virtual WebSize naturalSize() const = 0; |
| 126 | 139 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 virtual void enterFullscreen() { } | 182 virtual void enterFullscreen() { } |
| 170 | 183 |
| 171 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } | 184 virtual void enabledAudioTracksChanged(const WebVector<TrackId>& enabledTrac
kIds) { } |
| 172 // |selectedTrackId| is null if no track is selected. | 185 // |selectedTrackId| is null if no track is selected. |
| 173 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } | 186 virtual void selectedVideoTrackChanged(TrackId* selectedTrackId) { } |
| 174 }; | 187 }; |
| 175 | 188 |
| 176 } // namespace blink | 189 } // namespace blink |
| 177 | 190 |
| 178 #endif | 191 #endif |
| OLD | NEW |