Bug 142940

Summary: [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1
Product: WebKit Reporter: Eric Carlson <eric.carlson>
Component: MediaAssignee: Eric Carlson <eric.carlson>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, jer.noble, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Proposed patch.
none
Updated patch. sam: review+

Eric Carlson
Reported 2015-03-21 16:19:54 PDT
Make it work for WebKit 1 clients.
Attachments
Proposed patch. (18.97 KB, patch)
2015-03-21 16:50 PDT, Eric Carlson
no flags
Updated patch. (18.98 KB, patch)
2015-03-21 19:53 PDT, Eric Carlson
sam: review+
Eric Carlson
Comment 1 2015-03-21 16:21:37 PDT
Eric Carlson
Comment 2 2015-03-21 16:50:56 PDT
Created attachment 249178 [details] Proposed patch.
Eric Carlson
Comment 3 2015-03-21 19:53:51 PDT
Created attachment 249187 [details] Updated patch.
Sam Weinig
Comment 4 2015-03-22 10:44:05 PDT
Comment on attachment 249187 [details] Updated patch. View in context: https://bugs.webkit.org/attachment.cgi?id=249187&action=review > Source/WebKit/mac/WebView/WebViewData.h:152 > +#if ENABLE(WIRELESS_PLAYBACK_TARGET) && !PLATFORM(IOS) > +class WebMediaPlaybackTargetPicker : public WebCore::MediaPlaybackTargetPicker::Client { > +public: > + static std::unique_ptr<WebMediaPlaybackTargetPicker> create(WebCore::Page&); > + > + explicit WebMediaPlaybackTargetPicker(WebCore::Page&); > + virtual ~WebMediaPlaybackTargetPicker() { } > + > + void showPlaybackTargetPicker(const WebCore::FloatRect&, bool /* hasVideo */); > + void startingMonitoringPlaybackTargets(); > + void stopMonitoringPlaybackTargets(); > + > + // WebCore::MediaPlaybackTargetPicker::Client > + virtual void didChoosePlaybackTarget(const WebCore::MediaPlaybackTarget&) override; > + virtual void externalOutputDeviceAvailableDidChange(bool) override; > + > + void invalidate(); > + > +private: > + WebCore::MediaPlaybackTargetPicker& targetPicker(); > + > + WebCore::Page* m_page; > + std::unique_ptr<WebCore::MediaPlaybackTargetPicker> m_targetPicker; > +}; > +#endif I would put this in its own file. > Source/WebKit/mac/WebView/WebViewData.mm:86 > +std::unique_ptr<WebMediaPlaybackTargetPicker> WebMediaPlaybackTargetPicker::create(WebCore::Page& page) > +{ > + return std::make_unique<WebMediaPlaybackTargetPicker>(page); > +} > + This (and the rest of the class, should go in its own file.
Eric Carlson
Comment 5 2015-03-22 18:13:03 PDT
(In reply to comment #4) > Comment on attachment 249187 [details] > Updated patch. > > This (and the rest of the class, should go in its own file. Done, thanks!
Eric Carlson
Comment 6 2015-03-22 18:13:27 PDT
Alexey Proskuryakov
Comment 7 2015-03-22 23:59:22 PDT
Note You need to log in before you can comment on or make changes to this bug.