Changeset 181431 in webkit
- Timestamp:
- Mar 11, 2015, 11:05:34 PM (11 years ago)
- Location:
- tags/Safari-601.1.22/Source
- Files:
-
- 31 edited
- 5 copied
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.xcodeproj/project.pbxproj (modified) (17 diffs)
-
WebCore/dom/Document.cpp (modified) (2 diffs)
-
WebCore/dom/Document.h (modified) (3 diffs)
-
WebCore/html/HTMLMediaElement.cpp (modified) (4 diffs)
-
WebCore/html/HTMLMediaElement.h (modified) (2 diffs)
-
WebCore/html/HTMLMediaSession.cpp (modified) (4 diffs)
-
WebCore/html/HTMLMediaSession.h (modified) (6 diffs)
-
WebCore/page/ChromeClient.h (modified) (1 diff)
-
WebCore/page/Page.cpp (modified) (2 diffs)
-
WebCore/page/Page.h (modified) (4 diffs)
-
WebCore/platform/audio/MediaSession.cpp (modified) (3 diffs)
-
WebCore/platform/audio/MediaSession.h (modified) (5 diffs)
-
WebCore/platform/audio/MediaSessionManager.cpp (modified) (2 diffs)
-
WebCore/platform/audio/MediaSessionManager.h (modified) (3 diffs)
-
WebCore/platform/audio/ios/MediaSessionManagerIOS.h (modified) (3 diffs)
-
WebCore/platform/audio/ios/MediaSessionManagerIOS.mm (modified) (5 diffs)
-
WebCore/platform/graphics/MediaPlaybackTarget.h (copied) (copied from trunk/Source/WebCore/platform/graphics/MediaPlaybackTarget.h )
-
WebCore/platform/graphics/MediaPlaybackTargetPickerClient.h (copied) (copied from trunk/Source/WebCore/platform/graphics/MediaPlaybackTargetPickerClient.h )
-
WebCore/platform/graphics/MediaPlayer.cpp (modified) (1 diff)
-
WebCore/platform/graphics/MediaPlayer.h (modified) (2 diffs)
-
WebCore/platform/graphics/MediaPlayerPrivate.h (modified) (2 diffs)
-
WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm (copied) (copied from trunk/Source/WebCore/platform/graphics/avfoundation/MediaPlaybackTargetMac.mm )
-
WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h (modified) (4 diffs)
-
WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (modified) (13 diffs)
-
WebCore/testing/InternalSettings.cpp (modified) (2 diffs)
-
WebCore/testing/InternalSettings.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/Shared/WebCoreArgumentCoders.h (modified) (2 diffs)
-
WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm (modified) (2 diffs)
-
WebKit2/UIProcess/PageClient.h (modified) (2 diffs)
-
WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp (copied) (copied from trunk/Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp )
-
WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h (copied) (copied from trunk/Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.h )
-
WebKit2/UIProcess/WebPageProxy.cpp (modified) (1 diff)
-
WebKit2/UIProcess/WebPageProxy.h (modified) (4 diffs)
-
WebKit2/UIProcess/WebPageProxy.messages.in (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
tags/Safari-601.1.22/Source/WebCore/ChangeLog
r181394 r181431 1 2015-03-11 Babak Shafiei <bshafiei@apple.com> 2 3 Merge r181423. 4 5 2015-03-11 Eric Carlson <eric.carlson@apple.com> 6 7 [Mac] Update AirPlay handling 8 https://bugs.webkit.org/show_bug.cgi?id=142541 9 10 Reviewed by Sam Weinig. 11 12 * WebCore.xcodeproj/project.pbxproj: 13 * dom/Document.cpp: 14 (WebCore::Document::showPlaybackTargetPicker): 15 (WebCore::Document::addPlaybackTargetPickerClient): 16 (WebCore::Document::removePlaybackTargetPickerClient): 17 (WebCore::Document::configurePlaybackTargetMonitoring): 18 (WebCore::Document::requiresPlaybackTargetRouteMonitoring): 19 (WebCore::Document::playbackTargetAvailabilityDidChange): 20 (WebCore::Document::didChoosePlaybackTarget): 21 * dom/Document.h: 22 * html/HTMLMediaElement.cpp: 23 (WebCore::HTMLMediaElement::registerWithDocument): 24 (WebCore::HTMLMediaElement::unregisterWithDocument): 25 (WebCore::HTMLMediaElement::parseAttribute): 26 * html/HTMLMediaElement.h: 27 * html/HTMLMediaSession.cpp: 28 (WebCore::HTMLMediaSession::HTMLMediaSession): 29 (WebCore::HTMLMediaSession::registerWithDocument): 30 (WebCore::HTMLMediaSession::unregisterWithDocument): 31 (WebCore::HTMLMediaSession::showPlaybackTargetPicker): 32 (WebCore::HTMLMediaSession::hasWirelessPlaybackTargets): 33 (WebCore::HTMLMediaSession::setHasPlaybackTargetAvailabilityListeners): 34 (WebCore::HTMLMediaSession::didChoosePlaybackTarget): 35 (WebCore::HTMLMediaSession::externalOutputDeviceAvailableDidChange): 36 (WebCore::HTMLMediaSession::requiresPlaybackTargetRouteMonitoring): 37 * html/HTMLMediaSession.h: 38 * page/ChromeClient.h: 39 * page/Page.cpp: 40 (WebCore::Page::didChoosePlaybackTarget): 41 (WebCore::Page::playbackTargetAvailabilityDidChange): 42 (WebCore::Page::configurePlaybackTargetMonitoring): 43 * page/Page.h: 44 (WebCore::Page::hasWirelessPlaybackTarget): 45 (WebCore::Page::playbackTarget): 46 * platform/audio/MediaSession.cpp: 47 (WebCore::MediaSession::clientDataBufferingTimerFired): 48 (WebCore::MediaSession::wirelessRoutesAvailableDidChange): Deleted. 49 * platform/audio/MediaSession.h: 50 (WebCore::MediaSession::didChoosePlaybackTarget): 51 (WebCore::MediaSession::externalOutputDeviceAvailableDidChange): 52 (WebCore::MediaSession::requiresPlaybackTargetRouteMonitoring): 53 (WebCore::MediaSessionClient::setWirelessPlaybackTarget): 54 * platform/audio/MediaSessionManager.cpp: 55 (WebCore::MediaSessionManager::wirelessRoutesAvailableChanged): Deleted. 56 * platform/audio/MediaSessionManager.h: 57 (WebCore::MediaSessionManager::configureWireLessTargetMonitoring): 58 * platform/audio/ios/MediaSessionManagerIOS.h: 59 * platform/audio/ios/MediaSessionManagerIOS.mm: 60 (WebCore::MediaSessionManageriOS::externalOutputDeviceAvailableDidChange): 61 (-[WebMediaSessionHelper wirelessRoutesAvailableDidChange:]): 62 * platform/graphics/AVPlaybackTarget.h: Added. 63 (WebCore::AVPlaybackTarget::~AVPlaybackTarget): 64 (WebCore::AVPlaybackTarget::AVPlaybackTarget): 65 (WebCore::AVPlaybackTarget::setDevicePickerContext): 66 (WebCore::AVPlaybackTarget::devicePickerContext): 67 * platform/graphics/AVPlaybackTargetPickerClient.h: Added. 68 (WebCore::AVPlaybackTargetPickerClient::~AVPlaybackTargetPickerClient): 69 * platform/graphics/MediaPlayer.cpp: 70 (WebCore::MediaPlayer::setWirelessPlaybackTarget): 71 * platform/graphics/MediaPlayer.h: 72 * platform/graphics/MediaPlayerPrivate.h: 73 (WebCore::MediaPlayerPrivateInterface::setWirelessPlaybackTarget): 74 * platform/graphics/avfoundation/AVPlaybackTargetMac.mm: Added. 75 (WebCore::AVPlaybackTarget::encode): 76 (WebCore::AVPlaybackTarget::decode): 77 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h: 78 * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm: 79 (WebCore::MediaPlayerPrivateAVFoundationObjC::cancelLoad): 80 (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVPlayer): 81 (WebCore::MediaPlayerPrivateAVFoundationObjC::setVideoFullscreenLayer): 82 (WebCore::MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless): 83 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessPlaybackTargetType): 84 (WebCore::MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled): 85 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessVideoPlaybackDisabled): 86 (WebCore::MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget): 87 (WebCore::MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback): 88 (-[WebCoreAVFMovieObserver observeValueForKeyPath:ofObject:change:context:]): 89 1 90 2015-03-11 Babak Shafiei <bshafiei@apple.com> 2 91 -
tags/Safari-601.1.22/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r181317 r181431 176 176 0753860214489E9800B78452 /* CachedTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0753860014489E9800B78452 /* CachedTextTrack.cpp */; }; 177 177 0753860314489E9800B78452 /* CachedTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 0753860114489E9800B78452 /* CachedTextTrack.h */; }; 178 0760C17A1AA8FC7D009ED7B8 /* MediaPlaybackTargetMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 07E3DFD21A9E78A500764CA8 /* MediaPlaybackTargetMac.mm */; }; 178 179 076306D017E1478D005A7C4E /* MediaStreamTrackSourcesCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 076306CC17E1478D005A7C4E /* MediaStreamTrackSourcesCallback.h */; settings = {ATTRIBUTES = (Private, ); }; }; 179 180 076306D217E1478D005A7C4E /* MediaStreamTrackSourcesRequest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 076306CE17E1478D005A7C4E /* MediaStreamTrackSourcesRequest.cpp */; }; … … 274 275 078E094B17D1709600420AA1 /* MediaStreamAudioDestinationNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 078E094817D1709600420AA1 /* MediaStreamAudioDestinationNode.cpp */; }; 275 276 078E094C17D1709600420AA1 /* MediaStreamAudioDestinationNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 078E094917D1709600420AA1 /* MediaStreamAudioDestinationNode.h */; settings = {ATTRIBUTES = (Private, ); }; }; 277 079216551AA560AA00A3C049 /* MediaPlaybackTargetPickerClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 079216531AA560AA00A3C049 /* MediaPlaybackTargetPickerClient.h */; settings = {ATTRIBUTES = (Private, ); }; }; 276 278 07941791166E855F009416C2 /* InbandTextTrack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0794178F166E855F009416C2 /* InbandTextTrack.cpp */; }; 277 279 07941792166E855F009416C2 /* InbandTextTrack.h in Headers */ = {isa = PBXBuildFile; fileRef = 07941790166E855F009416C2 /* InbandTextTrack.h */; }; … … 345 347 07E116B11489C9A100EC5ACE /* JSTextTrackCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */; }; 346 348 07E117071489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */; }; 349 07E3DFD11A9E786500764CA8 /* MediaPlaybackTarget.h in Headers */ = {isa = PBXBuildFile; fileRef = 07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */; settings = {ATTRIBUTES = (Private, ); }; }; 347 350 07E9E12E18F5E2760011A3A4 /* InbandMetadataTextTrackPrivateAVF.h in Headers */ = {isa = PBXBuildFile; fileRef = 07E9E12D18F5E2760011A3A4 /* InbandMetadataTextTrackPrivateAVF.h */; }; 348 351 07E9E13018F62B370011A3A4 /* InbandMetadataTextTrackPrivateAVF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07E9E12F18F62B370011A3A4 /* InbandMetadataTextTrackPrivateAVF.cpp */; }; 352 07EDC3EE1AACB75D00983EB5 /* MediaSessionManagerMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07EDC3ED1AACB75D00983EB5 /* MediaSessionManagerMac.cpp */; }; 349 353 07F944161864D046005D31CB /* MediaSessionManager.h in Headers */ = {isa = PBXBuildFile; fileRef = CDAE8C081746B95700532D78 /* MediaSessionManager.h */; settings = {ATTRIBUTES = (Private, ); }; }; 350 354 07FBDE2C18FED178001A7CFF /* JSDataCueCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07FBDE2B18FED178001A7CFF /* JSDataCueCustom.cpp */; }; … … 5684 5688 CD54A762180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */; }; 5685 5689 CD54A763180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h in Headers */ = {isa = PBXBuildFile; fileRef = CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */; }; 5686 CD54DE4717468B6F005E5B36 /* MediaSessionManagerMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4517468B6F005E5B36 /* MediaSessionManagerMac.cpp */; };5687 5690 CD54DE4B17469C6D005E5B36 /* AudioSessionMac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */; }; 5688 5691 CD5596911475B678001D0BD0 /* AudioFileReaderIOS.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */; }; … … 7268 7271 078E094917D1709600420AA1 /* MediaStreamAudioDestinationNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaStreamAudioDestinationNode.h; sourceTree = "<group>"; }; 7269 7272 078E094A17D1709600420AA1 /* MediaStreamAudioDestinationNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MediaStreamAudioDestinationNode.idl; sourceTree = "<group>"; }; 7273 079216531AA560AA00A3C049 /* MediaPlaybackTargetPickerClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MediaPlaybackTargetPickerClient.h; path = graphics/MediaPlaybackTargetPickerClient.h; sourceTree = "<group>"; }; 7270 7274 0794178F166E855F009416C2 /* InbandTextTrack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InbandTextTrack.cpp; sourceTree = "<group>"; }; 7271 7275 07941790166E855F009416C2 /* InbandTextTrack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InbandTextTrack.h; sourceTree = "<group>"; }; … … 7348 7352 07E116B01489C9A100EC5ACE /* JSTextTrackCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCustom.cpp; sourceTree = "<group>"; }; 7349 7353 07E117061489EBEB00EC5ACE /* JSTextTrackCueCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSTextTrackCueCustom.cpp; sourceTree = "<group>"; }; 7354 07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaPlaybackTarget.h; sourceTree = "<group>"; }; 7355 07E3DFD21A9E78A500764CA8 /* MediaPlaybackTargetMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = MediaPlaybackTargetMac.mm; path = platform/graphics/avfoundation/MediaPlaybackTargetMac.mm; sourceTree = SOURCE_ROOT; }; 7350 7356 07E9E12D18F5E2760011A3A4 /* InbandMetadataTextTrackPrivateAVF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InbandMetadataTextTrackPrivateAVF.h; sourceTree = "<group>"; }; 7351 7357 07E9E12F18F62B370011A3A4 /* InbandMetadataTextTrackPrivateAVF.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InbandMetadataTextTrackPrivateAVF.cpp; sourceTree = "<group>"; }; 7358 07EDC3ED1AACB75D00983EB5 /* MediaSessionManagerMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSessionManagerMac.cpp; sourceTree = "<group>"; }; 7352 7359 07FBDE2B18FED178001A7CFF /* JSDataCueCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataCueCustom.cpp; sourceTree = "<group>"; }; 7353 7360 07FE99DA18807A7D00256648 /* HTMLMediaSession.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HTMLMediaSession.cpp; sourceTree = "<group>"; }; … … 13187 13194 CD54A760180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioTrackPrivateMediaSourceAVFObjC.cpp; path = objc/AudioTrackPrivateMediaSourceAVFObjC.cpp; sourceTree = "<group>"; }; 13188 13195 CD54A761180F9F7000B076C9 /* AudioTrackPrivateMediaSourceAVFObjC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioTrackPrivateMediaSourceAVFObjC.h; path = objc/AudioTrackPrivateMediaSourceAVFObjC.h; sourceTree = "<group>"; }; 13189 CD54DE4517468B6F005E5B36 /* MediaSessionManagerMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaSessionManagerMac.cpp; sourceTree = "<group>"; };13190 13196 CD54DE4917469C6D005E5B36 /* AudioSessionMac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AudioSessionMac.cpp; sourceTree = "<group>"; }; 13191 13197 CD55968F1475B678001D0BD0 /* AudioFileReaderIOS.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AudioFileReaderIOS.cpp; path = ios/AudioFileReaderIOS.cpp; sourceTree = "<group>"; }; … … 20550 20556 isa = PBXGroup; 20551 20557 children = ( 20558 07E3DFD21A9E78A500764CA8 /* MediaPlaybackTargetMac.mm */, 20552 20559 EDE3A4FF0C7A430600956A37 /* ColorMac.h */, 20553 20560 B275354A0B053814002CE64F /* ColorMac.mm */, … … 20600 20607 3721493318F0B6D600156EDC /* opentype */, 20601 20608 49E911B20EF86D27009D0CAF /* transforms */, 20609 07E3DFD01A9E786500764CA8 /* MediaPlaybackTarget.h */, 20602 20610 490707E41219C04300D90E51 /* ANGLEWebKitBridge.cpp */, 20603 20611 490707E51219C04300D90E51 /* ANGLEWebKitBridge.h */, … … 21518 21526 isa = PBXGroup; 21519 21527 children = ( 21528 079216531AA560AA00A3C049 /* MediaPlaybackTargetPickerClient.h */, 21520 21529 49E912A40EFAC8E6009D0CAF /* animation */, 21521 21530 FD31604012B026A300C1A359 /* audio */, … … 23408 23417 isa = PBXGroup; 23409 23418 children = ( 23419 07EDC3ED1AACB75D00983EB5 /* MediaSessionManagerMac.cpp */, 23410 23420 FD3160B512B0272A00C1A359 /* AudioBusMac.mm */, 23411 23421 FD3160B612B0272A00C1A359 /* AudioDestinationMac.cpp */, … … 23419 23429 CDC734131977896C0046BFC5 /* CARingBuffer.h */, 23420 23430 FD3160BA12B0272A00C1A359 /* FFTFrameMac.cpp */, 23421 CD54DE4517468B6F005E5B36 /* MediaSessionManagerMac.cpp */,23422 23431 ); 23423 23432 path = mac; … … 23724 23733 319FBD5F15D2F464009640A6 /* CachedImageClient.h in Headers */, 23725 23734 510184690B08602A004A825F /* CachedPage.h in Headers */, 23735 07E3DFD11A9E786500764CA8 /* MediaPlaybackTarget.h in Headers */, 23726 23736 D0EDA775143E303C0028E383 /* CachedRawResource.h in Headers */, 23727 23737 E1B533491717DEE300F205F9 /* CachedRawResourceClient.h in Headers */, … … 26189 26199 93C38BFF164473C700091EB2 /* ScrollingStateFixedNode.h in Headers */, 26190 26200 0FEA3E7B191B2FC5000F1B55 /* ScrollingStateFrameScrollingNode.h in Headers */, 26201 079216551AA560AA00A3C049 /* MediaPlaybackTargetPickerClient.h in Headers */, 26191 26202 931CBD0D161A44E900E4C874 /* ScrollingStateNode.h in Headers */, 26192 26203 0FEA3E84191B31BF000F1B55 /* ScrollingStateOverflowScrollingNode.h in Headers */, … … 27361 27372 FD315FFB12B0267600C1A359 /* AudioBufferSourceNode.cpp in Sources */, 27362 27373 FD31607B12B026F700C1A359 /* AudioBus.cpp in Sources */, 27374 07EDC3EE1AACB75D00983EB5 /* MediaSessionManagerMac.cpp in Sources */, 27363 27375 FD3160BB12B0272A00C1A359 /* AudioBusMac.mm in Sources */, 27364 27376 FD31607D12B026F700C1A359 /* AudioChannel.cpp in Sources */, … … 27941 27953 4B3043CC0AE0373B00A82647 /* Editor.cpp in Sources */, 27942 27954 93A38B4B0D0E5808006872C2 /* EditorCommand.cpp in Sources */, 27955 0760C17A1AA8FC7D009ED7B8 /* MediaPlaybackTargetMac.mm in Sources */, 27943 27956 FED13D3A0CEA934600D89466 /* EditorIOS.mm in Sources */, 27944 27957 ED501DC60B249F2900AE18D9 /* EditorMac.mm in Sources */, … … 29163 29176 CDAE8C091746B95700532D78 /* MediaSessionManager.cpp in Sources */, 29164 29177 07638A9A1884487200E15A1B /* MediaSessionManagerIOS.mm in Sources */, 29165 CD54DE4717468B6F005E5B36 /* MediaSessionManagerMac.cpp in Sources */,29166 29178 CD3A495E17A9D01B00274E42 /* MediaSource.cpp in Sources */, 29167 29179 CDC8B5A6180474F70016E685 /* MediaSourcePrivateAVFObjC.mm in Sources */, -
tags/Safari-601.1.22/Source/WebCore/dom/Document.cpp
r181133 r181431 229 229 #endif 230 230 231 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 232 #include "HTMLVideoElement.h" 233 #endif 234 231 235 using namespace WTF; 232 236 using namespace Unicode; … … 6355 6359 #endif 6356 6360 6361 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 6362 void Document::showPlaybackTargetPicker(const HTMLMediaElement& element) 6363 { 6364 Page* page = this->page(); 6365 if (!page) 6366 return; 6367 6368 page->showPlaybackTargetPicker(this, view()->lastKnownMousePosition(), is<HTMLVideoElement>(element)); 6369 } 6370 6371 void Document::addPlaybackTargetPickerClient(MediaPlaybackTargetPickerClient& client) 6372 { 6373 Page* page = this->page(); 6374 if (!page) 6375 return; 6376 6377 m_playbackTargetClients.add(&client); 6378 6379 client.didChoosePlaybackTarget(page->playbackTarget()); 6380 client.externalOutputDeviceAvailableDidChange(page->hasWirelessPlaybackTarget()); 6381 } 6382 6383 void Document::removePlaybackTargetPickerClient(MediaPlaybackTargetPickerClient& client) 6384 { 6385 m_playbackTargetClients.remove(&client); 6386 configurePlaybackTargetMonitoring(); 6387 } 6388 6389 void Document::configurePlaybackTargetMonitoring() 6390 { 6391 Page* page = this->page(); 6392 if (!page) 6393 return; 6394 6395 page->configurePlaybackTargetMonitoring(); 6396 } 6397 6398 bool Document::requiresPlaybackTargetRouteMonitoring() 6399 { 6400 for (auto* client : m_playbackTargetClients) { 6401 if (client->requiresPlaybackTargetRouteMonitoring()) { 6402 return true; 6403 break; 6404 } 6405 } 6406 6407 return false; 6408 } 6409 6410 void Document::playbackTargetAvailabilityDidChange(bool available) 6411 { 6412 if (m_playbackTargetsAvailable == available) 6413 return; 6414 m_playbackTargetsAvailable = available; 6415 6416 for (auto* client : m_playbackTargetClients) 6417 client->externalOutputDeviceAvailableDidChange(available); 6418 } 6419 6420 void Document::didChoosePlaybackTarget(MediaPlaybackTarget& device) 6421 { 6422 MediaPlaybackTargetPickerClient* clientThatRequestedPicker = nullptr; 6423 6424 for (auto* client : m_playbackTargetClients) { 6425 if (client->requestedPlaybackTargetPicker()) { 6426 clientThatRequestedPicker = client; 6427 continue; 6428 } 6429 6430 client->didChoosePlaybackTarget(device); 6431 } 6432 6433 if (clientThatRequestedPicker) 6434 clientThatRequestedPicker->didChoosePlaybackTarget(device); 6435 } 6436 6437 #endif 6438 6357 6439 } // namespace WebCore -
tags/Safari-601.1.22/Source/WebCore/dom/Document.h
r181169 r181431 125 125 class Locale; 126 126 class MediaCanStartListener; 127 class MediaPlaybackTarget; 128 class MediaPlaybackTargetPickerClient; 127 129 class MediaQueryList; 128 130 class MediaQueryMatcher; … … 1215 1217 WeakPtr<Document> createWeakPtr() { return m_weakFactory.createWeakPtr(); } 1216 1218 1219 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 1220 void showPlaybackTargetPicker(const HTMLMediaElement&); 1221 void didChoosePlaybackTarget(MediaPlaybackTarget&); 1222 void addPlaybackTargetPickerClient(MediaPlaybackTargetPickerClient&); 1223 void removePlaybackTargetPickerClient(MediaPlaybackTargetPickerClient&); 1224 bool requiresPlaybackTargetRouteMonitoring(); 1225 void configurePlaybackTargetMonitoring(); 1226 void playbackTargetAvailabilityDidChange(bool); 1227 #endif 1228 1217 1229 protected: 1218 1230 enum ConstructionFlags { Synthesized = 1, NonRenderedPlaceholder = 1 << 1 }; … … 1652 1664 HashSet<AudioProducer*> m_audioProducers; 1653 1665 bool m_isPlayingAudio; 1666 1667 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 1668 HashSet<WebCore::MediaPlaybackTargetPickerClient*> m_playbackTargetClients; 1669 bool m_playbackTargetsAvailable { false }; 1670 #endif 1654 1671 }; 1655 1672 -
tags/Safari-601.1.22/Source/WebCore/html/HTMLMediaElement.cpp
r181358 r181431 427 427 void HTMLMediaElement::registerWithDocument(Document& document) 428 428 { 429 m_mediaSession->registerWithDocument(document); 430 429 431 if (m_isWaitingUntilMediaCanStart) 430 432 document.addMediaCanStartListener(this); … … 452 454 void HTMLMediaElement::unregisterWithDocument(Document& document) 453 455 { 456 m_mediaSession->unregisterWithDocument(document); 457 454 458 if (m_isWaitingUntilMediaCanStart) 455 459 document.removeMediaCanStartListener(this); … … 2469 2473 void HTMLMediaElement::invalidateCachedTime() const 2470 2474 { 2475 if (!m_player->maximumDurationToCacheMediaTime()) 2476 return; 2477 2471 2478 #if !LOG_DISABLED 2472 2479 if (m_cachedTime.isValid()) … … 4854 4861 m_asyncEventQueue.enqueueEvent(event.release()); 4855 4862 } 4863 4864 void HTMLMediaElement::setWirelessPlaybackTarget(const MediaPlaybackTarget& device) 4865 { 4866 LOG(Media, "HTMLMediaElement::setWirelessPlaybackTarget(%p)", this); 4867 if (m_player) 4868 m_player->setWirelessPlaybackTarget(device); 4869 } 4856 4870 #endif 4857 4871 -
tags/Safari-601.1.22/Source/WebCore/html/HTMLMediaElement.h
r181259 r181431 1 1 /* 2 * Copyright (C) 2007-201 4Apple Inc. All rights reserved.2 * Copyright (C) 2007-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 358 358 virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture) override; 359 359 virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture) override; 360 360 361 virtual void wirelessRoutesAvailableDidChange() override; 362 virtual void setWirelessPlaybackTarget(const MediaPlaybackTarget&) override; 361 363 #endif 362 364 -
tags/Safari-601.1.22/Source/WebCore/html/HTMLMediaSession.cpp
r180717 r181431 32 32 #include "Chrome.h" 33 33 #include "ChromeClient.h" 34 #include "Document.h" 34 35 #include "Frame.h" 36 #include "FrameView.h" 35 37 #include "HTMLMediaElement.h" 36 38 #include "HTMLNames.h" … … 73 75 : MediaSession(client) 74 76 , m_restrictions(NoRestrictions) 75 , m_hasPlaybackTargetAvailabilityListeners(false) 76 { 77 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 78 , m_targetAvailabilityChangedTimer(*this, &HTMLMediaSession::targetAvailabilityChangedTimerFired) 79 #endif 80 { 81 } 82 83 void HTMLMediaSession::registerWithDocument(Document& document) 84 { 85 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 86 document.addPlaybackTargetPickerClient(*this); 87 #else 88 UNUSED_PARAM(document); 89 #endif 90 } 91 92 void HTMLMediaSession::unregisterWithDocument(Document& document) 93 { 94 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 95 document.removePlaybackTargetPickerClient(*this); 96 #else 97 UNUSED_PARAM(document); 98 #endif 77 99 } 78 100 … … 178 200 return; 179 201 180 #if PLATFORM(IOS) 181 element.document().frame()->page()->chrome().client().showPlaybackTargetPicker(element.hasVideo()); 182 #endif 183 } 184 185 bool HTMLMediaSession::hasWirelessPlaybackTargets(const HTMLMediaElement& element) const 186 { 187 UNUSED_PARAM(element); 188 189 bool hasTargets = MediaSessionManager::sharedManager().hasWirelessTargetsAvailable(); 190 LOG(Media, "HTMLMediaSession::hasWirelessPlaybackTargets - returning %s", hasTargets ? "TRUE" : "FALSE"); 191 192 return hasTargets; 202 m_haveRequestedPlaybackTargetPicker = true; 203 element.document().showPlaybackTargetPicker(element); 204 } 205 206 bool HTMLMediaSession::hasWirelessPlaybackTargets(const HTMLMediaElement&) const 207 { 208 #if PLATFORM(IOS) 209 // FIXME: consolidate Mac and iOS implementations 210 m_hasPlaybackTargets = MediaSessionManager::sharedManager().hasWirelessTargetsAvailable(); 211 #endif 212 213 LOG(Media, "HTMLMediaSession::hasWirelessPlaybackTargets - returning %s", m_hasPlaybackTargets ? "TRUE" : "FALSE"); 214 215 return m_hasPlaybackTargets; 193 216 } 194 217 … … 245 268 246 269 m_hasPlaybackTargetAvailabilityListeners = hasListeners; 270 271 #if PLATFORM(IOS) 247 272 MediaSessionManager::sharedManager().configureWireLessTargetMonitoring(); 273 #else 274 element.document().configurePlaybackTargetMonitoring(); 275 #endif 276 } 277 278 void HTMLMediaSession::didChoosePlaybackTarget(MediaPlaybackTarget& device) 279 { 280 m_haveRequestedPlaybackTargetPicker = false; 281 client().setWirelessPlaybackTarget(device); 282 } 283 284 void HTMLMediaSession::targetAvailabilityChangedTimerFired() 285 { 286 client().wirelessRoutesAvailableDidChange(); 287 } 288 289 void HTMLMediaSession::externalOutputDeviceAvailableDidChange(bool hasTargets) const 290 { 291 if (m_hasPlaybackTargets == hasTargets) 292 return; 293 294 m_hasPlaybackTargets = hasTargets; 295 if (!m_targetAvailabilityChangedTimer.isActive()) 296 m_targetAvailabilityChangedTimer.startOneShot(0); 297 } 298 299 bool HTMLMediaSession::requiresPlaybackTargetRouteMonitoring() const 300 { 301 return m_hasPlaybackTargetAvailabilityListeners; 248 302 } 249 303 #endif -
tags/Safari-601.1.22/Source/WebCore/html/HTMLMediaSession.h
r180717 r181431 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #include "MediaPlayer.h" 32 32 #include "MediaSession.h" 33 #include "Timer.h" 33 34 34 35 namespace WebCore { 35 36 37 class Document; 36 38 class HTMLMediaElement; 37 39 class SourceBuffer; … … 42 44 virtual ~HTMLMediaSession() { } 43 45 46 void registerWithDocument(Document&); 47 void unregisterWithDocument(Document&); 48 44 49 bool playbackPermitted(const HTMLMediaElement&) const; 45 50 bool dataLoadingPermitted(const HTMLMediaElement&) const; … … 47 52 bool pageAllowsDataLoading(const HTMLMediaElement&) const; 48 53 bool pageAllowsPlaybackAfterResuming(const HTMLMediaElement&) const; 54 49 55 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 50 56 bool showingPlaybackTargetPickerPermitted(const HTMLMediaElement&) const; 51 52 57 bool currentPlaybackTargetIsWireless(const HTMLMediaElement&) const; 53 58 void showPlaybackTargetPicker(const HTMLMediaElement&); … … 59 64 void setHasPlaybackTargetAvailabilityListeners(const HTMLMediaElement&, bool); 60 65 #endif 66 61 67 bool requiresFullscreenForVideoPlayback(const HTMLMediaElement&) const; 62 68 WEBCORE_EXPORT bool allowsAlternateFullscreen(const HTMLMediaElement&) const; … … 88 94 89 95 private: 90 virtual bool requiresPlaybackTargetRouteMonitoring() const override { return m_hasPlaybackTargetAvailabilityListeners; } 96 97 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 98 void targetAvailabilityChangedTimerFired(); 99 100 // MediaPlaybackTargetPickerClient 101 virtual void didChoosePlaybackTarget(MediaPlaybackTarget&) override; 102 virtual void externalOutputDeviceAvailableDidChange(bool) const override; 103 virtual bool requiresPlaybackTargetRouteMonitoring() const override; 104 virtual bool requestedPlaybackTargetPicker() const override { return m_haveRequestedPlaybackTargetPicker; } 105 #endif 91 106 92 107 BehaviorRestrictions m_restrictions; 93 bool m_hasPlaybackTargetAvailabilityListeners; 108 109 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 110 mutable Timer m_targetAvailabilityChangedTimer; 111 bool m_hasPlaybackTargetAvailabilityListeners { false }; 112 mutable bool m_hasPlaybackTargets { false }; 113 mutable bool m_haveRequestedPlaybackTargetPicker { false }; 114 #endif 94 115 }; 95 116 -
tags/Safari-601.1.22/Source/WebCore/page/ChromeClient.h
r180607 r181431 446 446 virtual bool shouldDispatchFakeMouseMoveEvents() const { return true; } 447 447 448 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 449 virtual void showPlaybackTargetPicker(const WebCore::IntPoint&, bool) { } 450 virtual void startingMonitoringPlaybackTargets() { } 451 virtual void stopMonitoringPlaybackTargets() { } 452 #endif 453 448 454 protected: 449 455 virtual ~ChromeClient() { } -
tags/Safari-601.1.22/Source/WebCore/page/Page.cpp
r180653 r181431 105 105 #endif 106 106 107 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 108 #include "HTMLVideoElement.h" 109 #include "MediaPlaybackTarget.h" 110 #include "MediaPlaybackTargetPickerClient.h" 111 #endif 112 107 113 namespace WebCore { 108 114 … … 1692 1698 } 1693 1699 1700 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 1701 void Page::showPlaybackTargetPicker(Document* document, const WebCore::IntPoint& location, bool isVideo) 1702 { 1703 1704 m_documentRequestingPlaybackTargetPicker = document; 1705 #if PLATFORM(IOS) 1706 // FIXME: refactor iOS implementation. 1707 UNUSED_PARAM(location); 1708 chrome().client().showPlaybackTargetPicker(isVideo); 1709 #else 1710 chrome().client().showPlaybackTargetPicker(location, isVideo); 1711 #endif 1712 } 1713 1714 void Page::didChoosePlaybackTarget(MediaPlaybackTarget& target) 1715 { 1716 Document* documentThatRequestedPicker = nullptr; 1717 1718 m_playbackTarget = std::make_unique<MediaPlaybackTarget>(target.devicePickerContext()); 1719 for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) { 1720 Document* document = frame->document(); 1721 if (frame->document() == m_documentRequestingPlaybackTargetPicker) { 1722 documentThatRequestedPicker = document; 1723 continue; 1724 } 1725 frame->document()->didChoosePlaybackTarget(target); 1726 } 1727 1728 if (documentThatRequestedPicker) 1729 documentThatRequestedPicker->didChoosePlaybackTarget(target); 1730 1731 m_documentRequestingPlaybackTargetPicker = nullptr; 1732 } 1733 1734 void Page::playbackTargetAvailabilityDidChange(bool available) 1735 { 1736 m_hasWirelessPlaybackTarget = available; 1737 for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) 1738 frame->document()->playbackTargetAvailabilityDidChange(available); 1739 } 1740 1741 void Page::configurePlaybackTargetMonitoring() 1742 { 1743 bool monitoringRequired = false; 1744 for (Frame* frame = &mainFrame(); frame; frame = frame->tree().traverseNext()) { 1745 if (frame->document()->requiresPlaybackTargetRouteMonitoring()) { 1746 monitoringRequired = true; 1747 break; 1748 } 1749 } 1750 1751 if (m_requiresPlaybackTargetMonitoring == monitoringRequired) 1752 return; 1753 m_requiresPlaybackTargetMonitoring = monitoringRequired; 1754 1755 1756 if (monitoringRequired) 1757 chrome().client().startingMonitoringPlaybackTargets(); 1758 else 1759 chrome().client().stopMonitoringPlaybackTargets(); 1760 } 1761 #endif 1762 1694 1763 } // namespace WebCore -
tags/Safari-601.1.22/Source/WebCore/page/Page.h
r180301 r181431 77 77 class FrameLoaderClient; 78 78 class HistoryItem; 79 class HTMLMediaElement; 79 80 class UserInputBridge; 80 81 class InspectorClient; … … 82 83 class MainFrame; 83 84 class MediaCanStartListener; 85 class MediaPlaybackTarget; 84 86 class PageConfiguration; 85 87 class PageConsoleClient; … … 423 425 WEBCORE_EXPORT void setMuted(bool); 424 426 427 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 428 void showPlaybackTargetPicker(Document*, const WebCore::IntPoint&, bool); 429 bool hasWirelessPlaybackTarget() const { return m_hasWirelessPlaybackTarget; } 430 MediaPlaybackTarget& playbackTarget() const { return *m_playbackTarget.get(); } 431 void configurePlaybackTargetMonitoring(); 432 433 WEBCORE_EXPORT void didChoosePlaybackTarget(MediaPlaybackTarget&); 434 WEBCORE_EXPORT void playbackTargetAvailabilityDidChange(bool); 435 #endif 436 425 437 private: 426 438 WEBCORE_EXPORT void initGroup(); … … 582 594 SessionID m_sessionID; 583 595 596 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 597 Document* m_documentRequestingPlaybackTargetPicker { nullptr }; 598 std::unique_ptr<MediaPlaybackTarget> m_playbackTarget; 599 bool m_requiresPlaybackTargetMonitoring { false }; 600 bool m_hasWirelessPlaybackTarget { false }; 601 #endif 602 584 603 bool m_isClosing; 585 604 -
tags/Safari-601.1.22/Source/WebCore/platform/audio/MediaSession.cpp
r180274 r181431 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 191 191 void MediaSession::clientDataBufferingTimerFired() 192 192 { 193 LOG(Media, "MediaSession:: visibilityChanged(%p)- visible = %s", this, m_client.elementIsHidden() ? "false" : "true");193 LOG(Media, "MediaSession::clientDataBufferingTimerFired(%p)- visible = %s", this, m_client.elementIsHidden() ? "false" : "true"); 194 194 195 195 updateClientDataBuffering(); … … 221 221 } 222 222 223 void MediaSession::wirelessRoutesAvailableDidChange() const224 {225 m_client.wirelessRoutesAvailableDidChange();226 }227 228 223 String MediaSessionClient::mediaSessionTitle() const 229 224 { -
tags/Safari-601.1.22/Source/WebCore/platform/audio/MediaSession.h
r179869 r181431 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 31 31 #include <wtf/text/WTFString.h> 32 32 33 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 34 #include "MediaPlaybackTargetPickerClient.h" 35 #endif 36 33 37 namespace WebCore { 34 38 39 class MediaPlaybackTarget; 35 40 class MediaSessionClient; 36 41 37 class MediaSession { 42 class MediaSession 43 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 44 : public MediaPlaybackTargetPickerClient 45 #endif 46 { 38 47 public: 39 48 static std::unique_ptr<MediaSession> create(MediaSessionClient&); … … 100 109 void didReceiveRemoteControlCommand(RemoteControlCommandType); 101 110 102 virtual bool requiresPlaybackTargetRouteMonitoring() const { return false; }103 void wirelessRoutesAvailableDidChange() const;104 105 111 enum DisplayType { 106 112 Normal, … … 111 117 112 118 bool isHidden() const; 119 120 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 121 // MediaPlaybackTargetPickerClient 122 virtual void didChoosePlaybackTarget(MediaPlaybackTarget&) override { } 123 virtual void externalOutputDeviceAvailableDidChange(bool) const override { } 124 virtual bool requiresPlaybackTargetRouteMonitoring() const override { return false; } 125 virtual bool requestedPlaybackTargetPicker() const override { return false; } 126 #endif 113 127 114 128 protected: … … 151 165 virtual bool overrideBackgroundPlaybackRestriction() const = 0; 152 166 167 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 153 168 virtual void wirelessRoutesAvailableDidChange() { } 169 virtual void setWirelessPlaybackTarget(const MediaPlaybackTarget&) { } 170 #endif 154 171 155 172 protected: -
tags/Safari-601.1.22/Source/WebCore/platform/audio/MediaSessionManager.cpp
r180274 r181431 1 1 /* 2 * Copyright (C) 2013-201 4Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 286 286 } 287 287 288 void MediaSessionManager::wirelessRoutesAvailableChanged()289 {290 LOG(Media, "MediaSessionManager::wirelessRoutesAvailableChanged");291 Vector<MediaSession*> sessions = m_sessions;292 for (auto* session : sessions)293 session->wirelessRoutesAvailableDidChange();294 }295 296 288 #if !PLATFORM(COCOA) 297 289 void MediaSessionManager::updateSessionState() -
tags/Safari-601.1.22/Source/WebCore/platform/audio/MediaSessionManager.h
r180416 r181431 1 1 /* 2 * Copyright (C) 2013-201 4Apple Inc. All rights reserved.2 * Copyright (C) 2013-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 55 55 WEBCORE_EXPORT void applicationWillEnterForeground() const; 56 56 WEBCORE_EXPORT void applicationWillEnterBackground() const; 57 void wirelessRoutesAvailableChanged();58 57 59 58 enum SessionRestrictionFlags { … … 80 79 virtual bool sessionCanLoadMedia(const MediaSession&) const; 81 80 81 #if PLATFORM(IOS) 82 82 virtual void configureWireLessTargetMonitoring() { } 83 84 #if ENABLE(WIRELESS_PLAYBACK_TARGET)85 83 virtual bool hasWirelessTargetsAvailable() { return false; } 86 84 #endif -
tags/Safari-601.1.22/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.h
r180416 r181431 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 46 46 virtual ~MediaSessionManageriOS(); 47 47 48 void externalOutputDeviceAvailableDidChange(); 49 virtual bool hasWirelessTargetsAvailable() override; 50 48 51 private: 49 52 friend class MediaSessionManager; 53 54 MediaSessionManageriOS(); 50 55 51 56 virtual void sessionWillBeginPlayback(MediaSession&) override; … … 56 61 virtual void resetRestrictions() override; 57 62 58 #if ENABLE(WIRELESS_PLAYBACK_TARGET)59 virtual bool hasWirelessTargetsAvailable() override;60 63 virtual void configureWireLessTargetMonitoring() override; 61 #endif62 64 63 65 virtual bool sessionCanLoadMedia(const MediaSession&) const override; 64 65 MediaSessionManageriOS(); 66 66 67 RetainPtr<WebMediaSessionHelper> m_objcObserver; 67 68 }; -
tags/Safari-601.1.22/Source/WebCore/platform/audio/ios/MediaSessionManagerIOS.mm
r180416 r181431 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 160 160 } 161 161 162 #if ENABLE(WIRELESS_PLAYBACK_TARGET)163 162 bool MediaSessionManageriOS::hasWirelessTargetsAvailable() 164 163 { … … 185 184 [m_objcObserver stopMonitoringAirPlayRoutes]; 186 185 } 187 #endif 188 186 189 187 void MediaSessionManageriOS::sessionWillBeginPlayback(MediaSession& session) 190 188 { … … 232 230 { 233 231 return session.state() == MediaSession::Playing || !session.isHidden() || session.displayType() == MediaSession::Optimized; 232 } 233 234 void MediaSessionManageriOS::externalOutputDeviceAvailableDidChange() 235 { 236 Vector<MediaSession*> sessionList = sessions(); 237 bool haveTargets = [m_objcObserver hasWirelessTargetsAvailable]; 238 for (auto* session : sessionList) 239 session->externalOutputDeviceAvailableDidChange(haveTargets); 234 240 } 235 241 … … 446 452 return; 447 453 448 _callback-> wirelessRoutesAvailableChanged();454 _callback->externalOutputDeviceAvailableDidChange(); 449 455 }); 450 456 } -
tags/Safari-601.1.22/Source/WebCore/platform/graphics/MediaPlayer.cpp
r181153 r181431 868 868 m_client.mediaPlayerCurrentPlaybackTargetIsWirelessChanged(this); 869 869 } 870 871 void MediaPlayer::setWirelessPlaybackTarget(const MediaPlaybackTarget& device) 872 { 873 m_private->setWirelessPlaybackTarget(device); 874 } 870 875 #endif 871 876 -
tags/Safari-601.1.22/Source/WebCore/platform/graphics/MediaPlayer.h
r181153 r181431 72 72 class AudioSourceProvider; 73 73 class AuthenticationChallenge; 74 class MediaPlaybackTarget; 74 75 #if ENABLE(MEDIA_SOURCE) 75 76 class MediaSourcePrivateClient; … … 477 478 void currentPlaybackTargetIsWirelessChanged(); 478 479 void playbackTargetAvailabilityChanged(); 480 481 void setWirelessPlaybackTarget(const MediaPlaybackTarget&); 479 482 #endif 480 483 -
tags/Safari-601.1.22/Source/WebCore/platform/graphics/MediaPlayerPrivate.h
r181153 r181431 37 37 class IntRect; 38 38 class IntSize; 39 class MediaPlaybackTarget; 39 40 class PlatformTextTrack; 40 41 … … 167 168 virtual bool wirelessVideoPlaybackDisabled() const { return false; } 168 169 virtual void setWirelessVideoPlaybackDisabled(bool) { } 170 171 virtual void setWirelessPlaybackTarget(const MediaPlaybackTarget&) { } 169 172 #endif 170 173 -
tags/Safari-601.1.22/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h
r181006 r181431 35 35 OBJC_CLASS AVAssetResourceLoadingRequest; 36 36 OBJC_CLASS AVMediaSelectionGroup; 37 OBJC_CLASS AVOutputDevicePickerContext; 37 38 OBJC_CLASS AVPlayer; 38 39 OBJC_CLASS AVPlayerItem; … … 60 61 namespace WebCore { 61 62 62 class WebCoreAVFResourceLoader; 63 class AudioSourceProviderAVFObjC; 64 class AudioTrackPrivateAVFObjC; 63 65 class InbandMetadataTextTrackPrivateAVF; 64 66 class InbandTextTrackPrivateAVFObjC; 65 class AudioSourceProviderAVFObjC; 66 class AudioTrackPrivateAVFObjC; 67 class MediaPlaybackTarget; 67 68 class MediaSelectionGroupAVFObjC; 68 69 class VideoTrackPrivateAVFObjC; 70 class WebCoreAVFResourceLoader; 69 71 70 72 class MediaPlayerPrivateAVFoundationObjC : public MediaPlayerPrivateAVFoundation { … … 275 277 virtual MediaPlayer::WirelessPlaybackTargetType wirelessPlaybackTargetType() const override; 276 278 virtual bool wirelessVideoPlaybackDisabled() const override; 279 #if !PLATFORM(IOS) 280 virtual void setWirelessPlaybackTarget(const MediaPlaybackTarget&) override; 281 #endif 277 282 virtual void setWirelessVideoPlaybackDisabled(bool) override; 278 283 void updateDisableExternalPlayback(); … … 344 349 #if ENABLE(DATACUE_VALUE) 345 350 RefPtr<InbandMetadataTextTrackPrivateAVF> m_metadataTrack; 351 #endif 352 353 #if PLATFORM(MAC) && ENABLE(WIRELESS_PLAYBACK_TARGET) 354 RetainPtr<AVOutputDevicePickerContext> m_outputDevicePickerContext; 346 355 #endif 347 356 -
tags/Safari-601.1.22/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm
r181036 r181431 47 47 #import "URL.h" 48 48 #import "Logging.h" 49 #import "MediaPlaybackTarget.h" 49 50 #import "MediaSelectionGroupAVFObjC.h" 50 51 #import "MediaTimeAVFoundation.h" … … 136 137 @end 137 138 139 #if PLATFORM(MAC) && ENABLE(WIRELESS_PLAYBACK_TARGET) 140 typedef AVOutputDevicePickerContext AVOutputDevicePickerContextType; 141 142 @interface AVPlayer (WebKitExtensions) 143 @property (nonatomic) AVOutputDevicePickerContext *outputDevicePickerContext; 144 @end 145 #endif 146 138 147 typedef AVPlayer AVPlayerType; 139 148 typedef AVPlayerItem AVPlayerItemType; … … 547 556 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 548 557 [m_avPlayer.get() removeObserver:m_objcObserver.get() forKeyPath:@"externalPlaybackActive"]; 558 [m_avPlayer.get() removeObserver:m_objcObserver.get() forKeyPath:@"outputDevicePickerContext"]; 549 559 #endif 550 560 m_avPlayer = nil; … … 928 938 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 929 939 [m_avPlayer.get() addObserver:m_objcObserver.get() forKeyPath:@"externalPlaybackActive" options:NSKeyValueObservingOptionNew context:(void *)MediaPlayerAVFoundationObservationContextPlayer]; 940 [m_avPlayer.get() addObserver:m_objcObserver.get() forKeyPath:@"outputDevicePickerContext" options:NSKeyValueObservingOptionNew context:(void *)MediaPlayerAVFoundationObservationContextPlayer]; 941 #endif 942 943 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 930 944 updateDisableExternalPlayback(); 931 945 #endif … … 937 951 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 938 952 [m_avPlayer.get() setAllowsExternalPlayback:m_allowsWirelessVideoPlayback]; 953 #endif 954 955 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 956 if (m_outputDevicePickerContext) 957 m_avPlayer.get().outputDevicePickerContext = m_outputDevicePickerContext.get(); 939 958 #endif 940 959 … … 1135 1154 [m_videoFullscreenLayer addSublayer:m_textTrackRepresentationLayer.get()]; 1136 1155 } 1137 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 1156 1138 1157 updateDisableExternalPlayback(); 1139 #endif1140 1158 } 1141 1159 … … 2688 2706 return false; 2689 2707 2690 bool wirelessTarget = [m_avPlayer.get() isExternalPlaybackActive];2708 bool wirelessTarget = m_avPlayer.get().externalPlaybackActive; 2691 2709 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::isCurrentPlaybackTargetWireless(%p) - returning %s", this, boolString(wirelessTarget)); 2710 2692 2711 return wirelessTarget; 2693 2712 } … … 2698 2717 return MediaPlayer::TargetTypeNone; 2699 2718 2719 #if PLATFORM(IOS) 2700 2720 switch (wkExernalDeviceTypeForPlayer(m_avPlayer.get())) { 2701 2721 case wkExternalPlaybackTypeNone: … … 2709 2729 ASSERT_NOT_REACHED(); 2710 2730 return MediaPlayer::TargetTypeNone; 2731 2732 #else 2733 return MediaPlayer::TargetTypeAirPlay; 2734 #endif 2711 2735 } 2712 2736 … … 2726 2750 if (!m_avPlayer) 2727 2751 return !m_allowsWirelessVideoPlayback; 2728 2752 2729 2753 m_allowsWirelessVideoPlayback = [m_avPlayer.get() allowsExternalPlayback]; 2730 2754 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::wirelessVideoPlaybackDisabled(%p) - returning %s", this, boolString(!m_allowsWirelessVideoPlayback)); … … 2739 2763 if (!m_avPlayer) 2740 2764 return; 2741 2765 2742 2766 [m_avPlayer.get() setAllowsExternalPlayback:!disabled]; 2743 2767 } 2744 2768 2769 #if !PLATFORM(IOS) 2770 void MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget(const MediaPlaybackTarget& target) 2771 { 2772 m_outputDevicePickerContext = target.devicePickerContext(); 2773 2774 LOG(Media, "MediaPlayerPrivateAVFoundationObjC::setWirelessPlaybackTarget(%p) - target = %p", this, m_outputDevicePickerContext.get()); 2775 2776 if (!m_avPlayer) 2777 return; 2778 2779 m_avPlayer.get().outputDevicePickerContext = m_outputDevicePickerContext.get(); 2780 } 2781 #endif 2782 2745 2783 void MediaPlayerPrivateAVFoundationObjC::updateDisableExternalPlayback() 2746 2784 { … … 2748 2786 return; 2749 2787 2788 #if PLATFORM(IOS) 2750 2789 [m_avPlayer setUsesExternalPlaybackWhileExternalScreenIsActive:m_videoFullscreenLayer != nil]; 2790 #endif 2751 2791 } 2752 2792 #endif … … 3170 3210 else if ([keyPath isEqualToString:@"externalPlaybackActive"]) 3171 3211 function = WTF::bind(&MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange, m_callback); 3212 else if ([keyPath isEqualToString:@"outputDevicePickerContext"]) 3213 function = WTF::bind(&MediaPlayerPrivateAVFoundationObjC::playbackTargetIsWirelessDidChange, m_callback); 3172 3214 #endif 3173 3215 } -
tags/Safari-601.1.22/Source/WebCore/testing/InternalSettings.cpp
r181285 r181431 98 98 , m_touchEventEmulationEnabled(settings.isTouchEventEmulationEnabled()) 99 99 #endif 100 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 101 , m_mediaPlaybackAllowsAirPlay(settings.mediaPlaybackAllowsAirPlay()) 102 #endif 100 103 { 101 104 } … … 202 205 , m_backup(page->settings()) 203 206 { 207 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 208 page->settings().setMediaPlaybackAllowsAirPlay(false); 209 #endif 204 210 } 205 211 -
tags/Safari-601.1.22/Source/WebCore/testing/InternalSettings.h
r181285 r181431 96 96 bool m_touchEventEmulationEnabled; 97 97 #endif 98 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 99 bool m_mediaPlaybackAllowsAirPlay; 100 #endif 98 101 }; 99 102 -
tags/Safari-601.1.22/Source/WebKit2/ChangeLog
r181364 r181431 1 2015-03-11 Babak Shafiei <bshafiei@apple.com> 2 3 Merge r181423. 4 5 2015-03-11 Eric Carlson <eric.carlson@apple.com> 6 7 [Mac] Update AirPlay handling 8 https://bugs.webkit.org/show_bug.cgi?id=142541 9 10 Reviewed by Sam Weinig. 11 12 * Shared/WebCoreArgumentCoders.h: 13 * Shared/mac/WebCoreArgumentCodersMac.mm: 14 (IPC::ArgumentCoder<AVPlaybackTarget>::encode): 15 (IPC::ArgumentCoder<AVPlaybackTarget>::decode): 16 * UIProcess/PageClient.h: 17 * UIProcess/WebAVPlaybackTargetPickerProxy.cpp: Added. 18 (WebKit::WebAVPlaybackTargetPickerProxy::WebAVPlaybackTargetPickerProxy): 19 (WebKit::WebAVPlaybackTargetPickerProxy::~WebAVPlaybackTargetPickerProxy): 20 (WebKit::WebAVPlaybackTargetPickerProxy::showPlaybackTargetPicker): 21 (WebKit::WebAVPlaybackTargetPickerProxy::startingMonitoringPlaybackTargets): 22 (WebKit::WebAVPlaybackTargetPickerProxy::stopMonitoringPlaybackTargets): 23 * UIProcess/WebAVPlaybackTargetPickerProxy.h: Added. 24 (WebKit::WebAVPlaybackTargetPickerProxy::Client::~Client): 25 * UIProcess/WebPageProxy.cpp: 26 (WebKit::WebPageProxy::devicePickerProxy): 27 (WebKit::WebPageProxy::showPlaybackTargetPicker): 28 (WebKit::WebPageProxy::startingMonitoringPlaybackTargets): 29 (WebKit::WebPageProxy::stopMonitoringPlaybackTargets): 30 (WebKit::WebPageProxy::didChoosePlaybackTarget): 31 (WebKit::WebPageProxy::externalOutputDeviceAvailableDidChange): 32 * UIProcess/WebPageProxy.h: 33 * UIProcess/WebPageProxy.messages.in: 34 * UIProcess/mac/PageClientImpl.h: 35 * UIProcess/mac/PageClientImpl.mm: 36 (WebKit::PageClientImpl::createPlaybackTargetPicker): 37 * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.h: Added. 38 * UIProcess/mac/WebAVPlaybackTargetPickerProxyMac.mm: Added. 39 (WebKit::WebAVPlaybackTargetPickerProxyMac::create): 40 (WebKit::WebAVPlaybackTargetPickerProxyMac::WebAVPlaybackTargetPickerProxyMac): 41 (WebKit::WebAVPlaybackTargetPickerProxyMac::~WebAVPlaybackTargetPickerProxyMac): 42 (WebKit::WebAVPlaybackTargetPickerProxyMac::outputeDeviceAvailabilityChangedTimerFired): 43 (WebKit::WebAVPlaybackTargetPickerProxyMac::availableDevicesDidChange): 44 (WebKit::WebAVPlaybackTargetPickerProxyMac::devicePicker): 45 (WebKit::WebAVPlaybackTargetPickerProxyMac::showPlaybackTargetPicker): 46 (WebKit::WebAVPlaybackTargetPickerProxyMac::currentDeviceDidChange): 47 (WebKit::WebAVPlaybackTargetPickerProxyMac::startingMonitoringPlaybackTargets): 48 (WebKit::WebAVPlaybackTargetPickerProxyMac::stopMonitoringPlaybackTargets): 49 (-[WebAVOutputDevicePickerMenuControllerHelper initWithCallback:]): 50 (-[WebAVOutputDevicePickerMenuControllerHelper clearCallback]): 51 (-[WebAVOutputDevicePickerMenuControllerHelper observeValueForKeyPath:ofObject:change:context:]): 52 * WebKit2.xcodeproj/project.pbxproj: 53 * WebProcess/WebCoreSupport/WebAVPlaybackTargetPicker.cpp: Added. 54 (WebKit::WebAVPlaybackTargetPicker::WebAVPlaybackTargetPicker): 55 (WebKit::WebAVPlaybackTargetPicker::showPlaybackDevicePicker): 56 (WebKit::WebAVPlaybackTargetPicker::configureWireLessTargetMonitoring): 57 (WebKit::WebAVPlaybackTargetPicker::addClient): 58 (WebKit::WebAVPlaybackTargetPicker::removeClient): 59 (WebKit::WebAVPlaybackTargetPicker::didChoosePlaybackTarget): 60 (WebKit::WebAVPlaybackTargetPicker::playbackTargetAvailabilityDidChange): 61 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 62 (WebKit::WebChromeClient::showPlaybackTargetPicker): 63 (WebKit::WebChromeClient::startingMonitoringPlaybackTargets): 64 (WebKit::WebChromeClient::stopMonitoringPlaybackTargets): 65 * WebProcess/WebCoreSupport/WebChromeClient.h: 66 * WebProcess/WebPage/WebPage.h: 67 * WebProcess/WebPage/WebPage.messages.in: 68 * WebProcess/WebPage/mac/WebPageMac.mm: 69 (WebKit::WebPage::playbackTargetSelected): 70 (WebKit::WebPage::playbackTargetAvailabilityDidChange): 71 * WebProcess/com.apple.WebProcess.sb.in: 72 1 73 2015-03-10 Antti Koivisto <antti@apple.com> 2 74 -
tags/Safari-601.1.22/Source/WebKit2/Shared/WebCoreArgumentCoders.h
r180985 r181431 116 116 #endif 117 117 118 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 119 namespace WebCore { 120 class MediaPlaybackTarget; 121 } 122 #endif 123 118 124 namespace IPC { 119 125 … … 455 461 }; 456 462 463 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 464 template<> struct ArgumentCoder<WebCore::MediaPlaybackTarget> { 465 static void encode(ArgumentEncoder&, const WebCore::MediaPlaybackTarget&); 466 static bool decode(ArgumentDecoder&, WebCore::MediaPlaybackTarget&); 467 }; 468 #endif 469 457 470 } // namespace IPC 458 471 -
tags/Safari-601.1.22/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
r180985 r181431 39 39 #import <WebCore/ResourceError.h> 40 40 #import <WebCore/ResourceRequest.h> 41 #import <WebCore/SoftLinking.h> 42 #import <objc/runtime.h> 41 43 42 44 #if USE(CFNETWORK) 43 45 #import <CFNetwork/CFURLRequest.h> 46 #endif 47 48 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 49 #import <WebCore/MediaPlaybackTarget.h> 44 50 #endif 45 51 … … 433 439 } 434 440 441 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 442 void ArgumentCoder<MediaPlaybackTarget>::encode(ArgumentEncoder& encoder, const MediaPlaybackTarget& target) 443 { 444 RetainPtr<NSMutableData> data = adoptNS([[NSMutableData alloc] init]); 445 RetainPtr<NSKeyedArchiver> archiver = adoptNS([[NSKeyedArchiver alloc] initForWritingWithMutableData:data.get()]); 446 [archiver setRequiresSecureCoding:YES]; 447 target.encode(archiver.get()); 448 [archiver finishEncoding]; 449 IPC::encode(encoder, reinterpret_cast<CFDataRef>(data.get())); 450 } 451 452 bool ArgumentCoder<MediaPlaybackTarget>::decode(ArgumentDecoder& decoder, MediaPlaybackTarget& target) 453 { 454 RetainPtr<CFDataRef> data; 455 if (!IPC::decode(decoder, data)) 456 return false; 457 458 RetainPtr<NSKeyedUnarchiver> unarchiver = adoptNS([[NSKeyedUnarchiver alloc] initForReadingWithData:(NSData *)data.get()]); 459 [unarchiver setRequiresSecureCoding:YES]; 460 if (!MediaPlaybackTarget::decode(unarchiver.get(), target)) 461 return false; 462 463 [unarchiver finishDecoding]; 464 return true; 465 } 466 #endif 467 435 468 } // namespace IPC -
tags/Safari-601.1.22/Source/WebKit2/UIProcess/PageClient.h
r181023 r181431 35 35 #include <wtf/Forward.h> 36 36 37 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 38 #include "WebMediaPlaybackTargetPickerProxy.h" 39 #endif 40 37 41 #if PLATFORM(COCOA) 38 42 #include "PluginComplexTextInputState.h" … … 314 318 virtual void didPerformActionMenuHitTest(const ActionMenuHitTestResult&, bool forImmediateAction, API::Object*) = 0; 315 319 #endif 320 321 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 322 virtual std::unique_ptr<WebMediaPlaybackTargetPickerProxy> createPlaybackTargetPicker(WebPageProxy*) = 0; 323 #endif 324 316 325 }; 317 326 -
tags/Safari-601.1.22/Source/WebKit2/UIProcess/WebPageProxy.cpp
r181317 r181431 5593 5593 } 5594 5594 5595 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 5596 5597 WebMediaPlaybackTargetPickerProxy& WebPageProxy::devicePickerProxy() 5598 { 5599 if (!m_playbackTargetPicker) 5600 m_playbackTargetPicker = m_pageClient.createPlaybackTargetPicker(this); 5601 5602 return *m_playbackTargetPicker.get(); 5603 } 5604 5605 void WebPageProxy::showPlaybackTargetPicker(const WebCore::FloatRect& rect, bool hasVideo) 5606 { 5607 devicePickerProxy().showPlaybackTargetPicker(m_pageClient.rootViewToScreen(IntRect(rect)), hasVideo); 5608 } 5609 5610 void WebPageProxy::startingMonitoringPlaybackTargets() 5611 { 5612 devicePickerProxy().startingMonitoringPlaybackTargets(); 5613 } 5614 5615 void WebPageProxy::stopMonitoringPlaybackTargets() 5616 { 5617 devicePickerProxy().stopMonitoringPlaybackTargets(); 5618 } 5619 5620 void WebPageProxy::didChoosePlaybackTarget(const WebCore::MediaPlaybackTarget& target) 5621 { 5622 if (!isValid()) 5623 return; 5624 5625 m_process->send(Messages::WebPage::PlaybackTargetSelected(target), m_pageID); 5626 } 5627 5628 void WebPageProxy::externalOutputDeviceAvailableDidChange(bool available) 5629 { 5630 if (!isValid()) 5631 return; 5632 5633 m_process->send(Messages::WebPage::PlaybackTargetAvailabilityDidChange(available), m_pageID); 5634 } 5635 5636 #endif 5637 5595 5638 } // namespace WebKit -
tags/Safari-601.1.22/Source/WebKit2/UIProcess/WebPageProxy.h
r181317 r181431 112 112 #endif 113 113 114 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 115 #include "WebMediaPlaybackTargetPickerProxy.h" 116 #endif 117 114 118 namespace API { 115 119 class ContextMenuClient; … … 258 262 #if ENABLE(INPUT_TYPE_COLOR) 259 263 , public WebColorPicker::Client 264 #endif 265 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 266 , public WebMediaPlaybackTargetPickerProxy::Client 260 267 #endif 261 268 , public WebPopupMenuProxy::Client … … 1000 1007 void logDiagnosticMessageWithValue(const String& message, const String& description, const String& value, bool shouldSample); 1001 1008 1009 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 1010 WebMediaPlaybackTargetPickerProxy& devicePickerProxy(); 1011 void showPlaybackTargetPicker(const WebCore::FloatRect&, bool hasVideo); 1012 void startingMonitoringPlaybackTargets(); 1013 void stopMonitoringPlaybackTargets(); 1014 1015 // WebMediaPlaybackTargetPickerProxy::Client 1016 virtual void didChoosePlaybackTarget(const WebCore::MediaPlaybackTarget&) override; 1017 virtual void externalOutputDeviceAvailableDidChange(bool) override; 1018 #endif 1019 1002 1020 private: 1003 1021 WebPageProxy(PageClient&, WebProcessProxy&, uint64_t pageID, const WebPageConfiguration&); … … 1663 1681 Vector<uint64_t> m_nextViewStateChangeCallbacks; 1664 1682 1683 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 1684 std::unique_ptr<WebMediaPlaybackTargetPickerProxy> m_playbackTargetPicker; 1685 #endif 1686 1665 1687 bool m_isPlayingAudio; 1666 1688 }; -
tags/Safari-601.1.22/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r181023 r181431 424 424 DidPerformActionMenuHitTest(struct WebKit::ActionMenuHitTestResult result, bool forImmediateAction, WebKit::UserData userData) 425 425 #endif 426 427 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 428 ShowPlaybackTargetPicker(WebCore::FloatRect pickerLocation, bool hasVideo) 429 StartingMonitoringPlaybackTargets() 430 StopMonitoringPlaybackTargets() 431 #endif 432 426 433 }
Note:
See TracChangeset
for help on using the changeset viewer.