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

Side by Side Diff: chrome/common/render_messages.h

Issue 149604: Begin implementation of the context menu for Video and Audio tags. (Closed)
Patch Set: Fix small style issues. Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_ 5 #ifndef CHROME_COMMON_RENDER_MESSAGES_H_
6 #define CHROME_COMMON_RENDER_MESSAGES_H_ 6 #define CHROME_COMMON_RENDER_MESSAGES_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 #include <map> 10 #include <map>
11 11
(...skipping 801 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 LogParam(p.is_post, l); 813 LogParam(p.is_post, l);
814 l->append(L", "); 814 l->append(L", ");
815 LogParam(p.is_content_filtered, l); 815 LogParam(p.is_content_filtered, l);
816 l->append(L", "); 816 l->append(L", ");
817 LogParam(p.http_status_code, l); 817 LogParam(p.http_status_code, l);
818 l->append(L")"); 818 l->append(L")");
819 } 819 }
820 }; 820 };
821 821
822 template <> 822 template <>
823 struct ParamTraits<ContextMenuMediaParams> {
824 typedef ContextMenuMediaParams param_type;
825 static void Write(Message* m, const param_type& p) {
826 WriteParam(m, p.player_state);
827 WriteParam(m, p.playback_rate);
828 }
829 static bool Read(const Message* m, void** iter, param_type* p) {
830 return
831 ReadParam(m, iter, &p->player_state) &&
832 ReadParam(m, iter, &p->playback_rate);
833 }
834 };
835
836 template <>
823 struct ParamTraits<ContextMenuParams> { 837 struct ParamTraits<ContextMenuParams> {
824 typedef ContextMenuParams param_type; 838 typedef ContextMenuParams param_type;
825 static void Write(Message* m, const param_type& p) { 839 static void Write(Message* m, const param_type& p) {
826 WriteParam(m, p.node); 840 WriteParam(m, p.node);
827 WriteParam(m, p.x); 841 WriteParam(m, p.x);
828 WriteParam(m, p.y); 842 WriteParam(m, p.y);
829 WriteParam(m, p.link_url); 843 WriteParam(m, p.link_url);
830 WriteParam(m, p.unfiltered_link_url); 844 WriteParam(m, p.unfiltered_link_url);
831 WriteParam(m, p.image_url); 845 WriteParam(m, p.src_url);
832 WriteParam(m, p.page_url); 846 WriteParam(m, p.page_url);
833 WriteParam(m, p.frame_url); 847 WriteParam(m, p.frame_url);
848 WriteParam(m, p.media_params);
834 WriteParam(m, p.selection_text); 849 WriteParam(m, p.selection_text);
835 WriteParam(m, p.misspelled_word); 850 WriteParam(m, p.misspelled_word);
836 WriteParam(m, p.dictionary_suggestions); 851 WriteParam(m, p.dictionary_suggestions);
837 WriteParam(m, p.spellcheck_enabled); 852 WriteParam(m, p.spellcheck_enabled);
838 WriteParam(m, p.edit_flags); 853 WriteParam(m, p.edit_flags);
839 WriteParam(m, p.security_info); 854 WriteParam(m, p.security_info);
840 WriteParam(m, p.frame_charset); 855 WriteParam(m, p.frame_charset);
841 } 856 }
842 static bool Read(const Message* m, void** iter, param_type* p) { 857 static bool Read(const Message* m, void** iter, param_type* p) {
843 return 858 return
844 ReadParam(m, iter, &p->node) && 859 ReadParam(m, iter, &p->node) &&
845 ReadParam(m, iter, &p->x) && 860 ReadParam(m, iter, &p->x) &&
846 ReadParam(m, iter, &p->y) && 861 ReadParam(m, iter, &p->y) &&
847 ReadParam(m, iter, &p->link_url) && 862 ReadParam(m, iter, &p->link_url) &&
848 ReadParam(m, iter, &p->unfiltered_link_url) && 863 ReadParam(m, iter, &p->unfiltered_link_url) &&
849 ReadParam(m, iter, &p->image_url) && 864 ReadParam(m, iter, &p->src_url) &&
850 ReadParam(m, iter, &p->page_url) && 865 ReadParam(m, iter, &p->page_url) &&
851 ReadParam(m, iter, &p->frame_url) && 866 ReadParam(m, iter, &p->frame_url) &&
867 ReadParam(m, iter, &p->media_params) &&
852 ReadParam(m, iter, &p->selection_text) && 868 ReadParam(m, iter, &p->selection_text) &&
853 ReadParam(m, iter, &p->misspelled_word) && 869 ReadParam(m, iter, &p->misspelled_word) &&
854 ReadParam(m, iter, &p->dictionary_suggestions) && 870 ReadParam(m, iter, &p->dictionary_suggestions) &&
855 ReadParam(m, iter, &p->spellcheck_enabled) && 871 ReadParam(m, iter, &p->spellcheck_enabled) &&
856 ReadParam(m, iter, &p->edit_flags) && 872 ReadParam(m, iter, &p->edit_flags) &&
857 ReadParam(m, iter, &p->security_info) && 873 ReadParam(m, iter, &p->security_info) &&
858 ReadParam(m, iter, &p->frame_charset); 874 ReadParam(m, iter, &p->frame_charset);
859 } 875 }
860 static void Log(const param_type& p, std::wstring* l) { 876 static void Log(const param_type& p, std::wstring* l) {
861 l->append(L"<ContextMenuParams>"); 877 l->append(L"<ContextMenuParams>");
(...skipping 1043 matching lines...) Expand 10 before | Expand all | Expand 10 after
1905 }; 1921 };
1906 1922
1907 1923
1908 } // namespace IPC 1924 } // namespace IPC
1909 1925
1910 1926
1911 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h" 1927 #define MESSAGES_INTERNAL_FILE "chrome/common/render_messages_internal.h"
1912 #include "chrome/common/ipc_message_macros.h" 1928 #include "chrome/common/ipc_message_macros.h"
1913 1929
1914 #endif // CHROME_COMMON_RENDER_MESSAGES_H_ 1930 #endif // CHROME_COMMON_RENDER_MESSAGES_H_
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/render_view_context_menu.cc ('k') | chrome/renderer/render_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698