Changeset 56415 in webkit


Ignore:
Timestamp:
Mar 23, 2010 2:15:40 PM (14 years ago)
Author:
eric@webkit.org
Message:

2010-03-23 Sergey Ulanov <sergeyu@chromium.org>

Reviewed by Dmitry Titov.

Changes needed to implement Show/Hide Controls command for <video> in
chrome: (1) added Controls action in WebMediaPlayerAction that toggles
controls for media player, (2) added MediaHasVideo in
WebContextMenuData so that controls can be made toggleable only for
video player but not for audio.
https://bugs.webkit.org/show_bug.cgi?id=36460

  • public/WebContextMenuData.h: (WebKit::WebContextMenuData::):
  • public/WebMediaPlayerAction.h: (WebKit::WebMediaPlayerAction::):
  • src/ContextMenuClientImpl.cpp: (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
  • src/WebViewImpl.cpp: (WebKit::WebViewImpl::performMediaPlayerAction):
Location:
trunk/WebKit/chromium
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r56410 r56415  
     12010-03-23  Sergey Ulanov  <sergeyu@chromium.org>
     2
     3        Reviewed by Dmitry Titov.
     4
     5        Changes needed to implement Show/Hide Controls command for <video> in
     6        chrome: (1) added Controls action in WebMediaPlayerAction that toggles
     7        controls for media player, (2) added MediaHasVideo in
     8        WebContextMenuData so that controls can be made toggleable only for
     9        video player but not for audio.
     10        https://bugs.webkit.org/show_bug.cgi?id=36460
     11
     12        * public/WebContextMenuData.h:
     13        (WebKit::WebContextMenuData::):
     14        * public/WebMediaPlayerAction.h:
     15        (WebKit::WebMediaPlayerAction::):
     16        * src/ContextMenuClientImpl.cpp:
     17        (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
     18        * src/WebViewImpl.cpp:
     19        (WebKit::WebViewImpl::performMediaPlayerAction):
     20
    1212010-03-23  Yury Semikhatsky  <yurys@chromium.org>
    222
  • trunk/WebKit/chromium/public/WebContextMenuData.h

    r55029 r56415  
    8484        MediaCanSave = 0x10,
    8585        MediaHasAudio = 0x20,
     86        MediaHasVideo = 0x40,
     87        MediaControls = 0x80,
    8688    };
    8789
  • trunk/WebKit/chromium/public/WebMediaPlayerAction.h

    r50690 r56415  
    3939        Play,
    4040        Mute,
    41         Loop
     41        Loop,
     42        Controls
    4243    };
    4344
  • trunk/WebKit/chromium/src/ContextMenuClientImpl.cpp

    r55029 r56415  
    182182        if (mediaElement->hasAudio())
    183183            data.mediaFlags |= WebContextMenuData::MediaHasAudio;
     184        if (mediaElement->hasVideo())
     185            data.mediaFlags |= WebContextMenuData::MediaHasVideo;
     186        if (mediaElement->controls())
     187            data.mediaFlags |= WebContextMenuData::MediaControls;
    184188    }
    185189
  • trunk/WebKit/chromium/src/WebViewImpl.cpp

    r56376 r56415  
    14531453        mediaElement->setLoop(action.enable);
    14541454        break;
     1455    case WebMediaPlayerAction::Controls:
     1456        mediaElement->setControls(action.enable);
     1457        break;
    14551458    default:
    14561459        ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.