summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authoryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:17:44 +0000
committeryaar@chromium.org <yaar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-09 18:17:44 +0000
commit79e3744bbbb0867f4e356eab96703d425b3fad40 (patch)
tree790f3464f1636e542b15b2a5de852cbb6c5f9c41 /chrome/common/render_messages.h
parent9068747c5591866480bd0888e571cc548d6be546 (diff)
downloadchromium_src-79e3744bbbb0867f4e356eab96703d425b3fad40.zip
chromium_src-79e3744bbbb0867f4e356eab96703d425b3fad40.tar.gz
chromium_src-79e3744bbbb0867f4e356eab96703d425b3fad40.tar.bz2
Moving ShowContextMenu out of WebView_delegate and into WebViewClient
(Part of the Webkit API refactoring effort). Review URL: http://codereview.chromium.org/265011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28567 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h65
1 files changed, 6 insertions, 59 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 5a6b335..59dc1ac 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -557,47 +557,6 @@ struct ParamTraits<FilterPolicy::Type> {
};
template <>
-struct ParamTraits<ContextNodeType> {
- typedef ContextNodeType param_type;
- static void Write(Message* m, const param_type& p) {
- m->WriteInt(p.type);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int type;
- if (!m->ReadInt(iter, &type))
- return false;
- *p = ContextNodeType(type);
- return true;
- }
- static void Log(const param_type& p, std::wstring* l) {
- std::wstring event = L"";
-
- if (!p.type) {
- event.append(L"NONE");
- } else {
- event.append(L"(");
- if (p.type & ContextNodeType::PAGE)
- event.append(L"PAGE|");
- if (p.type & ContextNodeType::FRAME)
- event.append(L"FRAME|");
- if (p.type & ContextNodeType::LINK)
- event.append(L"LINK|");
- if (p.type & ContextNodeType::IMAGE)
- event.append(L"IMAGE|");
- if (p.type & ContextNodeType::SELECTION)
- event.append(L"SELECTION|");
- if (p.type & ContextNodeType::EDITABLE)
- event.append(L"EDITABLE|");
- if (p.type & ContextNodeType::MISSPELLED_WORD)
- event.append(L"MISSPELLED_WORD|");
- event.append(L")");
- }
-
- LogParam(event, l);
- }
-};
-
-template <>
struct ParamTraits<webkit_glue::WebAccessibility::InParams> {
typedef webkit_glue::WebAccessibility::InParams param_type;
static void Write(Message* m, const param_type& p) {
@@ -894,24 +853,10 @@ 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.has_audio);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->player_state) &&
- ReadParam(m, iter, &p->has_audio);
- }
-};
-
-template <>
struct ParamTraits<ContextMenuParams> {
typedef ContextMenuParams param_type;
static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.node_type);
+ WriteParam(m, p.media_type);
WriteParam(m, p.x);
WriteParam(m, p.y);
WriteParam(m, p.link_url);
@@ -919,18 +864,19 @@ struct ParamTraits<ContextMenuParams> {
WriteParam(m, p.src_url);
WriteParam(m, p.page_url);
WriteParam(m, p.frame_url);
- WriteParam(m, p.media_params);
+ WriteParam(m, p.media_flags);
WriteParam(m, p.selection_text);
WriteParam(m, p.misspelled_word);
WriteParam(m, p.dictionary_suggestions);
WriteParam(m, p.spellcheck_enabled);
+ WriteParam(m, p.is_editable);
WriteParam(m, p.edit_flags);
WriteParam(m, p.security_info);
WriteParam(m, p.frame_charset);
}
static bool Read(const Message* m, void** iter, param_type* p) {
return
- ReadParam(m, iter, &p->node_type) &&
+ ReadParam(m, iter, &p->media_type) &&
ReadParam(m, iter, &p->x) &&
ReadParam(m, iter, &p->y) &&
ReadParam(m, iter, &p->link_url) &&
@@ -938,11 +884,12 @@ struct ParamTraits<ContextMenuParams> {
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->media_flags) &&
ReadParam(m, iter, &p->selection_text) &&
ReadParam(m, iter, &p->misspelled_word) &&
ReadParam(m, iter, &p->dictionary_suggestions) &&
ReadParam(m, iter, &p->spellcheck_enabled) &&
+ ReadParam(m, iter, &p->is_editable) &&
ReadParam(m, iter, &p->edit_flags) &&
ReadParam(m, iter, &p->security_info) &&
ReadParam(m, iter, &p->frame_charset);