Chromium Code Reviews| 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 18 matching lines...) Expand all Loading... | |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef WebMediaPlayer_h | 31 #ifndef WebMediaPlayer_h |
| 32 #define WebMediaPlayer_h | 32 #define WebMediaPlayer_h |
| 33 | 33 |
| 34 #include "WebCanvas.h" | 34 #include "WebCanvas.h" |
| 35 #include "WebMediaSource.h" | 35 #include "WebMediaSource.h" |
| 36 #include "WebString.h" | 36 #include "WebString.h" |
| 37 #include "WebTimeRange.h" | 37 #include "WebTimeRange.h" |
| 38 | 38 |
| 39 #include <limits> | |
| 40 | |
| 39 namespace blink { | 41 namespace blink { |
| 40 | 42 |
| 41 class WebAudioSourceProvider; | 43 class WebAudioSourceProvider; |
| 42 class WebAudioSourceProviderClient; | 44 class WebAudioSourceProviderClient; |
| 43 class WebContentDecryptionModule; | 45 class WebContentDecryptionModule; |
| 44 class WebMediaPlayerClient; | 46 class WebMediaPlayerClient; |
| 45 class WebString; | 47 class WebString; |
| 46 class WebURL; | 48 class WebURL; |
| 47 struct WebRect; | 49 struct WebRect; |
| 48 struct WebSize; | 50 struct WebSize; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 116 virtual bool hasVideo() const = 0; | 118 virtual bool hasVideo() const = 0; |
| 117 virtual bool hasAudio() const = 0; | 119 virtual bool hasAudio() const = 0; |
| 118 | 120 |
| 119 // Dimension of the video. | 121 // Dimension of the video. |
| 120 virtual WebSize naturalSize() const = 0; | 122 virtual WebSize naturalSize() const = 0; |
| 121 | 123 |
| 122 // Getters of playback state. | 124 // Getters of playback state. |
| 123 virtual bool paused() const = 0; | 125 virtual bool paused() const = 0; |
| 124 virtual bool seeking() const = 0; | 126 virtual bool seeking() const = 0; |
| 125 virtual double duration() const = 0; | 127 virtual double duration() const = 0; |
| 128 | |
| 129 // Returns the 'timeline offset' as defined in the HTML5 spec | |
| 130 // (http://www.w3.org/html/wg/drafts/html/master/embedded-content.html#timel ine-offset). | |
| 131 // The function should return the number of milliseconds between the | |
| 132 // 'timeline offset' and January 1, 1970 UTC. Use base::Time::ToJsTime() for | |
|
philipj_slow
2014/05/06 11:13:52
s/for/to/
| |
| 133 // generate this value from Chromium code. If the content does not have a | |
| 134 // 'timeline offset' then std::numeric_limits<double>::quiet_NaN() should be returned. | |
| 135 virtual double timelineOffset() const { return std::numeric_limits<double>:: quiet_NaN(); } | |
| 136 | |
| 126 virtual double currentTime() const = 0; | 137 virtual double currentTime() const = 0; |
| 127 | 138 |
| 128 // Internal states of loading and network. | 139 // Internal states of loading and network. |
| 129 virtual NetworkState networkState() const = 0; | 140 virtual NetworkState networkState() const = 0; |
| 130 virtual ReadyState readyState() const = 0; | 141 virtual ReadyState readyState() const = 0; |
| 131 | 142 |
| 132 virtual bool didLoadingProgress() const = 0; | 143 virtual bool didLoadingProgress() const = 0; |
| 133 | 144 |
| 134 virtual bool hasSingleSecurityOrigin() const = 0; | 145 virtual bool hasSingleSecurityOrigin() const = 0; |
| 135 virtual bool didPassCORSAccessCheck() const = 0; | 146 virtual bool didPassCORSAccessCheck() const = 0; |
| (...skipping 24 matching lines...) Expand all Loading... | |
| 160 // Instruct WebMediaPlayer to enter/exit fullscreen. | 171 // Instruct WebMediaPlayer to enter/exit fullscreen. |
| 161 virtual void enterFullscreen() { } | 172 virtual void enterFullscreen() { } |
| 162 virtual void exitFullscreen() { } | 173 virtual void exitFullscreen() { } |
| 163 // Returns true if the player can enter fullscreen. | 174 // Returns true if the player can enter fullscreen. |
| 164 virtual bool canEnterFullscreen() const { return false; } | 175 virtual bool canEnterFullscreen() const { return false; } |
| 165 }; | 176 }; |
| 166 | 177 |
| 167 } // namespace blink | 178 } // namespace blink |
| 168 | 179 |
| 169 #endif | 180 #endif |
| OLD | NEW |