Changeset 181442 in webkit
- Timestamp:
- Mar 12, 2015 10:18:31 AM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r181439 r181442 1 2015-03-12 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] Update AirPlay handling 4 https://bugs.webkit.org/show_bug.cgi?id=142541 5 6 Unreviewed, respond to post-review comments. 7 8 * dom/Document.cpp: 9 (WebCore::Document::didChoosePlaybackTarget): 10 * page/ChromeClient.h: 11 * page/Page.cpp: 12 (WebCore::Page::showPlaybackTargetPicker): 13 (WebCore::Page::didChoosePlaybackTarget): 14 (WebCore::Page::configurePlaybackTargetMonitoring): 15 1 16 2015-03-12 Csaba Osztrogonác <ossy@webkit.org> 2 17 -
trunk/Source/WebCore/dom/Document.cpp
r181423 r181442 6528 6528 } 6529 6529 6530 // Notify the client that requested the chooser last because if more than one 6531 // is playing, only the last one to set the context will actually get to play 6532 // to the external device. 6530 6533 if (clientThatRequestedPicker) 6531 6534 clientThatRequestedPicker->didChoosePlaybackTarget(device); -
trunk/Source/WebCore/page/ChromeClient.h
r181423 r181442 449 449 450 450 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 451 virtual void showPlaybackTargetPicker(const WebCore::IntPoint&, bool ) { }451 virtual void showPlaybackTargetPicker(const WebCore::IntPoint&, bool /* isVideo */) { } 452 452 virtual void startingMonitoringPlaybackTargets() { } 453 453 virtual void stopMonitoringPlaybackTargets() { } -
trunk/Source/WebCore/page/Page.cpp
r181423 r181442 1701 1701 void Page::showPlaybackTargetPicker(Document* document, const WebCore::IntPoint& location, bool isVideo) 1702 1702 { 1703 1704 1703 m_documentRequestingPlaybackTargetPicker = document; 1704 1705 1705 #if PLATFORM(IOS) 1706 1706 // FIXME: refactor iOS implementation. … … 1726 1726 } 1727 1727 1728 // Notify the document that requested the chooser last because if more than one element 1729 // is playing the last one to set the context will be the one that actually gets to 1730 // play to the external device. 1728 1731 if (documentThatRequestedPicker) 1729 1732 documentThatRequestedPicker->didChoosePlaybackTarget(target); … … 1753 1756 m_requiresPlaybackTargetMonitoring = monitoringRequired; 1754 1757 1755 1756 1758 if (monitoringRequired) 1757 1759 chrome().client().startingMonitoringPlaybackTargets(); -
trunk/Source/WebKit2/ChangeLog
r181424 r181442 1 2015-03-12 Eric Carlson <eric.carlson@apple.com> 2 3 [Mac] Update AirPlay handling 4 https://bugs.webkit.org/show_bug.cgi?id=142541 5 6 Unreviewed, respond to post-review comments and add previously reviewed changes 7 missed by a bungled merge. 8 9 * Shared/mac/WebCoreArgumentCodersMac.mm: 10 * UIProcess/WebMediaPlaybackTargetPickerProxy.cpp: 11 (WebKit::WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy): 12 * UIProcess/mac/PageClientImpl.h: 13 * UIProcess/mac/PageClientImpl.mm: 14 (WebKit::PageClientImpl::createPlaybackTargetPicker): 15 * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.h: Added. 16 * UIProcess/mac/WebMediaPlaybackTargetPickerProxyMac.mm: Added. 17 * WebKit2.xcodeproj/project.pbxproj: 18 * WebProcess/WebCoreSupport/WebChromeClient.cpp: 19 * WebProcess/WebCoreSupport/WebChromeClient.h: 20 * WebProcess/WebPage/WebPage.h: 21 * WebProcess/WebPage/WebPage.messages.in: 22 * WebProcess/WebPage/mac/WebPageMac.mm: 23 * WebProcess/com.apple.WebProcess.sb.in: 24 1 25 2015-03-11 Antti Koivisto <antti@apple.com> 2 26 -
trunk/Source/WebKit2/Shared/mac/WebCoreArgumentCodersMac.mm
r181423 r181442 39 39 #import <WebCore/ResourceError.h> 40 40 #import <WebCore/ResourceRequest.h> 41 #import <WebCore/SoftLinking.h>42 #import <objc/runtime.h>43 41 44 42 #if USE(CFNETWORK) -
trunk/Source/WebKit2/UIProcess/WebMediaPlaybackTargetPickerProxy.cpp
r181423 r181442 38 38 WebMediaPlaybackTargetPickerProxy::~WebMediaPlaybackTargetPickerProxy() 39 39 { 40 m_client = 0;40 m_client = nullptr; 41 41 } 42 42 -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.h
r181023 r181442 205 205 std::unique_ptr<WebCore::AlternativeTextUIController> m_alternativeTextUIController; 206 206 #endif 207 208 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 209 virtual std::unique_ptr<WebMediaPlaybackTargetPickerProxy> createPlaybackTargetPicker(WebPageProxy*) override; 210 #endif 207 211 }; 208 212 -
trunk/Source/WebKit2/UIProcess/mac/PageClientImpl.mm
r181023 r181442 71 71 #endif 72 72 73 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 74 #include "WebMediaPlaybackTargetPickerProxyMac.h" 75 #endif 76 73 77 @interface NSApplication (WebNSApplicationDetails) 74 78 - (NSCursor *)_cursorRectCursor; … … 789 793 } 790 794 795 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 796 std::unique_ptr<WebMediaPlaybackTargetPickerProxy> PageClientImpl::createPlaybackTargetPicker(WebPageProxy* page) 797 { 798 return WebMediaPlaybackTargetPickerProxyMac::create(*page); 799 } 800 #endif 791 801 792 802 } // namespace WebKit -
trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
r181252 r181442 77 77 00B9661A18E25AE100CE1F88 /* FindClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 00B9661818E25AE100CE1F88 /* FindClient.h */; }; 78 78 076E884E1A13CADF005E90FC /* APIContextMenuClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */; }; 79 0792164C1AA5501900A3C049 /* WebMediaPlaybackTargetPickerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 079216481AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.cpp */; }; 80 0792164D1AA5501F00A3C049 /* WebMediaPlaybackTargetPickerProxy.h in Headers */ = {isa = PBXBuildFile; fileRef = 079216491AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.h */; }; 81 079216501AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 0792164E1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.h */; }; 82 079216511AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0792164F1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.mm */; }; 79 83 0F0C365818C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm in Sources */ = {isa = PBXBuildFile; fileRef = 0F0C365718C051BA00F607D7 /* RemoteLayerTreeHostIOS.mm */; }; 80 84 0F0C365A18C0555800F607D7 /* LayerRepresentation.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F0C365918C0555800F607D7 /* LayerRepresentation.h */; }; … … 2159 2163 076E884D1A13CADF005E90FC /* APIContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIContextMenuClient.h; sourceTree = "<group>"; }; 2160 2164 076E884F1A13CBC6005E90FC /* APIInjectedBundlePageContextMenuClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIInjectedBundlePageContextMenuClient.h; sourceTree = "<group>"; }; 2165 079216481AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebMediaPlaybackTargetPickerProxy.cpp; sourceTree = "<group>"; }; 2166 079216491AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMediaPlaybackTargetPickerProxy.h; sourceTree = "<group>"; }; 2167 0792164E1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebMediaPlaybackTargetPickerProxyMac.h; sourceTree = "<group>"; }; 2168 0792164F1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebMediaPlaybackTargetPickerProxyMac.mm; sourceTree = "<group>"; }; 2161 2169 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; }; 2162 2170 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; }; … … 6146 6154 512E3521130B550100ABD19A /* WebApplicationCacheManagerProxy.h */, 6147 6155 512E35F0130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in */, 6156 079216481AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.cpp */, 6157 079216491AA54E9D00A3C049 /* WebMediaPlaybackTargetPickerProxy.h */, 6148 6158 BC72BA1B11E64907001EB4EA /* WebBackForwardList.cpp */, 6149 6159 BC72BA1C11E64907001EB4EA /* WebBackForwardList.h */, … … 7004 7014 2D6CD117189058A500E5A4A0 /* ViewSnapshotStore.h */, 7005 7015 2D6CD118189058A500E5A4A0 /* ViewSnapshotStore.mm */, 7016 0792164E1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.h */, 7017 0792164F1AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.mm */, 7006 7018 728E86EF1795188C0087879E /* WebColorPickerMac.h */, 7007 7019 728E86F01795188C0087879E /* WebColorPickerMac.mm */, … … 8096 8108 3F889D15188778C900FEADAF /* WebVideoFullscreenManagerProxy.h in Headers */, 8097 8109 29CD55AA128E294F00133C85 /* WKAccessibilityWebPageObjectBase.h in Headers */, 8110 0792164D1AA5501F00A3C049 /* WebMediaPlaybackTargetPickerProxy.h in Headers */, 8098 8111 29232DF418B29D6800D0596F /* WKAccessibilityWebPageObjectMac.h in Headers */, 8099 8112 2D0730A319F9C7DA00E9D9C4 /* WKActionMenuController.h in Headers */, … … 8285 8298 1AB8A1F618400B9D00E9AE69 /* WKPageFindMatchesClient.h in Headers */, 8286 8299 1AB8A1F018400B0000E9AE69 /* WKPageFormClient.h in Headers */, 8300 079216501AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.h in Headers */, 8287 8301 BC7B633712A45ABA00D174A4 /* WKPageGroup.h in Headers */, 8288 8302 1AB8A1EC1840080900E9AE69 /* WKPageLoaderClient.h in Headers */, … … 9550 9564 0FCB4E4718BBE044000FCFC9 /* PageClientImplIOS.mm in Sources */, 9551 9565 1AC7537B183A9FDB0072CB15 /* PageLoadState.cpp in Sources */, 9566 079216511AA5528A00A3C049 /* WebMediaPlaybackTargetPickerProxyMac.mm in Sources */, 9552 9567 C574A58212E66681002DFE98 /* PasteboardTypes.mm in Sources */, 9553 9568 E19582D6153CC05400B60875 /* PDFKitImports.mm in Sources */, … … 9747 9762 2D28F3E61885CCC1004B9EAE /* WebEditorClientIOS.mm in Sources */, 9748 9763 C5237F6012441CA300780472 /* WebEditorClientMac.mm in Sources */, 9764 0792164C1AA5501900A3C049 /* WebMediaPlaybackTargetPickerProxy.cpp in Sources */, 9749 9765 BC111AE0112F5BC200337BAB /* WebErrorsMac.mm in Sources */, 9750 9766 C0337DAE127A24FE008FF4F4 /* WebEvent.cpp in Sources */, -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
r181408 r181442 1115 1115 } 1116 1116 1117 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 1118 void WebChromeClient::showPlaybackTargetPicker(const WebCore::IntPoint& position, bool isVideo) 1119 { 1120 FrameView* frameView = m_page->mainFrame()->view(); 1121 FloatRect rect(frameView->contentsToRootView(frameView->windowToContents(position)), FloatSize()); 1122 m_page->send(Messages::WebPageProxy::ShowPlaybackTargetPicker(rect, isVideo)); 1123 } 1124 1125 void WebChromeClient::startingMonitoringPlaybackTargets() 1126 { 1127 m_page->send(Messages::WebPageProxy::StartingMonitoringPlaybackTargets()); 1128 } 1129 1130 void WebChromeClient::stopMonitoringPlaybackTargets() 1131 { 1132 m_page->send(Messages::WebPageProxy::StopMonitoringPlaybackTargets()); 1133 } 1134 #endif 1135 1136 1117 1137 } // namespace WebKit -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h
r181408 r181442 313 313 virtual void handleAutoFillButtonClick(WebCore::HTMLInputElement&) override; 314 314 315 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 316 virtual void showPlaybackTargetPicker(const WebCore::IntPoint&, bool) override; 317 virtual void startingMonitoringPlaybackTargets() override; 318 virtual void stopMonitoringPlaybackTargets() override; 319 #endif 320 315 321 String m_cachedToolTip; 316 322 mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r180837 r181442 127 127 class IntPoint; 128 128 class KeyboardEvent; 129 class MediaPlaybackTarget; 129 130 class Page; 130 131 class PrintContext; … … 143 144 144 145 namespace WebKit { 145 146 146 class DrawingArea; 147 147 class InjectedBundleBackForwardList; … … 1094 1094 void setShouldDispatchFakeMouseMoveEvents(bool dispatch) { m_shouldDispatchFakeMouseMoveEvents = dispatch; } 1095 1095 1096 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 1097 void playbackTargetSelected(const WebCore::MediaPlaybackTarget& outputDevice) const; 1098 void playbackTargetAvailabilityDidChange(bool); 1099 #endif 1100 1096 1101 uint64_t m_pageID; 1097 1102 -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r180768 r181442 412 412 413 413 SetShouldDispatchFakeMouseMoveEvents(bool shouldDispatchFakeMouseMoveEvents) 414 415 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 416 PlaybackTargetSelected(WebCore::MediaPlaybackTarget target) 417 PlaybackTargetAvailabilityDidChange(bool available) 418 #endif 419 414 420 } -
trunk/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
r180768 r181442 88 88 #import <WebKitSystemInterface.h> 89 89 90 #if ENABLE(WIRELESS_PLAYBACK_TARGET) 91 #include <WebCore/MediaPlaybackTarget.h> 92 #endif 93 90 94 using namespace WebCore; 91 95 … … 1188 1192 } 1189 1193 1194 #if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) 1195 void WebPage::playbackTargetSelected(const WebCore::MediaPlaybackTarget& playbackTarget) const 1196 { 1197 MediaPlaybackTarget nonConstTarget(playbackTarget.devicePickerContext()); 1198 m_page->didChoosePlaybackTarget(nonConstTarget); 1199 } 1200 1201 void WebPage::playbackTargetAvailabilityDidChange(bool changed) 1202 { 1203 m_page->playbackTargetAvailabilityDidChange(changed); 1204 } 1205 #endif 1206 1207 1190 1208 } // namespace WebKit 1191 1209 -
trunk/Source/WebKit2/WebProcess/com.apple.WebProcess.sb.in
r179491 r181442 298 298 (home-subpath "/Library/Keyboard Layouts") 299 299 (home-subpath "/Library/Input Methods")) 300 301 ;; AirPlay 302 ;; FIXME: remove this as described in rdar://19869448 303 (allow mach-lookup 304 (global-name "com.apple.coremedia.endpoint.airplayuiagent") 305 (global-name "com.apple.coremedia.endpointstream.airplayuiagent") 306 (global-name "com.apple.coremedia.endpointplaybacksession.airplayuiagent") 307 (global-name "com.apple.coremedia.endpointpicker")) 308 309 ;; AirPlay 310 (allow mach-lookup 311 (global-name "com.apple.coremedia.endpoint.xpc") 312 (global-name "com.apple.coremedia.endpointstream.xpc") 313 (global-name "com.apple.coremedia.endpointplaybacksession.xpc") 314 (global-name "com.apple.coremedia.endpointpicker.xpc"))
Note: See TracChangeset
for help on using the changeset viewer.