| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011 Apple 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 | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 class FrameView; | 94 class FrameView; |
| 95 class GraphicsContext; | 95 class GraphicsContext; |
| 96 class IntRect; | 96 class IntRect; |
| 97 class IntSize; | 97 class IntSize; |
| 98 class MediaPlayer; | 98 class MediaPlayer; |
| 99 struct MediaPlayerFactory; | 99 struct MediaPlayerFactory; |
| 100 class TimeRanges; | 100 class TimeRanges; |
| 101 | 101 |
| 102 class MediaPlayerClient { | 102 class MediaPlayerClient { |
| 103 public: | 103 public: |
| 104 enum CORSMode { Unspecified, Anonymous, UseCredentials }; |
| 105 |
| 104 virtual ~MediaPlayerClient() { } | 106 virtual ~MediaPlayerClient() { } |
| 105 | 107 |
| 106 // Get the document which the media player is owned by | 108 // Get the document which the media player is owned by |
| 107 virtual Document* mediaPlayerOwningDocument() { return 0; } | 109 virtual Document* mediaPlayerOwningDocument() { return 0; } |
| 108 | 110 |
| 109 // the network state has changed | 111 // the network state has changed |
| 110 virtual void mediaPlayerNetworkStateChanged(MediaPlayer*) { } | 112 virtual void mediaPlayerNetworkStateChanged(MediaPlayer*) { } |
| 111 | 113 |
| 112 // the ready state has changed | 114 // the ready state has changed |
| 113 virtual void mediaPlayerReadyStateChanged(MediaPlayer*) { } | 115 virtual void mediaPlayerReadyStateChanged(MediaPlayer*) { } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 #if ENABLE(ENCRYPTED_MEDIA) | 173 #if ENABLE(ENCRYPTED_MEDIA) |
| 172 enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, Output
Error, HardwareChangeError, DomainError }; | 174 enum MediaKeyErrorCode { UnknownError = 1, ClientError, ServiceError, Output
Error, HardwareChangeError, DomainError }; |
| 173 virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& keySystem, cons
t String& sessionId) { } | 175 virtual void mediaPlayerKeyAdded(MediaPlayer*, const String& keySystem, cons
t String& sessionId) { } |
| 174 virtual void mediaPlayerKeyError(MediaPlayer*, const String& keySystem, cons
t String& sessionId, MediaKeyErrorCode errorCode, unsigned short systemCode) { } | 176 virtual void mediaPlayerKeyError(MediaPlayer*, const String& keySystem, cons
t String& sessionId, MediaKeyErrorCode errorCode, unsigned short systemCode) { } |
| 175 virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, co
nst String& sessionId, const unsigned char* message, unsigned messageLength) { } | 177 virtual void mediaPlayerKeyMessage(MediaPlayer*, const String& keySystem, co
nst String& sessionId, const unsigned char* message, unsigned messageLength) { } |
| 176 virtual void mediaPlayerKeyNeeded(MediaPlayer*, const String& keySystem, con
st String& sessionId, const unsigned char* initData, unsigned initDataLength) {
} | 178 virtual void mediaPlayerKeyNeeded(MediaPlayer*, const String& keySystem, con
st String& sessionId, const unsigned char* initData, unsigned initDataLength) {
} |
| 177 #endif | 179 #endif |
| 178 | 180 |
| 179 virtual String mediaPlayerReferrer() const { return String(); } | 181 virtual String mediaPlayerReferrer() const { return String(); } |
| 180 virtual String mediaPlayerUserAgent() const { return String(); } | 182 virtual String mediaPlayerUserAgent() const { return String(); } |
| 183 virtual CORSMode mediaPlayerCORSMode() const { return Unspecified; } |
| 181 }; | 184 }; |
| 182 | 185 |
| 183 class MediaPlayer { | 186 class MediaPlayer { |
| 184 WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED; | 187 WTF_MAKE_NONCOPYABLE(MediaPlayer); WTF_MAKE_FAST_ALLOCATED; |
| 185 public: | 188 public: |
| 186 | 189 |
| 187 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient* client) | 190 static PassOwnPtr<MediaPlayer> create(MediaPlayerClient* client) |
| 188 { | 191 { |
| 189 return adoptPtr(new MediaPlayer(client)); | 192 return adoptPtr(new MediaPlayer(client)); |
| 190 } | 193 } |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 333 | 336 |
| 334 #if USE(ACCELERATED_COMPOSITING) | 337 #if USE(ACCELERATED_COMPOSITING) |
| 335 // whether accelerated rendering is supported by the media engine for the cu
rrent media. | 338 // whether accelerated rendering is supported by the media engine for the cu
rrent media. |
| 336 bool supportsAcceleratedRendering() const; | 339 bool supportsAcceleratedRendering() const; |
| 337 // called when the rendering system flips the into or out of accelerated ren
dering mode. | 340 // called when the rendering system flips the into or out of accelerated ren
dering mode. |
| 338 void acceleratedRenderingStateChanged(); | 341 void acceleratedRenderingStateChanged(); |
| 339 #endif | 342 #endif |
| 340 | 343 |
| 341 bool hasSingleSecurityOrigin() const; | 344 bool hasSingleSecurityOrigin() const; |
| 342 | 345 |
| 346 bool didPassCORSAccessCheck() const; |
| 347 |
| 343 float mediaTimeForTimeValue(float) const; | 348 float mediaTimeForTimeValue(float) const; |
| 344 | 349 |
| 345 double maximumDurationToCacheMediaTime() const; | 350 double maximumDurationToCacheMediaTime() const; |
| 346 | 351 |
| 347 unsigned decodedFrameCount() const; | 352 unsigned decodedFrameCount() const; |
| 348 unsigned droppedFrameCount() const; | 353 unsigned droppedFrameCount() const; |
| 349 unsigned audioDecodedByteCount() const; | 354 unsigned audioDecodedByteCount() const; |
| 350 unsigned videoDecodedByteCount() const; | 355 unsigned videoDecodedByteCount() const; |
| 351 | 356 |
| 352 void setPrivateBrowsingMode(bool); | 357 void setPrivateBrowsingMode(bool); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 | 418 |
| 414 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType, | 419 typedef void (*MediaEngineRegistrar)(CreateMediaEnginePlayer, MediaEngineSupport
edTypes, MediaEngineSupportsType, |
| 415 MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClea
rMediaCacheForSite); | 420 MediaEngineGetSitesInMediaCache, MediaEngineClearMediaCache, MediaEngineClea
rMediaCacheForSite); |
| 416 | 421 |
| 417 | 422 |
| 418 } | 423 } |
| 419 | 424 |
| 420 #endif // ENABLE(VIDEO) | 425 #endif // ENABLE(VIDEO) |
| 421 | 426 |
| 422 #endif | 427 #endif |
| OLD | NEW |