diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:52:44 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-12 19:52:44 +0000 |
commit | e626d7f115a1319421d1e2d5da85b6f0bd66877f (patch) | |
tree | cd6c50923fbb063c1980315c2db5447fbfee0086 /webkit/glue | |
parent | f1f188943ba5fd66cc54c813d9ed27596a7b29e9 (diff) | |
download | chromium_src-e626d7f115a1319421d1e2d5da85b6f0bd66877f.zip chromium_src-e626d7f115a1319421d1e2d5da85b6f0bd66877f.tar.gz chromium_src-e626d7f115a1319421d1e2d5da85b6f0bd66877f.tar.bz2 |
Remove Playback Rate from the context menu.
This feature is better implemented as an extension rather than being put into
the absolute-core UI.
Review URL: http://codereview.chromium.org/164301
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23208 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/context_menu.h | 14 | ||||
-rw-r--r-- | webkit/glue/context_menu_client_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webview_impl.cc | 4 |
3 files changed, 4 insertions, 18 deletions
diff --git a/webkit/glue/context_menu.h b/webkit/glue/context_menu.h index 620338a..975ad275 100644 --- a/webkit/glue/context_menu.h +++ b/webkit/glue/context_menu.h @@ -82,11 +82,8 @@ struct ContextMenuMediaParams { // playing, muted, etc. int32 player_state; - // The current playback rate for this media element. - double playback_rate; - ContextMenuMediaParams() - : player_state(NO_STATE), playback_rate(1.0f) { + : player_state(NO_STATE) { } }; @@ -166,19 +163,14 @@ struct MediaPlayerAction { UNMUTE = 0x8, LOOP = 0x10, NO_LOOP = 0x20, - SET_PLAYBACK_RATE = 0x40, }; // A bitfield representing the actions that the context menu should execute // on the originating node. int32 command; - // The new playback rate to set if the action is SET_PLAYBACK_RATE. - double playback_rate; - - MediaPlayerAction() : command(NONE), playback_rate(1.0f) {} - explicit MediaPlayerAction(int c) : command(c), playback_rate(1.0f) {} - MediaPlayerAction(int c, double rate) : command(c), playback_rate(rate) {} + MediaPlayerAction() : command(NONE) {} + explicit MediaPlayerAction(int c) : command(c) {} }; #endif // WEBKIT_GLUE_CONTEXT_NODE_TYPES_H__ diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc index 210fb24..5ad232d 100644 --- a/webkit/glue/context_menu_client_impl.cc +++ b/webkit/glue/context_menu_client_impl.cc @@ -180,7 +180,7 @@ WebCore::PlatformMenuDescription node_type.type |= ContextNodeType::IMAGE; } else if (!r.absoluteMediaURL().isEmpty()) { src_url = r.absoluteMediaURL(); - + // We know that if absoluteMediaURL() is not empty, then this is a media // element. WebCore::HTMLMediaElement* media_element = @@ -191,8 +191,6 @@ WebCore::PlatformMenuDescription node_type.type |= ContextNodeType::AUDIO; } - media_params.playback_rate = media_element->playbackRate(); - if (media_element->paused()) { media_params.player_state |= ContextMenuMediaParams::PAUSED; } diff --git a/webkit/glue/webview_impl.cc b/webkit/glue/webview_impl.cc index 2a646e8..6d8f05a 100644 --- a/webkit/glue/webview_impl.cc +++ b/webkit/glue/webview_impl.cc @@ -1820,10 +1820,6 @@ void WebViewImpl::MediaPlayerActionAt(int x, if (action.command & MediaPlayerAction::NO_LOOP) { media_element->setLoop(false); } - if (action.command & MediaPlayerAction::SET_PLAYBACK_RATE) { - // TODO(ajwong): We should test for overflow. - media_element->setPlaybackRate(static_cast<float>(action.playback_rate)); - } } } |