diff options
author | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 03:23:46 +0000 |
---|---|---|
committer | ajwong@chromium.org <ajwong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-17 03:23:46 +0000 |
commit | 574a1d691c71e833638ccb1ca395dfa20c6835a4 (patch) | |
tree | 1d5f63a520c6b87fd74a19d57e9eaf4737bdd4fc /chrome/common | |
parent | 91cea0e774541297a46197d87e486cf8a4199775 (diff) | |
download | chromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.zip chromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.tar.gz chromium_src-574a1d691c71e833638ccb1ca395dfa20c6835a4.tar.bz2 |
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
Review URL: http://codereview.chromium.org/149604
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20931 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r-- | chrome/common/render_messages.h | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h index c887d40..41b9466 100644 --- a/chrome/common/render_messages.h +++ b/chrome/common/render_messages.h @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. +// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -820,6 +820,20 @@ struct ParamTraits<ViewHostMsg_FrameNavigate_Params> { }; template <> +struct ParamTraits<ContextMenuMediaParams> { + typedef ContextMenuMediaParams param_type; + static void Write(Message* m, const param_type& p) { + WriteParam(m, p.player_state); + WriteParam(m, p.playback_rate); + } + static bool Read(const Message* m, void** iter, param_type* p) { + return + ReadParam(m, iter, &p->player_state) && + ReadParam(m, iter, &p->playback_rate); + } +}; + +template <> struct ParamTraits<ContextMenuParams> { typedef ContextMenuParams param_type; static void Write(Message* m, const param_type& p) { @@ -828,9 +842,10 @@ struct ParamTraits<ContextMenuParams> { WriteParam(m, p.y); WriteParam(m, p.link_url); WriteParam(m, p.unfiltered_link_url); - WriteParam(m, p.image_url); + WriteParam(m, p.src_url); WriteParam(m, p.page_url); WriteParam(m, p.frame_url); + WriteParam(m, p.media_params); WriteParam(m, p.selection_text); WriteParam(m, p.misspelled_word); WriteParam(m, p.dictionary_suggestions); @@ -846,9 +861,10 @@ struct ParamTraits<ContextMenuParams> { ReadParam(m, iter, &p->y) && ReadParam(m, iter, &p->link_url) && ReadParam(m, iter, &p->unfiltered_link_url) && - ReadParam(m, iter, &p->image_url) && + ReadParam(m, iter, &p->src_url) && ReadParam(m, iter, &p->page_url) && ReadParam(m, iter, &p->frame_url) && + ReadParam(m, iter, &p->media_params) && ReadParam(m, iter, &p->selection_text) && ReadParam(m, iter, &p->misspelled_word) && ReadParam(m, iter, &p->dictionary_suggestions) && |