Summary: | [Mac] Enable WIRELESS_PLAYBACK_TARGET for WK1 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Eric Carlson <eric.carlson> | ||||||
Component: | Media | Assignee: | 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
Eric Carlson
2015-03-21 16:19:54 PDT
Created attachment 249178 [details]
Proposed patch.
Created attachment 249187 [details]
Updated patch.
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. (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! Committed r181838 - https://trac.webkit.org/r181838 Build fix in http://trac.webkit.org/r181846 |