Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(190)

Issue 149604: Begin implementation of the context menu for Video and Audio tags. (Closed)

Created:
11 years, 5 months ago by awong
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com, fbarchard, kylep
Visibility:
Public.

Description

Begin implementation of the context menu for Video and Audio tags. This code should enable the creation of a basic context menu for the Video and Audio tags. The actions for fullscreen, save screenshot, loop, and set playback rate are not yet implemented. BUG=15686 TEST=None

Patch Set 1 #

Total comments: 31

Patch Set 2 : Address andrew and darin's comments. #

Total comments: 1

Patch Set 3 : Play/Pause, Mute/Unmute! #

Total comments: 19

Patch Set 4 : Fix style issues. #

Patch Set 5 : remove unintended patch #

Patch Set 6 : Fix unittest #

Patch Set 7 : Rebased #

Patch Set 8 : Fix small style issues. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+385 lines, -45 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 1 chunk +61 lines, -0 lines 0 comments Download
M chrome/browser/renderer_host/render_view_host.cc View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.h View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download
M chrome/browser/tab_contents/render_view_context_menu.cc View 1 2 3 4 5 6 10 chunks +152 lines, -12 lines 0 comments Download
M chrome/common/render_messages.h View 1 2 4 chunks +19 lines, -3 lines 0 comments Download
M chrome/renderer/render_view.h View 1 2 3 4 5 6 7 2 chunks +3 lines, -1 line 0 comments Download
M chrome/renderer/render_view.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M webkit/api/public/WebMediaPlayer.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/api/src/WebMediaPlayerClientImpl.h View 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/api/src/WebMediaPlayerClientImpl.cpp View 1 1 chunk +14 lines, -0 lines 0 comments Download
M webkit/glue/context_menu.h View 1 2 3 5 chunks +44 lines, -3 lines 0 comments Download
M webkit/glue/context_menu_client_impl.cc View 1 2 3 4 chunks +43 lines, -7 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M webkit/glue/webmediaplayer_impl.cc View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M webkit/glue/webview_delegate.h View 1 2 3 4 5 6 4 chunks +6 lines, -1 line 0 comments Download
M webkit/tools/test_shell/test_webview_delegate.h View 6 2 chunks +2 lines, -0 lines 0 comments Download
M webkit/tools/test_shell/test_webview_delegate.cc View 6 7 1 chunk +15 lines, -13 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
awong
Here's the chromium side of the context menu code. I still haven't figured out how ...
11 years, 5 months ago (2009-07-14 07:26:00 UTC) #1
scherkus (not reviewing)
First pass, I can't comment as to whether the style for the IPC/context menu stuff ...
11 years, 5 months ago (2009-07-14 19:10:36 UTC) #2
scherkus (not reviewing)
fixed alpha's email address
11 years, 5 months ago (2009-07-14 19:11:33 UTC) #3
darin (slow to review)
http://codereview.chromium.org/149604/diff/1/10 File webkit/api/src/WebMediaPlayerClientImpl.cpp (right): http://codereview.chromium.org/149604/diff/1/10#newcode204 Line 204: bool WebMediaPlayerClientImpl::supportsFullscreen() const { nit: "{" should be ...
11 years, 5 months ago (2009-07-14 21:38:55 UTC) #4
awong
This addresses the specific comments from Andrew and Darin. The other comments from the UI ...
11 years, 5 months ago (2009-07-15 02:53:13 UTC) #5
scherkus (not reviewing)
again, a little clueless but it LGTM one nit on a comment, with a pun ...
11 years, 5 months ago (2009-07-15 20:51:21 UTC) #6
awong
one sec...adding play/pause mute/unmute! Will upload new Cl in a few mins. On Wed, Jul ...
11 years, 5 months ago (2009-07-15 20:57:11 UTC) #7
awong
Okay, ready for final review.
11 years, 5 months ago (2009-07-15 21:43:34 UTC) #8
scherkus (not reviewing)
bunch of style nits, but LGTM http://codereview.chromium.org/149604/diff/1029/60 File chrome/browser/tab_contents/render_view_context_menu.cc (right): http://codereview.chromium.org/149604/diff/1029/60#newcode123 Line 123: void RenderViewContextMenu::AppendAudioItems(ContextMenuMediaParams ...
11 years, 5 months ago (2009-07-16 00:08:51 UTC) #9
awong
11 years, 5 months ago (2009-07-16 00:17:50 UTC) #10
fixed style issues. committing.

http://codereview.chromium.org/149604/diff/1029/60
File chrome/browser/tab_contents/render_view_context_menu.cc (right):

http://codereview.chromium.org/149604/diff/1029/60#newcode123
Line 123: void RenderViewContextMenu::AppendAudioItems(ContextMenuMediaParams
media_params) {
On 2009/07/16 00:08:51, scherkus wrote:
> over 80 chars

Done.

http://codereview.chromium.org/149604/diff/1029/60#newcode131
Line 131: void RenderViewContextMenu::AppendVideoItems(ContextMenuMediaParams
media_params) {
On 2009/07/16 00:08:51, scherkus wrote:
> over 80 chars

Done.

http://codereview.chromium.org/149604/diff/1029/60#newcode141
Line 141: void RenderViewContextMenu::AppendMediaItems(ContextMenuMediaParams
media_params) {
On 2009/07/16 00:08:51, scherkus wrote:
> over 80 chars

Done.

http://codereview.chromium.org/149604/diff/1029/68
File webkit/glue/context_menu.h (right):

http://codereview.chromium.org/149604/diff/1029/68#newcode72
Line 72: enum PlayerState {
On 2009/07/16 00:08:51, scherkus wrote:
> throwing a crazy idea out here:
> 
> does it make sense to have some inline functions that check for these state
> bits?
> 
> bool IsLooping() { return player_state & PLAYER_LOOP; }
> 
> that kind of stuff.  I'm on the fence and don't really care myself.

Since it's a struct, I would like to avoid behavior.  If it starts getting more
complicated, we can think extracting it later, but a single bitmask isn't sooo
bad I don't think.

http://codereview.chromium.org/149604/diff/1029/68#newcode121
Line 121: // This is the URL of the top level page that the context menu was
invoked
On 2009/07/16 00:08:51, scherkus wrote:
> extra space

Done.

http://codereview.chromium.org/149604/diff/1029/69
File webkit/glue/context_menu_client_impl.cc (right):

http://codereview.chromium.org/149604/diff/1029/69#newcode196
Line 196: media_params.player_state |= ContextMenuMediaParams::PLAYER_PAUSED;
On 2009/07/16 00:08:51, scherkus wrote:
> over indented

Done.

http://codereview.chromium.org/149604/diff/1029/69#newcode199
Line 199: media_params.player_state |= ContextMenuMediaParams::PLAYER_MUTED;
On 2009/07/16 00:08:51, scherkus wrote:
> over indented

Done.

http://codereview.chromium.org/149604/diff/1029/69#newcode202
Line 202: media_params.player_state |= ContextMenuMediaParams::PLAYER_LOOP;
On 2009/07/16 00:08:51, scherkus wrote:
> over indented

Done.

http://codereview.chromium.org/149604/diff/1029/69#newcode205
Line 205: media_params.player_state |= ContextMenuMediaParams::PLAYER_CAN_SAVE;
On 2009/07/16 00:08:51, scherkus wrote:
> over indented

Done.

Powered by Google App Engine
This is Rietveld 408576698