Changeset 74228 in webkit


Ignore:
Timestamp:
Dec 16, 2010, 7:28:51 PM (15 years ago)
Author:
commit-queue@webkit.org
Message:

2010-12-16 Yi Shen <yi.4.shen@nokia.com>, Tor Arne Vestbo <tor.arne.vestbo@nokia.com>

Reviewed by Eric Carlson.

Provide an interface to require using fullscreen mediaplayer
https://bugs.webkit.org/show_bug.cgi?id=51133

Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit
to launch fullscreen video player for playing the html5 video. The
idea is that a browser vendor can specify this behavior through the
platform plugin or something else by using this interface.

No new tests because no client implements requiresFullscreenForVideoPlayback yet.

  • html/HTMLMediaElement.cpp: (WebCore::HTMLMediaElement::updatePlayState): (WebCore::HTMLMediaElement::exitFullscreen):
  • page/Chrome.cpp: (WebCore::Chrome::requiresFullscreenForVideoPlayback):
  • page/Chrome.h:
  • page/ChromeClient.h: (WebCore::ChromeClient::requiresFullscreenForVideoPlayback):
Location:
trunk/WebCore
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r74226 r74228  
     12010-12-16  Yi Shen  <yi.4.shen@nokia.com>, Tor Arne Vestbo <tor.arne.vestbo@nokia.com>
     2
     3        Reviewed by Eric Carlson.
     4
     5        Provide an interface to require using fullscreen mediaplayer
     6        https://bugs.webkit.org/show_bug.cgi?id=51133
     7
     8        Add ChromeClient::requiresFullscreenForVideoPlayback to require webkit
     9        to launch fullscreen video player for playing the html5 video. The
     10        idea is that a browser vendor can specify this behavior through the
     11        platform plugin or something else by using this interface.
     12
     13        No new tests because no client implements requiresFullscreenForVideoPlayback yet.
     14
     15        * html/HTMLMediaElement.cpp:
     16        (WebCore::HTMLMediaElement::updatePlayState):
     17        (WebCore::HTMLMediaElement::exitFullscreen):
     18        * page/Chrome.cpp:
     19        (WebCore::Chrome::requiresFullscreenForVideoPlayback):
     20        * page/Chrome.h:
     21        * page/ChromeClient.h:
     22        (WebCore::ChromeClient::requiresFullscreenForVideoPlayback):
     23
    1242010-12-16  Steve Block  <steveblock@google.com>
    225
  • trunk/WebCore/html/HTMLMediaElement.cpp

    r73957 r74228  
    21102110
    21112111        if (playerPaused) {
     2112            if (document() && document()->page() && document()->page()->chrome()->requiresFullscreenForVideoPlayback() && !m_isFullscreen)
     2113                enterFullscreen();
     2114
    21122115            // Set rate before calling play in case the rate was set before the media engine was setup.
    21132116            // The media engine should just stash the rate since it isn't already playing.
     
    24252428    m_isFullscreen = false;
    24262429    if (document() && document()->page()) {
     2430        if (document()->page()->chrome()->requiresFullscreenForVideoPlayback())
     2431            pauseInternal();
    24272432        document()->page()->chrome()->client()->exitFullscreenForNode(this);
    24282433        scheduleEvent(eventNames().webkitendfullscreenEvent);
  • trunk/WebCore/page/Chrome.cpp

    r71541 r74228  
    522522#endif
    523523
     524bool Chrome::requiresFullscreenForVideoPlayback()
     525{
     526    return m_client->requiresFullscreenForVideoPlayback();
     527}
     528
    524529} // namespace WebCore
  • trunk/WebCore/page/Chrome.h

    r73163 r74228  
    150150        void dispatchViewportDataDidChange(const ViewportArguments&) const;
    151151
     152        bool requiresFullscreenForVideoPlayback();
     153
    152154#if PLATFORM(MAC)
    153155        void focusNSView(NSView*);
  • trunk/WebCore/page/ChromeClient.h

    r73163 r74228  
    257257        virtual void enterFullscreenForNode(Node*) { }
    258258        virtual void exitFullscreenForNode(Node*) { }
     259        virtual bool requiresFullscreenForVideoPlayback() { return false; }
    259260
    260261#if ENABLE(FULLSCREEN_API)
Note: See TracChangeset for help on using the changeset viewer.