Changeset 142327 in webkit
- Timestamp:
- Feb 8, 2013 3:31:29 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 16 added
- 30 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142325 r142327 1 2013-02-08 Jer Noble <jer.noble@apple.com> 2 3 Bring WebKit up to speed with latest Encrypted Media spec. 4 https://bugs.webkit.org/show_bug.cgi?id=97037 5 6 Reviewed by Eric Carlson. 7 8 Added new tests for the updated Encrypted Media Extensions spec. 9 10 * media/encrypted-media/encrypted-media-v2-events-expected.txt: Added. 11 * media/encrypted-media/encrypted-media-v2-events.html: Added. 12 * media/encrypted-media/encrypted-media-v2-syntax-expected.txt: Added. 13 * media/encrypted-media/encrypted-media-v2-syntax.html: Added. 14 * platform/Chromium/TestExpectations: Skip the new media/encrypted-media/ v2 tests. 15 * platform/mac/media/encrypted-media/encrypted-media-can-play-type-expected.txt: Added. 16 1 17 2013-02-08 Stephen Chenney <schenney@chromium.org> 2 18 -
trunk/LayoutTests/platform/chromium/TestExpectations
r142322 r142327 4355 4355 webkit.org/b/109312 [ Win ] platform/chromium/virtual/gpu/fast/canvas/canvas-drawImage-shadow.html [ Pass Failure ] 4356 4356 4357 webkit.org/b/97037 media/encrypted-media/encrypted-media-v2-events.html [ Failure ] 4358 webkit.org/b/97037 media/encrypted-media/encrypted-media-v2-syntax.html [ Failure ] -
trunk/Source/JavaScriptCore/ChangeLog
r142319 r142327 1 2013-02-08 Jer Noble <jer.noble@apple.com> 2 3 Bring WebKit up to speed with latest Encrypted Media spec. 4 https://bugs.webkit.org/show_bug.cgi?id=97037 5 6 Reviewed by Eric Carlson. 7 8 Define the ENABLE_ENCRYPTED_MEDIA_V2 setting. 9 10 * Configurations/FeatureDefines.xcconfig: 11 1 12 2013-02-08 Gavin Barraclough <barraclough@apple.com> 2 13 -
trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
r141985 r142327 66 66 ENABLE_DOM4_EVENTS_CONSTRUCTOR = ENABLE_DOM4_EVENTS_CONSTRUCTOR; 67 67 ENABLE_DRAGGABLE_REGION = ; 68 ENABLE_ENCRYPTED_MEDIA = $(ENABLE_ENCRYPTED_MEDIA_$(PLATFORM_NAME));69 ENABLE_ENCRYPTED_MEDIA_ macosx = $(ENABLE_ENCRYPTED_MEDIA_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));70 ENABLE_ENCRYPTED_MEDIA_ macosx_1070 = ;71 ENABLE_ENCRYPTED_MEDIA_ macosx_1080 = ;72 ENABLE_ENCRYPTED_MEDIA_ macosx_1090 = ENABLE_ENCRYPTED_MEDIA;68 ENABLE_ENCRYPTED_MEDIA_V2 = $(ENABLE_ENCRYPTED_MEDIA_V2_$(REAL_PLATFORM_NAME)); 69 ENABLE_ENCRYPTED_MEDIA_V2_macosx = $(ENABLE_ENCRYPTED_MEDIA_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 70 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1070 = ; 71 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1080 = ; 72 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1090 = ENABLE_ENCRYPTED_MEDIA_V2; 73 73 ENABLE_FILE_SYSTEM = ; 74 74 ENABLE_FILTERS = ENABLE_FILTERS; … … 168 168 ENABLE_XSLT = ENABLE_XSLT; 169 169 170 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA ) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));170 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME)); -
trunk/Source/WTF/ChangeLog
r142305 r142327 1 2013-02-08 Jer Noble <jer.noble@apple.com> 2 3 Bring WebKit up to speed with latest Encrypted Media spec. 4 https://bugs.webkit.org/show_bug.cgi?id=97037 5 6 Reviewed by Eric Carlson. 7 8 Define the ENABLE_ENCRYPTED_MEDIA_V2 setting. 9 10 * wtf/Platform.h: 11 1 12 2013-02-08 Adam Barth <abarth@webkit.org> 2 13 -
trunk/Source/WTF/wtf/Platform.h
r142129 r142327 1169 1169 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 1170 1170 #define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT 1 1171 #define ENABLE_ENCRYPTED_MEDIA_V2 1 1171 1172 #endif 1172 1173 -
trunk/Source/WebCore/ChangeLog
r142320 r142327 1 2013-02-08 Jer Noble <jer.noble@apple.com> 2 3 Bring WebKit up to speed with latest Encrypted Media spec. 4 https://bugs.webkit.org/show_bug.cgi?id=97037 5 6 Reviewed by Eric Carlson. 7 8 The most recent version of the Encrypted Media Extensions spec breaks functionality out of the 9 HTMLMediaElement and into new MediaKeys and MediaKeySession classes. Since the CDM functionality 10 has been pulled out of the media element, we create a proxy CDM class and factory system for 11 creating specific CDM key system implementations. The spec also breaks out MediaKeyEvent 12 into distinct event classes, MediaKeyNeededEvent and MediaKeyMessageEvent, for needkey and 13 keymessage events, respectively. 14 15 Tests: media/encrypted-media/encrypted-media-v2-events.html 16 media/encrypted-media/encrypted-media-v2-syntax.html 17 18 CDM is a proxy class (a la MediaPlayer) for a specific CDMPrivateInterface implementation. A CDM 19 implementation is registered with the CDMFactory and will be created if that implementation supports 20 the key system passed into the MediaKeys constructor. CDMSession is a pure-virtual interface exposed 21 by concrete CDMPrivate subclasses. Its lifetime is owned by MediaKeySession. 22 * Modules/encryptedmedia/CDM.cpp: Added. 23 (WebCore::installedCDMFactories): Initialize all the known CDM subtypes. Ports will add CDM implementations here. 24 (WebCore::CDM::registerCDMFactory): Registers a new CDMFactory using the passed in function pointers. 25 (WebCore::CDMFactoryForKeySystem): Return the first CDM factory which supports the requested key system. 26 (WebCore::CDM::supportsKeySystem): Walk the installed CDMs and ask if the given key system is supported. 27 (WebCore::CDM::supportsKeySystemMIMETypeAndCodec): Ditto, with an additional MIME type and codec string. 28 (WebCore::CDM::create): Simple constructor wrapper. 29 (WebCore::CDM::CDM): Simple constructor; calls bestCDMForKeySystem() to create it's private implementation. 30 (WebCore::CDM::~CDM): Simple destructor. 31 (WebCore::CDM::createSession): Creates a new CDMSession. 32 * Modules/encryptedmedia/CDM.h: Added. 33 (WebCore::CDM::keySystem): Simple accessor for m_keySystem. 34 (WebCore::CDMSession::CDMSession): Simple constructor. 35 (WebCore::CDMSession::~CDMSession): Simple destructor. 36 * Modules/encryptedmedia/CDMPrivate.h: Added. 37 (WebCore::CDMPrivateInterface::CDMPrivateInterface): Simple constructor. 38 (WebCore::CDMPrivateInterface::~CDMPrivateInterface): Simple destructor. 39 40 The new classes, MediaKeyMessageEvent and MediaKeyNeededEvent, take distinct subsets of the initializers of 41 the original MediaKeyMessageEvent. 42 * Modules/encryptedmedia/MediaKeyMessageEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.cpp. 43 (WebCore::MediaKeyMessageEventInit::MediaKeyMessageEventInit): Initializer now only takes message and destinationURL 44 parameters. 45 (WebCore::MediaKeyMessageEvent::MediaKeyMessageEvent): Simple constructor. 46 (WebCore::MediaKeyMessageEvent::~MediaKeyMessageEvent): Simple destructor. 47 (WebCore::MediaKeyMessageEvent::interfaceName): Standard interfaceName. 48 * Modules/encryptedmedia/MediaKeyMessageEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h. 49 (WebCore::MediaKeyMessageEvent::create): Simple construction wrapper. 50 (WebCore::MediaKeyMessageEvent::message): Simple accessor for m_message. 51 (WebCore::MediaKeyMessageEvent::destinationURL): Simple accessor for m_destinationURL. 52 * Modules/encryptedmedia/MediaKeyMessageEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl. 53 * Modules/encryptedmedia/MediaKeyNeededEvent.cpp: Copied from Source/WebCore/html/MediaKeyEvent.h. 54 (WebCore::MediaKeyNeededEventInit::MediaKeyNeededEventInit): Initializer now only takes initData parameter. 55 (WebCore::MediaKeyNeededEvent::MediaKeyNeededEvent): Simple constructor. 56 (WebCore::MediaKeyNeededEvent::~MediaKeyNeededEvent): Simple destructor. 57 (WebCore::MediaKeyNeededEvent::interfaceName): Standard interfaceName. 58 * Modules/encryptedmedia/MediaKeyNeededEvent.h: Copied from Source/WebCore/html/MediaKeyEvent.h. 59 (WebCore::MediaKeyNeededEvent::create): Simple construction wrapper. 60 (WebCore::MediaKeyNeededEvent::initData): Simple accessor for m_initData. 61 * Modules/encryptedmedia/MediaKeyNeededEvent.idl: Copied from Source/WebCore/html/MediaKeyEvent.idl. 62 63 MediaKeySession is a new class that maps keys and key requests to a given session ID: 64 * Modules/encryptedmedia/MediaKeySession.cpp: Added. 65 (WebCore::MediaKeySession::create): Simple construction wrapper. 66 (WebCore::MediaKeySession::MediaKeySession): Simple constructor. 67 (WebCore::MediaKeySession::~MediaKeySession): Simple destructor; calls close(). 68 (WebCore::MediaKeySession::setError): Simple setter for m_error; 69 (WebCore::MediaKeySession::close): Tell the CDM to clear any saved session keys. 70 (WebCore::MediaKeySession::generateKeyRequest): Start a one-shot timer, handled in keyRequestTimerFired. 71 (WebCore::MediaKeySession::keyRequestTimerFired): Follow the steps in the spec; ask the CDM to generate a key request. 72 (WebCore::MediaKeySession::addKey): Start a one-shot timer, handled in addKeyTimerFired. 73 (WebCore::MediaKeySession::addKeyTimerFired): Follow the steps in the spec; provide the key data to the CDM. 74 * Modules/encryptedmedia/MediaKeySession.h: Added. 75 (WebCore::MediaKeySession::keySystem): Simple accessor for m_keySystem. 76 (WebCore::MediaKeySession::sessionId): Simple accessor for m_sessionId. 77 (WebCore::MediaKeySession::error): Simple accessor for m_error; 78 * Modules/encryptedmedia/MediaKeySession.idl: 79 80 MediaKeySession inherits from EventTarget, and must override the pure virtual functions in that class: 81 * Modules/encryptedmedia/MediaKeySession.cpp: Added. 82 (WebCore::MediaKeySession::interfaceName): 83 * Modules/encryptedmedia/MediaKeySession.h: Added. 84 (WebCore::MediaKeySession::refEventTarget): 85 (WebCore::MediaKeySession::derefEventTarget): 86 (WebCore::MediaKeySession::eventTargetData): 87 (WebCore::MediaKeySession::ensureEventTargetData): 88 (WebCore::MediaKeySession::scriptExecutionContext): 89 90 MediaKeys is a new class that encapsulates a CDM and a number of key sessions: 91 * Modules/encryptedmedia/MediaKeys.cpp: Added. 92 (WebCore::MediaKeys::create): Throw an exception if the key system parameter is unsupported; create a CDM object 93 and a new MediaKeys session. 94 (WebCore::MediaKeys::MediaKeys): Simple constructor. 95 (WebCore::MediaKeys::~MediaKeys): Simple destructor. 96 (WebCore::MediaKeys::createSession): Follow the spec and create a new key session. 97 * Modules/encryptedmedia/MediaKeys.h: Added. 98 * Modules/encryptedmedia/MediaKeys.idl: Copied from Source/WebCore/html/MediaError.idl. 99 100 Provide a new interface to HTMLMediaElement for MediaPlayer which does not require a sessionId or a key system: 101 * html/HTMLMediaElement.cpp: 102 (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): 103 * platform/graphics/MediaPlayer.cpp: 104 (WebCore::MediaPlayer::keyNeeded): 105 106 MediaKeyError now has a systemCode parameter and member variable. 107 * html/MediaKeyError.h: 108 (WebCore::MediaKeyError::create): Take a systemCode parameter with a default (0) value. 109 (WebCore::MediaKeyError::MediaKeyError): Ditto. 110 (WebCore::MediaKeyError::systemCode): Simple accessor for m_systemCode. 111 * html/MediaKeyError.idl: 112 113 Add new methods to HTMLMediaElement to support MediaKeys. Support different initializer 114 for the MediaKeyNeededEvent. 115 * html/HTMLMediaElement.cpp: 116 (WebCore::HTMLMediaElement::setMediaKeys): Simple setter for m_mediaKeys. 117 (WebCore::HTMLMediaElement::mediaPlayerKeyNeeded): This version takes fewer parameters 118 than the deprecated version. 119 * html/HTMLMediaElement.h: 120 (WebCore::HTMLMediaElement::mediaKeys): Simple accessor for m_mediaKeys. 121 * html/HTMLMediaElement.idl: Add the mediaKeys attribute. 122 123 Add an ENABLE(ENCRYPTED_MEDIA_V2) check to the existing ENABLE(ENCRYPTED_MEDIA) one: 124 * html/MediaError.h: 125 * html/MediaError.idl: 126 * platform/graphics/MediaPlayer.cpp: 127 (WebCore::bestMediaEngineForTypeAndCodecs): 128 (WebCore::MediaPlayer::supportsType): 129 * platform/graphics/MediaPlayer.h: 130 (WebCore::MediaPlayer::keyNeeded): This version takes fewer parameters than the 131 deprecated version. 132 133 Support the new version of canPlayType which takes an extra parameter: 134 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 135 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 136 (WebCore::MediaPlayerPrivateAVFoundationObjC::registerMediaEngine): 137 (WebCore::MediaPlayerPrivateAVFoundationObjC::extendedSupportsType): 138 * platform/graphics/mac/MediaPlayerPrivateQTKit.h: 139 * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: 140 (WebCore::MediaPlayerPrivateQTKit::registerMediaEngine): 141 (WebCore::MediaPlayerPrivateQTKit::extendedSupportsType): 142 143 Add a mock CDM for use within DRT and WKTR to test the MediaKeys and MediaKeySession 144 APIs and events: 145 * testing/Internals.cpp: 146 (WebCore::Internals::initializeMockCDM): Add the MockCDM class to the CDM factories. 147 * testing/Internals.h: 148 * testing/Internals.idl: Add the initializeMockCDM() method. 149 * testing/MockCDM.cpp: Added. 150 (WebCore::MockCDM::supportsKeySystem): Only supports the 'com.webcore.mock' key system. 151 (WebCore::MockCDM::supportsMIMEType): Only supports the 'video/mock' mime type. 152 (WebCore::initDataPrefix): Static method which returns a Uint8Array containing 'mock'. 153 (WebCore::keyPrefix): Static method which returns a Uint8Array containing 'key'. 154 (WebCore::keyRequest): Static method which returns a Uint8Array containing 'request'. 155 (WebCore::generateSessionId): Return a monotonically increasing number. 156 (WebCore::MockCDMSession::MockCDMSession): Simple constructor. 157 (WebCore::MockCDMSession::generateKeyRequest): Ignores the parameters and returns a keyRequest() array. 158 (WebCore::MockCDMSession::releaseKeys): No-op. 159 (WebCore::MockCDMSession::addKey): Checks that the key starts with the keyPrefix() array. 160 * testing/MockCDM.h: Added. 161 (WebCore::MockCDM::create): 162 (WebCore::MockCDM::~MockCDM): Simple destructor. 163 (WebCore::MockCDM::MockCDM): Simple constructor. 164 165 Add the new classes to the built system: 166 * Configurations/FeatureDefines.xcconfig: 167 * DerivedSources.make: 168 * WebCore.exp.in: 169 * WebCore.xcodeproj/project.pbxproj: 170 171 Miscelaneous changes: 172 * dom/EventNames.in: Add the two new event types, MediaKeyMessageEvent and MediaKeyNeededEvent. 173 * dom/EventTargetFactory.in: Add the new EventTarget, MediaKeySession. 174 * page/DOMWindow.idl: Add constructors for the new classes to the window object. 175 1 176 2013-02-08 Chris Fleizach <cfleizach@apple.com> 2 177 -
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
r141985 r142327 66 66 ENABLE_DOM4_EVENTS_CONSTRUCTOR = ENABLE_DOM4_EVENTS_CONSTRUCTOR; 67 67 ENABLE_DRAGGABLE_REGION = ; 68 ENABLE_ENCRYPTED_MEDIA = $(ENABLE_ENCRYPTED_MEDIA_$(PLATFORM_NAME));69 ENABLE_ENCRYPTED_MEDIA_ macosx = $(ENABLE_ENCRYPTED_MEDIA_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));70 ENABLE_ENCRYPTED_MEDIA_ macosx_1070 = ;71 ENABLE_ENCRYPTED_MEDIA_ macosx_1080 = ;72 ENABLE_ENCRYPTED_MEDIA_ macosx_1090 = ENABLE_ENCRYPTED_MEDIA;68 ENABLE_ENCRYPTED_MEDIA_V2 = $(ENABLE_ENCRYPTED_MEDIA_V2_$(REAL_PLATFORM_NAME)); 69 ENABLE_ENCRYPTED_MEDIA_V2_macosx = $(ENABLE_ENCRYPTED_MEDIA_V2_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR)); 70 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1070 = ; 71 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1080 = ; 72 ENABLE_ENCRYPTED_MEDIA_V2_macosx_1090 = ENABLE_ENCRYPTED_MEDIA_V2; 73 73 ENABLE_FILE_SYSTEM = ; 74 74 ENABLE_FILTERS = ENABLE_FILTERS; … … 168 168 ENABLE_XSLT = ENABLE_XSLT; 169 169 170 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA ) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME));170 FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_BLOB) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PLUGIN_PROXY_FOR_VIDEO) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT) $(FEATURE_DEFINES_$(PLATFORM_NAME)); -
trunk/Source/WebCore/DerivedSources.make
r142072 r142327 29 29 VPATH = \ 30 30 $(WebCore) \ 31 $(WebCore)/Modules/encryptedmedia \ 31 32 $(WebCore)/Modules/filesystem \ 32 33 $(WebCore)/Modules/geolocation \ … … 63 64 64 65 BINDING_IDLS = \ 66 $(WebCore)/Modules/encryptedmedia/MediaKeyMessageEvent.idl \ 67 $(WebCore)/Modules/encryptedmedia/MediaKeyNeededEvent.idl \ 68 $(WebCore)/Modules/encryptedmedia/MediaKeySession.idl \ 69 $(WebCore)/Modules/encryptedmedia/MediaKeys.idl \ 65 70 $(WebCore)/Modules/filesystem/DOMFileSystem.idl \ 66 71 $(WebCore)/Modules/filesystem/DOMFileSystemSync.idl \ … … 367 372 $(WebCore)/html/MediaController.idl \ 368 373 $(WebCore)/html/MediaError.idl \ 369 370 374 $(WebCore)/html/MediaKeyError.idl \ 375 $(WebCore)/html/MediaKeyEvent.idl \ 371 376 $(WebCore)/html/MicroDataItemValue.idl \ 372 377 $(WebCore)/html/RadioNodeList.idl \ … … 840 845 endif 841 846 847 ifeq ($(findstring ENABLE_ENCRYPTED_MEDIA_V2,$(FEATURE_DEFINES)), ENABLE_ENCRYPTED_MEDIA_V2) 848 HTML_FLAGS := $(HTML_FLAGS) ENABLE_ENCRYPTED_MEDIA_V2=1 849 endif 850 842 851 ifeq ($(findstring ENABLE_METER_ELEMENT,$(FEATURE_DEFINES)), ENABLE_METER_ELEMENT) 843 852 HTML_FLAGS := $(HTML_FLAGS) ENABLE_METER_ELEMENT=1 … … 964 973 IDL_INCLUDES = \ 965 974 $(WebCore)/Modules/battery \ 975 $(WebCore)/Modules/encryptedmedia \ 966 976 $(WebCore)/Modules/filesystem \ 967 977 $(WebCore)/Modules/gamepad \ -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.cpp
r142326 r142327 24 24 */ 25 25 26 #ifndef MediaKeyError_h 27 #define MediaKeyError_h 26 #include "config.h" 28 27 29 #if ENABLE(ENCRYPTED_MEDIA )28 #if ENABLE(ENCRYPTED_MEDIA_V2) 30 29 31 #include <wtf/PassRefPtr.h> 32 #include <wtf/RefCounted.h> 30 #include "MediaKeyMessageEvent.h" 31 32 #include "EventNames.h" 33 #include <wtf/Uint8Array.h> 33 34 34 35 namespace WebCore { 35 36 36 class MediaKeyError : public RefCounted<MediaKeyError> { 37 public: 38 enum Code { 39 MEDIA_KEYERR_UNKNOWN = 1, 40 MEDIA_KEYERR_CLIENT, 41 MEDIA_KEYERR_SERVICE, 42 MEDIA_KEYERR_OUTPUT, 43 MEDIA_KEYERR_HARDWARECHANGE, 44 MEDIA_KEYERR_DOMAIN 45 }; 37 MediaKeyMessageEventInit::MediaKeyMessageEventInit() 38 { 39 } 46 40 47 static PassRefPtr<MediaKeyError> create(Code code) { return adoptRef(new MediaKeyError(code)); } 41 MediaKeyMessageEvent::MediaKeyMessageEvent() 42 { 43 } 48 44 49 Code code() const { return m_code; } 45 MediaKeyMessageEvent::MediaKeyMessageEvent(const AtomicString& type, const MediaKeyMessageEventInit& initializer) 46 : Event(type, initializer) 47 , m_message(initializer.message) 48 , m_destinationURL(initializer.destinationURL) 49 { 50 } 50 51 51 private: 52 explicit MediaKeyError(Code code) : m_code(code) { } 52 MediaKeyMessageEvent::~MediaKeyMessageEvent() 53 { 54 } 53 55 54 Code m_code; 55 }; 56 const AtomicString& MediaKeyMessageEvent::interfaceName() const 57 { 58 return eventNames().interfaceForMediaKeyMessageEvent; 59 } 56 60 57 61 } // namespace WebCore 58 62 59 63 #endif 60 #endif -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.h
r142326 r142327 1 1 /* 2 2 * Copyright (C) 2012 Google Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 24 25 */ 25 26 26 #ifndef MediaKey Error_h27 #define MediaKey Error_h27 #ifndef MediaKeyMessageEvent_h 28 #define MediaKeyMessageEvent_h 28 29 29 #if ENABLE(ENCRYPTED_MEDIA )30 #if ENABLE(ENCRYPTED_MEDIA_V2) 30 31 31 #include <wtf/PassRefPtr.h>32 #include <wtf/RefCounted.h>32 #include "Event.h" 33 #include "MediaKeyError.h" 33 34 34 35 namespace WebCore { 35 36 36 class MediaKeyError : public RefCounted<MediaKeyError> { 37 struct MediaKeyMessageEventInit : public EventInit { 38 MediaKeyMessageEventInit(); 39 40 RefPtr<Uint8Array> message; 41 String destinationURL; 42 }; 43 44 class MediaKeyMessageEvent : public Event { 37 45 public: 38 enum Code { 39 MEDIA_KEYERR_UNKNOWN = 1, 40 MEDIA_KEYERR_CLIENT, 41 MEDIA_KEYERR_SERVICE, 42 MEDIA_KEYERR_OUTPUT, 43 MEDIA_KEYERR_HARDWARECHANGE, 44 MEDIA_KEYERR_DOMAIN 45 }; 46 virtual ~MediaKeyMessageEvent(); 46 47 47 static PassRefPtr<MediaKeyError> create(Code code) { return adoptRef(new MediaKeyError(code)); } 48 static PassRefPtr<MediaKeyMessageEvent> create() 49 { 50 return adoptRef(new MediaKeyMessageEvent); 51 } 48 52 49 Code code() const { return m_code; } 53 static PassRefPtr<MediaKeyMessageEvent> create(const AtomicString& type, const MediaKeyMessageEventInit& initializer) 54 { 55 return adoptRef(new MediaKeyMessageEvent(type, initializer)); 56 } 57 58 virtual const AtomicString& interfaceName() const OVERRIDE; 59 60 Uint8Array* message() const { return m_message.get(); } 61 String destinationURL() const { return m_destinationURL; } 50 62 51 63 private: 52 explicit MediaKeyError(Code code) : m_code(code) { } 64 MediaKeyMessageEvent(); 65 MediaKeyMessageEvent(const AtomicString& type, const MediaKeyMessageEventInit& initializer); 53 66 54 Code m_code; 67 RefPtr<Uint8Array> m_message; 68 String m_destinationURL; 55 69 }; 56 70 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyMessageEvent.idl
r142326 r142327 24 24 */ 25 25 26 [ 27 Conditional=ENCRYPTED_MEDIA, 28 V8EnabledAtRuntime=encryptedMedia, 29 ImplementationLacksVTable 30 ] interface MediaKeyError { 31 const unsigned short MEDIA_KEYERR_UNKNOWN = 1; 32 const unsigned short MEDIA_KEYERR_CLIENT = 2; 33 const unsigned short MEDIA_KEYERR_SERVICE = 3; 34 const unsigned short MEDIA_KEYERR_OUTPUT = 4; 35 const unsigned short MEDIA_KEYERR_HARDWARECHANGE = 5; 36 const unsigned short MEDIA_KEYERR_DOMAIN = 6; 37 readonly attribute unsigned short code; 26 interface [ 27 Conditional=ENCRYPTED_MEDIA_V2, 28 V8EnabledAtRuntime=encryptedMedia, 29 ConstructorTemplate=Event 30 ] MediaKeyMessageEvent : Event { 31 readonly attribute Uint8Array message; 32 readonly attribute [InitializedByEventConstructor] DOMString destinationURL; 38 33 }; 34 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.cpp
r142326 r142327 24 24 */ 25 25 26 #ifndef MediaKeyError_h 27 #define MediaKeyError_h 26 #include "config.h" 28 27 29 #if ENABLE(ENCRYPTED_MEDIA )28 #if ENABLE(ENCRYPTED_MEDIA_V2) 30 29 31 #include <wtf/PassRefPtr.h> 32 #include <wtf/RefCounted.h> 30 #include "MediaKeyNeededEvent.h" 31 32 #include "EventNames.h" 33 #include <wtf/Uint8Array.h> 33 34 34 35 namespace WebCore { 35 36 36 class MediaKeyError : public RefCounted<MediaKeyError> { 37 public: 38 enum Code { 39 MEDIA_KEYERR_UNKNOWN = 1, 40 MEDIA_KEYERR_CLIENT, 41 MEDIA_KEYERR_SERVICE, 42 MEDIA_KEYERR_OUTPUT, 43 MEDIA_KEYERR_HARDWARECHANGE, 44 MEDIA_KEYERR_DOMAIN 45 }; 37 MediaKeyNeededEventInit::MediaKeyNeededEventInit() 38 { 39 } 46 40 47 static PassRefPtr<MediaKeyError> create(Code code) { return adoptRef(new MediaKeyError(code)); } 41 MediaKeyNeededEvent::MediaKeyNeededEvent() 42 { 43 } 48 44 49 Code code() const { return m_code; } 45 MediaKeyNeededEvent::MediaKeyNeededEvent(const AtomicString& type, const MediaKeyNeededEventInit& initializer) 46 : Event(type, initializer) 47 , m_initData(initializer.initData) 48 { 49 } 50 50 51 private: 52 explicit MediaKeyError(Code code) : m_code(code) { } 51 MediaKeyNeededEvent::~MediaKeyNeededEvent() 52 { 53 } 53 54 54 Code m_code; 55 }; 55 const AtomicString& MediaKeyNeededEvent::interfaceName() const 56 { 57 return eventNames().interfaceForMediaKeyNeededEvent; 58 } 56 59 57 60 } // namespace WebCore 58 61 59 62 #endif 60 #endif -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.h
r142326 r142327 24 24 */ 25 25 26 #ifndef MediaKey Error_h27 #define MediaKey Error_h26 #ifndef MediaKeyNeededEvent_h 27 #define MediaKeyNeededEvent_h 28 28 29 #if ENABLE(ENCRYPTED_MEDIA )29 #if ENABLE(ENCRYPTED_MEDIA_V2) 30 30 31 #include <wtf/PassRefPtr.h>32 #include <wtf/RefCounted.h>31 #include "Event.h" 32 #include "MediaKeyError.h" 33 33 34 34 namespace WebCore { 35 35 36 class MediaKeyError : public RefCounted<MediaKeyError> { 36 struct MediaKeyNeededEventInit : public EventInit { 37 MediaKeyNeededEventInit(); 38 39 RefPtr<Uint8Array> initData; 40 }; 41 42 class MediaKeyNeededEvent : public Event { 37 43 public: 38 enum Code { 39 MEDIA_KEYERR_UNKNOWN = 1, 40 MEDIA_KEYERR_CLIENT, 41 MEDIA_KEYERR_SERVICE, 42 MEDIA_KEYERR_OUTPUT, 43 MEDIA_KEYERR_HARDWARECHANGE, 44 MEDIA_KEYERR_DOMAIN 45 }; 44 virtual ~MediaKeyNeededEvent(); 46 45 47 static PassRefPtr<MediaKeyError> create(Code code) { return adoptRef(new MediaKeyError(code)); } 46 static PassRefPtr<MediaKeyNeededEvent> create() 47 { 48 return adoptRef(new MediaKeyNeededEvent); 49 } 48 50 49 Code code() const { return m_code; } 51 static PassRefPtr<MediaKeyNeededEvent> create(const AtomicString& type, const MediaKeyNeededEventInit& initializer) 52 { 53 return adoptRef(new MediaKeyNeededEvent(type, initializer)); 54 } 55 56 virtual const AtomicString& interfaceName() const OVERRIDE; 57 58 Uint8Array* initData() const { return m_initData.get(); } 50 59 51 60 private: 52 explicit MediaKeyError(Code code) : m_code(code) { } 61 MediaKeyNeededEvent(); 62 MediaKeyNeededEvent(const AtomicString& type, const MediaKeyNeededEventInit& initializer); 53 63 54 Code m_code;64 RefPtr<Uint8Array> m_initData; 55 65 }; 56 66 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeyNeededEvent.idl
r142326 r142327 24 24 */ 25 25 26 [ 27 Conditional=ENCRYPTED_MEDIA, 28 V8EnabledAtRuntime=encryptedMedia, 29 ImplementationLacksVTable 30 ] interface MediaKeyError { 31 const unsigned short MEDIA_KEYERR_UNKNOWN = 1; 32 const unsigned short MEDIA_KEYERR_CLIENT = 2; 33 const unsigned short MEDIA_KEYERR_SERVICE = 3; 34 const unsigned short MEDIA_KEYERR_OUTPUT = 4; 35 const unsigned short MEDIA_KEYERR_HARDWARECHANGE = 5; 36 const unsigned short MEDIA_KEYERR_DOMAIN = 6; 37 readonly attribute unsigned short code; 26 interface [ 27 Conditional=ENCRYPTED_MEDIA_V2, 28 V8EnabledAtRuntime=encryptedMedia, 29 ConstructorTemplate=Event 30 ] MediaKeyNeededEvent : Event { 31 readonly attribute Uint8Array initData; 38 32 }; 33 -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeySession.idl
r142326 r142327 1 1 /* 2 * Copyright (C) 201 2 Google Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 22 22 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 */24 */ 25 25 26 #ifndef MediaKeyError_h 27 #define MediaKeyError_h 26 interface [ 27 Conditional=ENCRYPTED_MEDIA_V2, 28 V8EnabledAtRuntime=encryptedMedia, 29 EventTarget, 30 ] MediaKeySession { 31 // error state 32 readonly attribute MediaKeyError error; 28 33 29 #if ENABLE(ENCRYPTED_MEDIA) 34 // session properties 35 readonly attribute DOMString keySystem; 36 readonly attribute DOMString sessionId; 30 37 31 #include <wtf/PassRefPtr.h> 32 #include <wtf/RefCounted.h> 38 // session operations 39 void addKey(in Uint8Array key) 40 raises(DOMException); 41 void close(); 42 43 // EventListeners 44 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyadded; 45 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyerror; 46 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeymessage; 33 47 34 namespace WebCore { 35 36 class MediaKeyError : public RefCounted<MediaKeyError> { 37 public: 38 enum Code { 39 MEDIA_KEYERR_UNKNOWN = 1, 40 MEDIA_KEYERR_CLIENT, 41 MEDIA_KEYERR_SERVICE, 42 MEDIA_KEYERR_OUTPUT, 43 MEDIA_KEYERR_HARDWARECHANGE, 44 MEDIA_KEYERR_DOMAIN 45 }; 46 47 static PassRefPtr<MediaKeyError> create(Code code) { return adoptRef(new MediaKeyError(code)); } 48 49 Code code() const { return m_code; } 50 51 private: 52 explicit MediaKeyError(Code code) : m_code(code) { } 53 54 Code m_code; 48 // EventTarget interface 49 void addEventListener(in DOMString type, 50 in EventListener listener, 51 in [Optional] boolean useCapture); 52 void removeEventListener(in DOMString type, 53 in EventListener listener, 54 in [Optional] boolean useCapture); 55 boolean dispatchEvent(in Event evt) 56 raises(EventException); 55 57 }; 56 57 } // namespace WebCore58 59 #endif60 #endif -
trunk/Source/WebCore/Modules/encryptedmedia/MediaKeys.idl
r142326 r142327 1 1 /* 2 * Copyright (C) 20 07Apple Inc. All rights reserved.2 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 23 23 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 24 24 */ 25 26 interface [ 27 Conditional=ENCRYPTED_MEDIA_V2, 28 V8EnabledAtRuntime=encryptedMedia, 29 Constructor(in DOMString keySystem), 30 ConstructorRaisesException, 31 ] MediaKeys { 32 [CallWith=ScriptExecutionContext] MediaKeySession createSession(in [Optional=DefaultIsUndefined] DOMString type, in [Optional=DefaultIsUndefined] Uint8Array initData) 33 raises(DOMException); 25 34 26 [ 27 Conditional=VIDEO, 28 ImplementationLacksVTable 29 ] interface MediaError { 30 const unsigned short MEDIA_ERR_ABORTED = 1; 31 const unsigned short MEDIA_ERR_NETWORK = 2; 32 const unsigned short MEDIA_ERR_DECODE = 3; 33 const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; 34 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA 35 const unsigned short MEDIA_ERR_ENCRYPTED = 5; 36 #endif 37 readonly attribute unsigned short code; 35 readonly attribute DOMString keySystem; 38 36 }; -
trunk/Source/WebCore/WebCore.exp.in
r142225 r142327 2752 2752 __ZN7WebCore22RuntimeEnabledFeatures25areSeamlessIFramesEnabledE 2753 2753 #endif 2754 2755 #if ENABLE(ENCRYPTED_MEDIA_V2) 2756 __ZN7WebCore3CDM18registerCDMFactoryEPFN3WTF10PassOwnPtrINS_19CDMPrivateInterfaceEEEPS0_EPFbRKNS1_6StringEE 2757 #endif -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r142320 r142327 1483 1483 4B6FA6F50C39E48C00087011 /* SmartReplace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F30C39E48C00087011 /* SmartReplace.cpp */; }; 1484 1484 4B6FA6F70C39E4A100087011 /* SmartReplaceCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B6FA6F60C39E4A100087011 /* SmartReplaceCF.cpp */; }; 1485 4B61737379636F616E277368 /* IDBHistograms.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B61737379636F616E277368 /* IDBHistograms.h */; };1486 1485 4B8AF4AA0B1CE02B00687690 /* ClipboardAccessPolicy.h in Headers */ = {isa = PBXBuildFile; fileRef = 4B8AF4A90B1CE02B00687690 /* ClipboardAccessPolicy.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1487 1486 4BAE95B10B2FA9CE00AED8A0 /* EditorDeleteAction.h in Headers */ = {isa = PBXBuildFile; fileRef = 4BAE95B00B2FA9CE00AED8A0 /* EditorDeleteAction.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3654 3653 977E2DCE12F0E28300C13379 /* HTMLSourceTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 977E2DCC12F0E28300C13379 /* HTMLSourceTracker.h */; }; 3655 3654 977E2E0E12F0FC9C00C13379 /* XSSAuditor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977E2E0B12F0FC9C00C13379 /* XSSAuditor.cpp */; }; 3655 977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977E2E0B12F0FC9C00C13380 /* XSSAuditorDelegate.cpp */; }; 3656 3656 977E2E0F12F0FC9C00C13379 /* XSSAuditor.h in Headers */ = {isa = PBXBuildFile; fileRef = 977E2E0C12F0FC9C00C13379 /* XSSAuditor.h */; }; 3657 977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 977E2E0B12F0FC9C00C13380 /* XSSAuditorDelegate.cpp */; };3658 3657 977E2E0F12F0FC9C00C13380 /* XSSAuditorDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 977E2E0C12F0FC9C00C13380 /* XSSAuditorDelegate.h */; }; 3659 3658 978AD67414130A8D00C7CAE3 /* HTMLSpanElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 978AD67114130A8D00C7CAE3 /* HTMLSpanElement.cpp */; }; … … 5986 5985 CD127DED14F3097D00E84779 /* WebCoreFullScreenWindow.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD127DEB14F3097900E84779 /* WebCoreFullScreenWindow.mm */; }; 5987 5986 CD127DEE14F3098400E84779 /* WebCoreFullScreenWindow.h in Headers */ = {isa = PBXBuildFile; fileRef = CD127DEA14F3097900E84779 /* WebCoreFullScreenWindow.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5987 CD1B4A65160786AE00282DF9 /* MediaKeyNeededEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DC216014EEE00FEA3B1 /* MediaKeyNeededEvent.cpp */; }; 5988 5988 CD1E7347167BC78E009A885D /* TextTrackRepresentation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD1E7346167BC78E009A885D /* TextTrackRepresentation.cpp */; }; 5989 5989 CD27F6E51457685A0078207D /* JSMediaController.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD27F6E2145767580078207D /* JSMediaController.cpp */; }; … … 5998 5998 CD8203101395ACE700F956C6 /* WebWindowAnimation.h in Headers */ = {isa = PBXBuildFile; fileRef = CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5999 5999 CD8203111395ACE700F956C6 /* WebWindowAnimation.mm in Sources */ = {isa = PBXBuildFile; fileRef = CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */; }; 6000 CDA98DA31601464100FEA3B1 /* JSMediaKeyError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98D9B160128A500FEA3B1 /* JSMediaKeyError.cpp */; }; 6001 CDA98DD816025BEF00FEA3B1 /* MediaKeyMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DD516025BED00FEA3B1 /* MediaKeyMessageEvent.cpp */; }; 6002 CDA98DDF16026A3700FEA3B1 /* JSMediaKeyMessageEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DDB16026A1800FEA3B1 /* JSMediaKeyMessageEvent.cpp */; }; 6003 CDA98DE016026A3700FEA3B1 /* JSMediaKeyNeededEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DDD16026A1900FEA3B1 /* JSMediaKeyNeededEvent.cpp */; }; 6004 CDA98E0416039E1A00FEA3B1 /* JSMediaKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DCE1601597900FEA3B1 /* JSMediaKeys.cpp */; }; 6005 CDA98E0616039E1F00FEA3B1 /* JSMediaKeySession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DD01601597900FEA3B1 /* JSMediaKeySession.cpp */; }; 6006 CDA98E0B1603CD6000FEA3B1 /* CDM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98E091603CD5900FEA3B1 /* CDM.cpp */; }; 6007 CDA98E0D1603FE4A00FEA3B1 /* MediaKeys.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DCA1601508A00FEA3B1 /* MediaKeys.cpp */; }; 6008 CDA98E0E1603FE5800FEA3B1 /* MediaKeySession.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDA98DC716014F2C00FEA3B1 /* MediaKeySession.cpp */; }; 6000 6009 CDAA8D0A14D71B2E0061EA60 /* PlatformClockCM.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */; }; 6001 6010 CDB859F7160D48A400E5B07F /* MediaKeyEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB859F4160D489900E5B07F /* MediaKeyEvent.cpp */; }; 6002 6011 CDB859FA160D494900E5B07F /* JSMediaKeyEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB859F8160D493E00E5B07F /* JSMediaKeyEvent.cpp */; }; 6003 CDB859FB160D494F00E5B07F /* JSMediaKeyError.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDB859F0160D42DD00E5B07F /* JSMediaKeyError.cpp */; }; 6012 CDC26B40160A8CC60026757B /* MockCDM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CDC26B3C160A62B00026757B /* MockCDM.cpp */; }; 6013 CDC26B41160A8CCE0026757B /* MockCDM.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC26B3D160A62B00026757B /* MockCDM.h */; }; 6004 6014 CDC69DD61632026C007C38DF /* WebCoreFullScreenWarningView.h in Headers */ = {isa = PBXBuildFile; fileRef = CDC69DD41632026C007C38DF /* WebCoreFullScreenWarningView.h */; settings = {ATTRIBUTES = (Private, ); }; }; 6005 6015 CDC69DD71632026C007C38DF /* WebCoreFullScreenWarningView.mm in Sources */ = {isa = PBXBuildFile; fileRef = CDC69DD51632026C007C38DF /* WebCoreFullScreenWarningView.mm */; }; … … 11081 11091 977E2DCC12F0E28300C13379 /* HTMLSourceTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTMLSourceTracker.h; path = parser/HTMLSourceTracker.h; sourceTree = "<group>"; }; 11082 11092 977E2E0B12F0FC9C00C13379 /* XSSAuditor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XSSAuditor.cpp; path = parser/XSSAuditor.cpp; sourceTree = "<group>"; }; 11093 977E2E0B12F0FC9C00C13380 /* XSSAuditorDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XSSAuditorDelegate.cpp; path = parser/XSSAuditorDelegate.cpp; sourceTree = "<group>"; }; 11083 11094 977E2E0C12F0FC9C00C13379 /* XSSAuditor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XSSAuditor.h; path = parser/XSSAuditor.h; sourceTree = "<group>"; }; 11084 977E2E0B12F0FC9C00C13380 /* XSSAuditorDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XSSAuditorDelegate.cpp; path = parser/XSSAuditorDelegate.cpp; sourceTree = "<group>"; };11085 11095 977E2E0C12F0FC9C00C13380 /* XSSAuditorDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XSSAuditorDelegate.h; path = parser/XSSAuditorDelegate.h; sourceTree = "<group>"; }; 11086 11096 978AD67114130A8D00C7CAE3 /* HTMLSpanElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLSpanElement.cpp; sourceTree = "<group>"; }; … … 13571 13581 CD82030E1395ACE700F956C6 /* WebWindowAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebWindowAnimation.h; sourceTree = "<group>"; }; 13572 13582 CD82030F1395ACE700F956C6 /* WebWindowAnimation.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebWindowAnimation.mm; sourceTree = "<group>"; }; 13583 CDA98D9B160128A500FEA3B1 /* JSMediaKeyError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyError.cpp; sourceTree = "<group>"; }; 13584 CDA98D9C160128A500FEA3B1 /* JSMediaKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyError.h; sourceTree = "<group>"; }; 13585 CDA98DC216014EEE00FEA3B1 /* MediaKeyNeededEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaKeyNeededEvent.cpp; path = Modules/encryptedmedia/MediaKeyNeededEvent.cpp; sourceTree = "<group>"; }; 13586 CDA98DC316014EEE00FEA3B1 /* MediaKeyNeededEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaKeyNeededEvent.h; path = Modules/encryptedmedia/MediaKeyNeededEvent.h; sourceTree = "<group>"; }; 13587 CDA98DC416014EEE00FEA3B1 /* MediaKeyNeededEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MediaKeyNeededEvent.idl; path = Modules/encryptedmedia/MediaKeyNeededEvent.idl; sourceTree = "<group>"; }; 13588 CDA98DC716014F2C00FEA3B1 /* MediaKeySession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaKeySession.cpp; path = Modules/encryptedmedia/MediaKeySession.cpp; sourceTree = "<group>"; }; 13589 CDA98DC816014F2C00FEA3B1 /* MediaKeySession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaKeySession.h; path = Modules/encryptedmedia/MediaKeySession.h; sourceTree = "<group>"; }; 13590 CDA98DC916014F4000FEA3B1 /* MediaKeySession.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MediaKeySession.idl; path = Modules/encryptedmedia/MediaKeySession.idl; sourceTree = "<group>"; }; 13591 CDA98DCA1601508A00FEA3B1 /* MediaKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaKeys.cpp; path = Modules/encryptedmedia/MediaKeys.cpp; sourceTree = "<group>"; }; 13592 CDA98DCB1601508A00FEA3B1 /* MediaKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaKeys.h; path = Modules/encryptedmedia/MediaKeys.h; sourceTree = "<group>"; }; 13593 CDA98DCC1601508A00FEA3B1 /* MediaKeys.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MediaKeys.idl; path = Modules/encryptedmedia/MediaKeys.idl; sourceTree = "<group>"; }; 13594 CDA98DCE1601597900FEA3B1 /* JSMediaKeys.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeys.cpp; sourceTree = "<group>"; }; 13595 CDA98DCF1601597900FEA3B1 /* JSMediaKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeys.h; sourceTree = "<group>"; }; 13596 CDA98DD01601597900FEA3B1 /* JSMediaKeySession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeySession.cpp; sourceTree = "<group>"; }; 13597 CDA98DD11601597900FEA3B1 /* JSMediaKeySession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeySession.h; sourceTree = "<group>"; }; 13598 CDA98DD516025BED00FEA3B1 /* MediaKeyMessageEvent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MediaKeyMessageEvent.cpp; path = Modules/encryptedmedia/MediaKeyMessageEvent.cpp; sourceTree = "<group>"; }; 13599 CDA98DD616025BED00FEA3B1 /* MediaKeyMessageEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaKeyMessageEvent.h; path = Modules/encryptedmedia/MediaKeyMessageEvent.h; sourceTree = "<group>"; }; 13600 CDA98DD716025BEE00FEA3B1 /* MediaKeyMessageEvent.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = MediaKeyMessageEvent.idl; path = Modules/encryptedmedia/MediaKeyMessageEvent.idl; sourceTree = "<group>"; }; 13601 CDA98DDB16026A1800FEA3B1 /* JSMediaKeyMessageEvent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyMessageEvent.cpp; sourceTree = "<group>"; }; 13602 CDA98DDC16026A1900FEA3B1 /* JSMediaKeyMessageEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyMessageEvent.h; sourceTree = "<group>"; }; 13603 CDA98DDD16026A1900FEA3B1 /* JSMediaKeyNeededEvent.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyNeededEvent.cpp; sourceTree = "<group>"; }; 13604 CDA98DDE16026A1900FEA3B1 /* JSMediaKeyNeededEvent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyNeededEvent.h; sourceTree = "<group>"; }; 13605 CDA98E091603CD5900FEA3B1 /* CDM.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CDM.cpp; path = Modules/encryptedmedia/CDM.cpp; sourceTree = "<group>"; }; 13606 CDA98E0A1603CD5900FEA3B1 /* CDM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDM.h; path = Modules/encryptedmedia/CDM.h; sourceTree = "<group>"; }; 13607 CDA98E0C1603CF3C00FEA3B1 /* Modules/encryptedmedia/CDMPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Modules/encryptedmedia/CDMPrivate.h; sourceTree = "<group>"; }; 13573 13608 CDAA8D0714D385600061EA60 /* PlatformClockCM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlatformClockCM.h; sourceTree = "<group>"; }; 13574 13609 CDAA8D0814D385600061EA60 /* PlatformClockCM.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PlatformClockCM.mm; sourceTree = "<group>"; }; 13575 CDB859F0160D42DD00E5B07F /* JSMediaKeyError.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSMediaKeyError.cpp; sourceTree = "<group>"; };13576 CDB859F1160D42DD00E5B07F /* JSMediaKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyError.h; sourceTree = "<group>"; };13577 13610 CDB859F2160D489900E5B07F /* MediaKeyError.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaKeyError.h; sourceTree = "<group>"; }; 13578 13611 CDB859F3160D489900E5B07F /* MediaKeyError.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaKeyError.idl; sourceTree = "<group>"; }; … … 13583 13616 CDB859F9160D493E00E5B07F /* JSMediaKeyEvent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSMediaKeyEvent.h; sourceTree = "<group>"; }; 13584 13617 CDBD93BA1333BD4B002570E3 /* fullscreenQuickTime.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = fullscreenQuickTime.css; sourceTree = "<group>"; }; 13618 CDC26B3C160A62B00026757B /* MockCDM.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = MockCDM.cpp; sourceTree = "<group>"; }; 13619 CDC26B3D160A62B00026757B /* MockCDM.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MockCDM.h; sourceTree = "<group>"; }; 13585 13620 CDC69DD41632026C007C38DF /* WebCoreFullScreenWarningView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreFullScreenWarningView.h; sourceTree = "<group>"; }; 13586 13621 CDC69DD51632026C007C38DF /* WebCoreFullScreenWarningView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebCoreFullScreenWarningView.mm; sourceTree = "<group>"; }; … … 14822 14857 isa = PBXGroup; 14823 14858 children = ( 14859 CDA98DCD1601515C00FEA3B1 /* EncryptedMedia */, 14824 14860 A83B79100CCB001B000B0825 /* Core */, 14825 14861 A83B790E0CCAFF97000B0825 /* CSS */, … … 15526 15562 EB081CD81696084400553730 /* TypeConversions.h */, 15527 15563 EB081CD91696084400553730 /* TypeConversions.idl */, 15564 CDC26B3C160A62B00026757B /* MockCDM.cpp */, 15565 CDC26B3D160A62B00026757B /* MockCDM.h */, 15528 15566 ); 15529 15567 path = testing; … … 18266 18304 isa = PBXGroup; 18267 18305 children = ( 18306 CDA98DBD16014E0800FEA3B1 /* encryptedmedia */, 18268 18307 971145FF14EF007900674FD9 /* geolocation */, 18269 18308 9712A55315004E3C0048AF10 /* indexeddb */, … … 19026 19065 E44614100CD6826900FADA75 /* JSMediaError.cpp */, 19027 19066 E44614110CD6826900FADA75 /* JSMediaError.h */, 19028 CDB859F0160D42DD00E5B07F /* JSMediaKeyError.cpp */,19029 CDB859F1160D42DD00E5B07F /* JSMediaKeyError.h */,19030 19067 CDB859F8160D493E00E5B07F /* JSMediaKeyEvent.cpp */, 19031 19068 CDB859F9160D493E00E5B07F /* JSMediaKeyEvent.h */, … … 21582 21619 sourceTree = "<group>"; 21583 21620 }; 21621 CDA98DBD16014E0800FEA3B1 /* encryptedmedia */ = { 21622 isa = PBXGroup; 21623 children = ( 21624 CDA98DD516025BED00FEA3B1 /* MediaKeyMessageEvent.cpp */, 21625 CDA98DD616025BED00FEA3B1 /* MediaKeyMessageEvent.h */, 21626 CDA98DD716025BEE00FEA3B1 /* MediaKeyMessageEvent.idl */, 21627 CDA98DC216014EEE00FEA3B1 /* MediaKeyNeededEvent.cpp */, 21628 CDA98DC316014EEE00FEA3B1 /* MediaKeyNeededEvent.h */, 21629 CDA98DC416014EEE00FEA3B1 /* MediaKeyNeededEvent.idl */, 21630 CDA98DCA1601508A00FEA3B1 /* MediaKeys.cpp */, 21631 CDA98DCB1601508A00FEA3B1 /* MediaKeys.h */, 21632 CDA98DCC1601508A00FEA3B1 /* MediaKeys.idl */, 21633 CDA98DC716014F2C00FEA3B1 /* MediaKeySession.cpp */, 21634 CDA98DC816014F2C00FEA3B1 /* MediaKeySession.h */, 21635 CDA98DC916014F4000FEA3B1 /* MediaKeySession.idl */, 21636 CDA98E091603CD5900FEA3B1 /* CDM.cpp */, 21637 CDA98E0A1603CD5900FEA3B1 /* CDM.h */, 21638 CDA98E0C1603CF3C00FEA3B1 /* Modules/encryptedmedia/CDMPrivate.h */, 21639 ); 21640 name = encryptedmedia; 21641 sourceTree = "<group>"; 21642 }; 21643 CDA98DCD1601515C00FEA3B1 /* EncryptedMedia */ = { 21644 isa = PBXGroup; 21645 children = ( 21646 CDA98D9B160128A500FEA3B1 /* JSMediaKeyError.cpp */, 21647 CDA98D9C160128A500FEA3B1 /* JSMediaKeyError.h */, 21648 CDA98DDB16026A1800FEA3B1 /* JSMediaKeyMessageEvent.cpp */, 21649 CDA98DDC16026A1900FEA3B1 /* JSMediaKeyMessageEvent.h */, 21650 CDA98DDD16026A1900FEA3B1 /* JSMediaKeyNeededEvent.cpp */, 21651 CDA98DDE16026A1900FEA3B1 /* JSMediaKeyNeededEvent.h */, 21652 CDA98DCE1601597900FEA3B1 /* JSMediaKeys.cpp */, 21653 CDA98DCF1601597900FEA3B1 /* JSMediaKeys.h */, 21654 CDA98DD01601597900FEA3B1 /* JSMediaKeySession.cpp */, 21655 CDA98DD11601597900FEA3B1 /* JSMediaKeySession.h */, 21656 ); 21657 name = EncryptedMedia; 21658 sourceTree = "<group>"; 21659 }; 21584 21660 DF9AFD6F13FC31B00015FEB7 /* objc */ = { 21585 21661 isa = PBXGroup; … … 23001 23077 EBF5121D1696496C0056BD25 /* JSTypeConversions.h in Headers */, 23002 23078 41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */, 23079 CDC26B41160A8CCE0026757B /* MockCDM.h in Headers */, 23003 23080 ); 23004 23081 runOnlyForDeploymentPostprocessing = 0; … … 26733 26810 EBF5121C1696496C0056BD25 /* JSTypeConversions.cpp in Sources */, 26734 26811 41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */, 26812 CDC26B40160A8CC60026757B /* MockCDM.cpp in Sources */, 26735 26813 ); 26736 26814 runOnlyForDeploymentPostprocessing = 0; … … 28198 28276 FD23A12513F5FA5900F67001 /* JSMediaElementAudioSourceNode.cpp in Sources */, 28199 28277 E44614180CD6826900FADA75 /* JSMediaError.cpp in Sources */, 28200 CDB859FB160D494F00E5B07F /* JSMediaKeyError.cpp in Sources */,28201 28278 CDB859FA160D494900E5B07F /* JSMediaKeyEvent.cpp in Sources */, 28202 28279 BC3C39B60C0D3D8D005F4D7A /* JSMediaList.cpp in Sources */, … … 29579 29656 977E2E0E12F0FC9C00C13380 /* XSSAuditorDelegate.cpp in Sources */, 29580 29657 FD537352137B651800008DCE /* ZeroPole.cpp in Sources */, 29658 CDA98DA31601464100FEA3B1 /* JSMediaKeyError.cpp in Sources */, 29659 CDA98DD816025BEF00FEA3B1 /* MediaKeyMessageEvent.cpp in Sources */, 29660 CDA98DDF16026A3700FEA3B1 /* JSMediaKeyMessageEvent.cpp in Sources */, 29661 CDA98DE016026A3700FEA3B1 /* JSMediaKeyNeededEvent.cpp in Sources */, 29662 CDA98E0416039E1A00FEA3B1 /* JSMediaKeys.cpp in Sources */, 29663 CDA98E0616039E1F00FEA3B1 /* JSMediaKeySession.cpp in Sources */, 29664 CDA98E0B1603CD6000FEA3B1 /* CDM.cpp in Sources */, 29665 CDA98E0D1603FE4A00FEA3B1 /* MediaKeys.cpp in Sources */, 29666 CDA98E0E1603FE5800FEA3B1 /* MediaKeySession.cpp in Sources */, 29667 CD1B4A65160786AE00282DF9 /* MediaKeyNeededEvent.cpp in Sources */, 29581 29668 ); 29582 29669 runOnlyForDeploymentPostprocessing = 0; -
trunk/Source/WebCore/dom/EventNames.in
r142072 r142327 53 53 OrientationEvent interfaceName=Event, conditional=ORIENTATION_EVENTS 54 54 MediaKeyEvent conditional=ENCRYPTED_MEDIA 55 MediaKeyMessageEvent conditional=ENCRYPTED_MEDIA_V2 56 MediaKeyNeededEvent conditional=ENCRYPTED_MEDIA_V2 55 57 TrackEvent conditional=VIDEO_TRACK 56 58 AutocompleteErrorEvent conditional=REQUEST_AUTOCOMPLETE -
trunk/Source/WebCore/dom/EventTargetFactory.in
r141984 r142327 15 15 ScriptProcessorNode conditional=WEB_AUDIO 16 16 LocalMediaStream conditional=MEDIA_STREAM 17 MediaKeySession conditional=ENCRYPTED_MEDIA_V2 17 18 MediaController conditional=VIDEO 18 19 MediaSource conditional=MEDIA_SOURCE -
trunk/Source/WebCore/html/HTMLMediaElement.cpp
r142271 r142327 126 126 #endif 127 127 128 #if ENABLE(ENCRYPTED_MEDIA_V2) 129 #include "MediaKeyNeededEvent.h" 130 #include "MediaKeys.h" 131 #endif 132 128 133 using namespace std; 129 134 … … 1967 1972 #endif 1968 1973 1974 #if ENABLE(ENCRYPTED_MEDIA_V2) 1975 void HTMLMediaElement::mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array* initData) 1976 { 1977 MediaKeyNeededEventInit initializer; 1978 initializer.initData = initData; 1979 initializer.bubbles = false; 1980 initializer.cancelable = false; 1981 1982 RefPtr<Event> event = MediaKeyNeededEvent::create(eventNames().webkitneedkeyEvent, initializer); 1983 event->setTarget(this); 1984 m_asyncEventQueue->enqueueEvent(event.release()); 1985 } 1986 1987 void HTMLMediaElement::setMediaKeys(MediaKeys* mediaKeys) 1988 { 1989 m_mediaKeys = mediaKeys; 1990 } 1991 #endif 1992 1969 1993 void HTMLMediaElement::progressEventTimerFired(Timer<HTMLMediaElement>*) 1970 1994 { … … 2472 2496 void HTMLMediaElement::webkitGenerateKeyRequest(const String& keySystem, PassRefPtr<Uint8Array> initData, ExceptionCode& ec) 2473 2497 { 2498 #if ENABLE(ENCRYPTED_MEDIA_V2) 2499 static bool firstTime = true; 2500 if (firstTime && context() && context()->scriptExecutionContext()) { 2501 context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitGenerateKeyRequest()' is deprecated. Use 'MediaKeys.createSession()' instead."); 2502 firstTime = false; 2503 } 2504 #endif 2505 2474 2506 if (keySystem.isEmpty()) { 2475 2507 ec = SYNTAX_ERR; … … 2500 2532 void HTMLMediaElement::webkitAddKey(const String& keySystem, PassRefPtr<Uint8Array> key, PassRefPtr<Uint8Array> initData, const String& sessionId, ExceptionCode& ec) 2501 2533 { 2534 #if ENABLE(ENCRYPTED_MEDIA_V2) 2535 static bool firstTime = true; 2536 if (firstTime && context() && context()->scriptExecutionContext()) { 2537 context()->scriptExecutionContext()->addConsoleMessage(JSMessageSource, WarningMessageLevel, "'HTMLMediaElement.webkitAddKey()' is deprecated. Use 'MediaKeySession.addKey()' instead."); 2538 firstTime = false; 2539 } 2540 #endif 2541 2502 2542 if (keySystem.isEmpty()) { 2503 2543 ec = SYNTAX_ERR; -
trunk/Source/WebCore/html/HTMLMediaElement.h
r142248 r142327 67 67 class DisplaySleepDisabler; 68 68 #endif 69 #if ENABLE(ENCRYPTED_MEDIA_V2) 70 class MediaKeys; 71 #endif 69 72 70 73 #if ENABLE(VIDEO_TRACK) … … 188 191 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeyerror); 189 192 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitkeymessage); 193 #endif 194 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 190 195 DEFINE_ATTRIBUTE_EVENT_LISTENER(webkitneedkey); 196 #endif 197 198 #if ENABLE(ENCRYPTED_MEDIA_V2) 199 MediaKeys* mediaKeys() const { return m_mediaKeys.get(); } 200 void setMediaKeys(MediaKeys*); 191 201 #endif 192 202 … … 445 455 #endif 446 456 457 #if ENABLE(ENCRYPTED_MEDIA_V2) 458 virtual void mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*); 459 #endif 460 447 461 virtual String mediaPlayerReferrer() const OVERRIDE; 448 462 virtual String mediaPlayerUserAgent() const OVERRIDE; … … 706 720 707 721 friend class TrackDisplayUpdateScope; 722 723 #if ENABLE(ENCRYPTED_MEDIA_V2) 724 RefPtr<MediaKeys> m_mediaKeys; 725 #endif 708 726 }; 709 727 -
trunk/Source/WebCore/html/HTMLMediaElement.idl
r135886 r142327 46 46 void load(); 47 47 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA 48 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type, in [Optional=DefaultIsUndefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem); 48 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type, in [Optional=DefaultIsUndefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem); 49 #elif defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2 50 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type, in [Optional=DefaultIsUndefined, TreatNullAs=NullString, TreatUndefinedAs=NullString] DOMString keySystem); 49 51 #else 50 52 DOMString canPlayType(in [Optional=DefaultIsUndefined] DOMString type); … … 102 104 raises (DOMException); 103 105 104 [V8EnabledAtRuntime=encryptedMedia] attribute EventListener onwebkitkeyadded; 105 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyerror; 106 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeymessage; 107 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitneedkey; 106 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyadded; 107 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeyerror; 108 attribute [V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitkeymessage; 109 #endif 110 attribute [Conditional=ENCRYPTED_MEDIA|ENCRYPTED_MEDIA_V2, V8EnabledAtRuntime=encryptedMedia] EventListener onwebkitneedkey; 111 #if defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2 112 attribute [V8EnabledAtRuntime=encryptedMedia] MediaKeys mediaKeys; 108 113 #endif 109 114 -
trunk/Source/WebCore/html/MediaError.h
r114067 r142327 41 41 MEDIA_ERR_DECODE, 42 42 MEDIA_ERR_SRC_NOT_SUPPORTED 43 #if ENABLE(ENCRYPTED_MEDIA) 43 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 44 44 , MEDIA_ERR_ENCRYPTED 45 45 #endif -
trunk/Source/WebCore/html/MediaError.idl
r141034 r142327 24 24 */ 25 25 26 [26 interface [ 27 27 Conditional=VIDEO, 28 28 ImplementationLacksVTable 29 ] interfaceMediaError {29 ] MediaError { 30 30 const unsigned short MEDIA_ERR_ABORTED = 1; 31 31 const unsigned short MEDIA_ERR_NETWORK = 2; 32 32 const unsigned short MEDIA_ERR_DECODE = 3; 33 33 const unsigned short MEDIA_ERR_SRC_NOT_SUPPORTED = 4; 34 #if defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA34 #if (defined(ENABLE_ENCRYPTED_MEDIA) && ENABLE_ENCRYPTED_MEDIA) || (defined(ENABLE_ENCRYPTED_MEDIA_V2) && ENABLE_ENCRYPTED_MEDIA_V2) 35 35 const unsigned short MEDIA_ERR_ENCRYPTED = 5; 36 36 #endif -
trunk/Source/WebCore/html/MediaKeyError.h
r114067 r142327 27 27 #define MediaKeyError_h 28 28 29 #if ENABLE(ENCRYPTED_MEDIA) 29 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 30 30 31 31 #include <wtf/PassRefPtr.h> … … 36 36 class MediaKeyError : public RefCounted<MediaKeyError> { 37 37 public: 38 enum Code{38 enum { 39 39 MEDIA_KEYERR_UNKNOWN = 1, 40 40 MEDIA_KEYERR_CLIENT, … … 44 44 MEDIA_KEYERR_DOMAIN 45 45 }; 46 typedef unsigned short Code; 46 47 47 static PassRefPtr<MediaKeyError> create(Code code ) { return adoptRef(new MediaKeyError(code)); }48 static PassRefPtr<MediaKeyError> create(Code code, unsigned long systemCode = 0) { return adoptRef(new MediaKeyError(code, systemCode)); } 48 49 49 50 Code code() const { return m_code; } 51 unsigned long systemCode() { return m_systemCode; } 50 52 51 53 private: 52 explicit MediaKeyError(Code code ) : m_code(code) { }54 explicit MediaKeyError(Code code, unsigned long systemCode) : m_code(code), m_systemCode(systemCode) { } 53 55 54 56 Code m_code; 57 unsigned long m_systemCode; 55 58 }; 56 59 -
trunk/Source/WebCore/html/MediaKeyError.idl
r141034 r142327 24 24 */ 25 25 26 [27 Conditional=ENCRYPTED_MEDIA ,26 interface [ 27 Conditional=ENCRYPTED_MEDIA|ENCRYPTED_MEDIA_V2, 28 28 V8EnabledAtRuntime=encryptedMedia, 29 29 ImplementationLacksVTable 30 ] interfaceMediaKeyError {30 ] MediaKeyError { 31 31 const unsigned short MEDIA_KEYERR_UNKNOWN = 1; 32 32 const unsigned short MEDIA_KEYERR_CLIENT = 2; … … 36 36 const unsigned short MEDIA_KEYERR_DOMAIN = 6; 37 37 readonly attribute unsigned short code; 38 [Conditional=ENCRYPTED_MEDIA_V2] readonly attribute unsigned long systemCode; 38 39 }; -
trunk/Source/WebCore/page/DOMWindow.idl
r142205 r142327 488 488 [Conditional=ENCRYPTED_MEDIA, V8EnabledAtRuntime=encryptedMedia] attribute MediaKeyErrorConstructor MediaKeyError; 489 489 [Conditional=ENCRYPTED_MEDIA, V8EnabledAtRuntime=encryptedMedia] attribute MediaKeyEventConstructor MediaKeyEvent; 490 attribute [Conditional=ENCRYPTED_MEDIA_V2, V8EnabledAtRuntime=encryptedMedia] MediaKeysConstructor MediaKeys; 491 attribute [Conditional=ENCRYPTED_MEDIA_V2, V8EnabledAtRuntime=encryptedMedia] MediaKeyErrorConstructor MediaKeyError; 492 attribute [Conditional=ENCRYPTED_MEDIA_V2, V8EnabledAtRuntime=encryptedMedia] MediaKeyMessageEventConstructor MediaKeyMessageEvent; 493 attribute [Conditional=ENCRYPTED_MEDIA_V2, V8EnabledAtRuntime=encryptedMedia] MediaKeyNeededEventConstructor MediaKeyNeededEvent; 490 494 491 495 [Conditional=VIDEO_TRACK, V8EnabledAtRuntime=webkitVideoTrack] attribute HTMLTrackElementConstructor HTMLTrackElement; -
trunk/Source/WebCore/platform/graphics/MediaPlayer.cpp
r139899 r142327 296 296 continue; 297 297 } 298 #if ENABLE(ENCRYPTED_MEDIA) 298 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 299 299 MediaPlayer::SupportsType engineSupport = engines[ndx]->supportsTypeAndCodecs(type, codecs, keySystem, url); 300 300 #else … … 785 785 #endif 786 786 787 #if ENABLE(ENCRYPTED_MEDIA) 787 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 788 788 return engine->supportsTypeAndCodecs(type, typeCodecs, system, url); 789 789 #else … … 1082 1082 #endif 1083 1083 1084 #if ENABLE(ENCRYPTED_MEDIA_V2) 1085 void MediaPlayer::keyNeeded(Uint8Array* initData) 1086 { 1087 if (m_mediaPlayerClient) 1088 m_mediaPlayerClient->mediaPlayerKeyNeeded(this, initData); 1089 } 1090 #endif 1091 1084 1092 String MediaPlayer::referrer() const 1085 1093 { -
trunk/Source/WebCore/platform/graphics/MediaPlayer.h
r139899 r142327 194 194 #endif 195 195 196 #if ENABLE(ENCRYPTED_MEDIA_V2) 197 virtual void mediaPlayerKeyNeeded(MediaPlayer*, Uint8Array*) { } 198 #endif 199 196 200 virtual String mediaPlayerReferrer() const { return String(); } 197 201 virtual String mediaPlayerUserAgent() const { return String(); } … … 429 433 void keyMessage(const String& keySystem, const String& sessionId, const unsigned char* message, unsigned messageLength, const KURL& defaultURL); 430 434 bool keyNeeded(const String& keySystem, const String& sessionId, const unsigned char* initData, unsigned initDataLength); 435 #endif 436 437 #if ENABLE(ENCRYPTED_MEDIA_V2) 438 void keyNeeded(Uint8Array* initData); 431 439 #endif 432 440 … … 481 489 typedef PassOwnPtr<MediaPlayerPrivateInterface> (*CreateMediaEnginePlayer)(MediaPlayer*); 482 490 typedef void (*MediaEngineSupportedTypes)(HashSet<String>& types); 483 #if ENABLE(ENCRYPTED_MEDIA) 491 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 484 492 typedef MediaPlayer::SupportsType (*MediaEngineSupportsType)(const String& type, const String& codecs, const String& keySystem, const KURL& url); 485 493 #else -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r140706 r142327 82 82 static void getSupportedTypes(HashSet<String>& types); 83 83 static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&); 84 #if ENABLE(ENCRYPTED_MEDIA) 84 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 85 85 static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL&); 86 86 #endif … … 178 178 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 179 179 RetainPtr<VTPixelTransferSessionRef> m_pixelTransferSession; 180 #endif181 180 182 #if ENABLE(ENCRYPTED_MEDIA) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 181 friend class WebCoreAVFResourceLoader; 182 OwnPtr<WebCoreAVFResourceLoader> m_resourceLoader; 183 183 RetainPtr<WebCoreAVFLoaderDelegate> m_loaderDelegate; 184 184 HashMap<String, RetainPtr<AVAssetResourceLoadingRequest> > m_keyURIToRequestMap; 185 185 HashMap<String, RetainPtr<AVAssetResourceLoadingRequest> > m_sessionIDToRequestMap; 186 #endif187 188 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090189 friend class WebCoreAVFResourceLoader;190 OwnPtr<WebCoreAVFResourceLoader> m_resourceLoader;191 186 #endif 192 187 -
trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r142176 r142327 195 195 { 196 196 if (isAvailable()) 197 #if ENABLE(ENCRYPTED_MEDIA) 197 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 198 198 registrar(create, getSupportedTypes, extendedSupportsType, 0, 0, 0); 199 199 #else … … 207 207 , m_videoFrameHasDrawn(false) 208 208 , m_haveCheckedPlayability(false) 209 #if ENABLE(ENCRYPTED_MEDIA)209 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090 210 210 , m_loaderDelegate(AdoptNS, [[WebCoreAVFLoaderDelegate alloc] initWithCallback:this]) 211 211 #endif … … 816 816 } 817 817 818 #if ENABLE(ENCRYPTED_MEDIA) 818 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 819 819 static bool keySystemIsSupported(const String& keySystem) 820 820 { -
trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
r131201 r142327 77 77 static void getSupportedTypes(HashSet<String>& types); 78 78 static MediaPlayer::SupportsType supportsType(const String& type, const String& codecs, const KURL&); 79 #if ENABLE(ENCRYPTED_MEDIA) 79 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 80 80 static MediaPlayer::SupportsType extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL&); 81 81 #endif -
trunk/Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
r141630 r142327 191 191 { 192 192 if (isAvailable()) 193 #if ENABLE(ENCRYPTED_MEDIA) 193 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 194 194 registrar(create, getSupportedTypes, extendedSupportsType, getSitesInMediaCache, clearMediaCache, clearMediaCacheForSite); 195 195 #else … … 1553 1553 } 1554 1554 1555 #if ENABLE(ENCRYPTED_MEDIA) 1555 #if ENABLE(ENCRYPTED_MEDIA) || ENABLE(ENCRYPTED_MEDIA_V2) 1556 1556 MediaPlayer::SupportsType MediaPlayerPrivateQTKit::extendedSupportsType(const String& type, const String& codecs, const String& keySystem, const KURL& url) 1557 1557 { -
trunk/Source/WebCore/testing/Internals.cpp
r142171 r142327 127 127 #endif 128 128 129 #if ENABLE(ENCRYPTED_MEDIA_V2) 130 #include "CDM.h" 131 #include "MockCDM.h" 132 #endif 133 129 134 namespace WebCore { 130 135 … … 1933 1938 } 1934 1939 1935 } 1940 #if ENABLE(ENCRYPTED_MEDIA_V2) 1941 void Internals::initializeMockCDM() 1942 { 1943 CDM::registerCDMFactory(MockCDM::create, MockCDM::supportsKeySytem); 1944 } 1945 #endif 1946 1947 } -
trunk/Source/WebCore/testing/Internals.h
r142171 r142327 281 281 String getCurrentCursorInfo(Document*, ExceptionCode&); 282 282 283 #if ENABLE(ENCRYPTED_MEDIA_V2) 284 void initializeMockCDM(); 285 #endif 286 283 287 private: 284 288 explicit Internals(Document*); -
trunk/Source/WebCore/testing/Internals.idl
r142171 r142327 249 249 250 250 void setUsesOverlayScrollbars(in boolean enabled); 251 252 [Conditional=ENCRYPTED_MEDIA_V2] void initializeMockCDM(); 251 253 };
Note: See TracChangeset
for help on using the changeset viewer.