[webkit-reviews] review denied: [Bug 71341] Implement MediaController. : [Attachment 113339] Add Clock, PlatformClockCA, and PlatformClockPOSIX

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 2 14:49:49 PDT 2011


Adam Barth <abarth at webkit.org> has denied Jer Noble <jer.noble at apple.com>'s
request for review:
Bug 71341: Implement MediaController.
https://bugs.webkit.org/show_bug.cgi?id=71341

Attachment 113339: Add Clock, PlatformClockCA, and PlatformClockPOSIX
https://bugs.webkit.org/attachment.cgi?id=113339&action=review

------- Additional Comments from Adam Barth <abarth at webkit.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=113339&action=review


We should be able to do this without virtual functions.

> Source/WebCore/platform/Clock.cpp:44
> +PassRefPtr<Clock> Clock::create()
> +{
> +#if USE(COREAUDIO)
> +    return adoptRef(new PlatformClockCA());
> +#else
> +    return adoptRef(new PlatformClockPOSIX());
> +#endif
> +}

Would it make sense to move Clock::create to PlatformClockCA.cpp and
PlatformClockPOSIX.cpp, respectively?

> Source/WebCore/platform/Clock.h:47
> +    virtual void setCurrentTime(float) = 0;
> +    virtual float currentTime() const = 0;
> +
> +    virtual void setPlayRate(float) = 0;
> +    virtual float playRate() const = 0;
> +
> +    virtual void start() = 0;
> +    virtual void stop() = 0;
> +    virtual bool isRunning() const = 0;

Why virtual functions?	If only one implementation will be linked in at a time,
there's no need for virtual functions.


More information about the webkit-reviews mailing list