summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages_params.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 18:06:36 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-23 18:06:36 +0000
commit0aed2f55c27f391d56f4d2e027578e5722d3b3bc (patch)
tree6261a825a2afb58f1b82f477d3ecd7e966a322af /chrome/common/render_messages_params.cc
parent43bf4fa977612da47f84b4f56ac7cf38256f52f5 (diff)
downloadchromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.zip
chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.gz
chromium_src-0aed2f55c27f391d56f4d2e027578e5722d3b3bc.tar.bz2
Move a bunch of renderer->browser messages to content.
TBR=tsepez Review URL: http://codereview.chromium.org/6721021 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79152 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages_params.cc')
-rw-r--r--chrome/common/render_messages_params.cc345
1 files changed, 0 insertions, 345 deletions
diff --git a/chrome/common/render_messages_params.cc b/chrome/common/render_messages_params.cc
index 4a60180..eb5d8a0 100644
--- a/chrome/common/render_messages_params.cc
+++ b/chrome/common/render_messages_params.cc
@@ -9,32 +9,6 @@
#include "chrome/common/render_messages.h"
#include "net/base/upload_data.h"
-ViewHostMsg_FrameNavigate_Params::ViewHostMsg_FrameNavigate_Params()
- : page_id(0),
- frame_id(0),
- transition(PageTransition::TYPED),
- should_update_history(false),
- gesture(NavigationGestureUser),
- is_post(false),
- was_within_same_page(false),
- http_status_code(0),
- was_fetched_via_proxy(false) {
-}
-
-ViewHostMsg_FrameNavigate_Params::~ViewHostMsg_FrameNavigate_Params() {
-}
-
-ViewHostMsg_UpdateRect_Params::ViewHostMsg_UpdateRect_Params()
- : dx(0),
- dy(0),
- flags(0) {
- // On windows, bitmap is of type "struct HandleAndSequenceNum"
- memset(&bitmap, 0, sizeof(bitmap));
-}
-
-ViewHostMsg_UpdateRect_Params::~ViewHostMsg_UpdateRect_Params() {
-}
-
ViewMsg_Print_Params::ViewMsg_Print_Params()
: margin_top(0),
margin_left(0),
@@ -147,24 +121,6 @@ ViewMsg_ExecuteCode_Params::ViewMsg_ExecuteCode_Params(
ViewMsg_ExecuteCode_Params::~ViewMsg_ExecuteCode_Params() {
}
-ViewHostMsg_CreateWindow_Params::ViewHostMsg_CreateWindow_Params()
- : opener_id(0),
- user_gesture(false),
- window_container_type(WINDOW_CONTAINER_TYPE_NORMAL),
- session_storage_namespace_id(0),
- opener_frame_id(0) {
-}
-
-ViewHostMsg_CreateWindow_Params::~ViewHostMsg_CreateWindow_Params() {
-}
-
-ViewHostMsg_RunFileChooser_Params::ViewHostMsg_RunFileChooser_Params()
- : mode(Open) {
-}
-
-ViewHostMsg_RunFileChooser_Params::~ViewHostMsg_RunFileChooser_Params() {
-}
-
ViewHostMsg_DomMessage_Params::ViewHostMsg_DomMessage_Params()
: request_id(0),
has_callback(false),
@@ -247,57 +203,6 @@ scoped_refptr<Extension>
namespace IPC {
-template<>
-struct ParamTraits<NavigationGesture> {
- typedef NavigationGesture param_type;
- static void Write(Message* m, const param_type& p) {
- m->WriteInt(p);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int type;
- if (!m->ReadInt(iter, &type))
- return false;
- *p = static_cast<NavigationGesture>(type);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- std::string event;
- switch (p) {
- case NavigationGestureUser:
- event = "GESTURE_USER";
- break;
- case NavigationGestureAuto:
- event = "GESTURE_AUTO";
- break;
- default:
- event = "GESTURE_UNKNOWN";
- break;
- }
- LogParam(event, l);
- }
-};
-
-template <>
-struct ParamTraits<WindowContainerType> {
- typedef WindowContainerType param_type;
- static void Write(Message* m, const param_type& p) {
- int val = static_cast<int>(p);
- WriteParam(m, val);
- }
- static bool Read(const Message* m, void** iter, param_type* p) {
- int val = 0;
- if (!ReadParam(m, iter, &val) ||
- val < WINDOW_CONTAINER_TYPE_NORMAL ||
- val >= WINDOW_CONTAINER_TYPE_MAX_VALUE)
- return false;
- *p = static_cast<param_type>(val);
- return true;
- }
- static void Log(const param_type& p, std::string* l) {
- ParamTraits<int>::Log(static_cast<int>(p), l);
- }
-};
-
template <>
struct ParamTraits<Extension::Location> {
typedef Extension::Location param_type;
@@ -420,151 +325,6 @@ void ParamTraits<ViewHostMsg_GetSearchProviderInstallState_Params>::Log(
LogParam(state, l);
}
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.page_id);
- WriteParam(m, p.frame_id);
- WriteParam(m, p.url);
- WriteParam(m, p.referrer);
- WriteParam(m, p.transition);
- WriteParam(m, p.redirects);
- WriteParam(m, p.should_update_history);
- WriteParam(m, p.searchable_form_url);
- WriteParam(m, p.searchable_form_encoding);
- WriteParam(m, p.password_form);
- WriteParam(m, p.security_info);
- WriteParam(m, p.gesture);
- WriteParam(m, p.contents_mime_type);
- WriteParam(m, p.is_post);
- WriteParam(m, p.was_within_same_page);
- WriteParam(m, p.http_status_code);
- WriteParam(m, p.socket_address);
- WriteParam(m, p.was_fetched_via_proxy);
- WriteParam(m, p.content_state);
-}
-
-bool ParamTraits<ViewHostMsg_FrameNavigate_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->page_id) &&
- ReadParam(m, iter, &p->frame_id) &&
- ReadParam(m, iter, &p->url) &&
- ReadParam(m, iter, &p->referrer) &&
- ReadParam(m, iter, &p->transition) &&
- ReadParam(m, iter, &p->redirects) &&
- ReadParam(m, iter, &p->should_update_history) &&
- ReadParam(m, iter, &p->searchable_form_url) &&
- ReadParam(m, iter, &p->searchable_form_encoding) &&
- ReadParam(m, iter, &p->password_form) &&
- ReadParam(m, iter, &p->security_info) &&
- ReadParam(m, iter, &p->gesture) &&
- ReadParam(m, iter, &p->contents_mime_type) &&
- ReadParam(m, iter, &p->is_post) &&
- ReadParam(m, iter, &p->was_within_same_page) &&
- ReadParam(m, iter, &p->http_status_code) &&
- ReadParam(m, iter, &p->socket_address) &&
- ReadParam(m, iter, &p->was_fetched_via_proxy) &&
- ReadParam(m, iter, &p->content_state);
-}
-
-void ParamTraits<ViewHostMsg_FrameNavigate_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.page_id, l);
- l->append(", ");
- LogParam(p.frame_id, l);
- l->append(", ");
- LogParam(p.url, l);
- l->append(", ");
- LogParam(p.referrer, l);
- l->append(", ");
- LogParam(p.transition, l);
- l->append(", ");
- LogParam(p.redirects, l);
- l->append(", ");
- LogParam(p.should_update_history, l);
- l->append(", ");
- LogParam(p.searchable_form_url, l);
- l->append(", ");
- LogParam(p.searchable_form_encoding, l);
- l->append(", ");
- LogParam(p.password_form, l);
- l->append(", ");
- LogParam(p.security_info, l);
- l->append(", ");
- LogParam(p.gesture, l);
- l->append(", ");
- LogParam(p.contents_mime_type, l);
- l->append(", ");
- LogParam(p.is_post, l);
- l->append(", ");
- LogParam(p.was_within_same_page, l);
- l->append(", ");
- LogParam(p.http_status_code, l);
- l->append(", ");
- LogParam(p.socket_address, l);
- l->append(", ");
- LogParam(p.was_fetched_via_proxy, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Write(
- Message* m, const param_type& p) {
- WriteParam(m, p.bitmap);
- WriteParam(m, p.bitmap_rect);
- WriteParam(m, p.dx);
- WriteParam(m, p.dy);
- WriteParam(m, p.scroll_rect);
- WriteParam(m, p.scroll_offset);
- WriteParam(m, p.copy_rects);
- WriteParam(m, p.view_size);
- WriteParam(m, p.resizer_rect);
- WriteParam(m, p.plugin_window_moves);
- WriteParam(m, p.flags);
-}
-
-bool ParamTraits<ViewHostMsg_UpdateRect_Params>::Read(
- const Message* m, void** iter, param_type* p) {
- return
- ReadParam(m, iter, &p->bitmap) &&
- ReadParam(m, iter, &p->bitmap_rect) &&
- ReadParam(m, iter, &p->dx) &&
- ReadParam(m, iter, &p->dy) &&
- ReadParam(m, iter, &p->scroll_rect) &&
- ReadParam(m, iter, &p->scroll_offset) &&
- ReadParam(m, iter, &p->copy_rects) &&
- ReadParam(m, iter, &p->view_size) &&
- ReadParam(m, iter, &p->resizer_rect) &&
- ReadParam(m, iter, &p->plugin_window_moves) &&
- ReadParam(m, iter, &p->flags);
-}
-
-void ParamTraits<ViewHostMsg_UpdateRect_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.bitmap, l);
- l->append(", ");
- LogParam(p.bitmap_rect, l);
- l->append(", ");
- LogParam(p.dx, l);
- l->append(", ");
- LogParam(p.dy, l);
- l->append(", ");
- LogParam(p.scroll_rect, l);
- l->append(", ");
- LogParam(p.copy_rects, l);
- l->append(", ");
- LogParam(p.view_size, l);
- l->append(", ");
- LogParam(p.resizer_rect, l);
- l->append(", ");
- LogParam(p.plugin_window_moves, l);
- l->append(", ");
- LogParam(p.flags, l);
- l->append(")");
-}
-
void ParamTraits<ViewMsg_Print_Params>::Write(Message* m, const param_type& p) {
WriteParam(m, p.page_size);
WriteParam(m, p.printable_size);
@@ -752,111 +512,6 @@ void ParamTraits<ViewMsg_ExecuteCode_Params>::Log(const param_type& p,
l->append("<ViewMsg_ExecuteCode_Params>");
}
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Write(Message* m,
- const param_type& p) {
- WriteParam(m, p.opener_id);
- WriteParam(m, p.user_gesture);
- WriteParam(m, p.window_container_type);
- WriteParam(m, p.session_storage_namespace_id);
- WriteParam(m, p.frame_name);
- WriteParam(m, p.opener_frame_id);
- WriteParam(m, p.opener_url);
- WriteParam(m, p.opener_security_origin);
- WriteParam(m, p.target_url);
-}
-
-bool ParamTraits<ViewHostMsg_CreateWindow_Params>::Read(const Message* m,
- void** iter,
- param_type* p) {
- return
- ReadParam(m, iter, &p->opener_id) &&
- ReadParam(m, iter, &p->user_gesture) &&
- ReadParam(m, iter, &p->window_container_type) &&
- ReadParam(m, iter, &p->session_storage_namespace_id) &&
- ReadParam(m, iter, &p->frame_name) &&
- ReadParam(m, iter, &p->opener_frame_id) &&
- ReadParam(m, iter, &p->opener_url) &&
- ReadParam(m, iter, &p->opener_security_origin) &&
- ReadParam(m, iter, &p->target_url);
-}
-
-void ParamTraits<ViewHostMsg_CreateWindow_Params>::Log(const param_type& p,
- std::string* l) {
- l->append("(");
- LogParam(p.opener_id, l);
- l->append(", ");
- LogParam(p.user_gesture, l);
- l->append(", ");
- LogParam(p.window_container_type, l);
- l->append(", ");
- LogParam(p.session_storage_namespace_id, l);
- l->append(", ");
- LogParam(p.frame_name, l);
- l->append(", ");
- LogParam(p.opener_frame_id, l);
- l->append(", ");
- LogParam(p.opener_url, l);
- l->append(", ");
- LogParam(p.opener_security_origin, l);
- l->append(", ");
- LogParam(p.target_url, l);
- l->append(")");
-}
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Write(
- Message* m,
- const param_type& p) {
- WriteParam(m, static_cast<int>(p.mode));
- WriteParam(m, p.title);
- WriteParam(m, p.default_file_name);
- WriteParam(m, p.accept_types);
-}
-
-bool ParamTraits<ViewHostMsg_RunFileChooser_Params>::Read(
- const Message* m,
- void** iter,
- param_type* p) {
- int mode;
- if (!ReadParam(m, iter, &mode))
- return false;
- if (mode != param_type::Open &&
- mode != param_type::OpenMultiple &&
- mode != param_type::OpenFolder &&
- mode != param_type::Save)
- return false;
- p->mode = static_cast<param_type::Mode>(mode);
- return
- ReadParam(m, iter, &p->title) &&
- ReadParam(m, iter, &p->default_file_name) &&
- ReadParam(m, iter, &p->accept_types);
-};
-
-void ParamTraits<ViewHostMsg_RunFileChooser_Params>::Log(
- const param_type& p,
- std::string* l) {
- switch (p.mode) {
- case param_type::Open:
- l->append("(Open, ");
- break;
- case param_type::OpenMultiple:
- l->append("(OpenMultiple, ");
- break;
- case param_type::OpenFolder:
- l->append("(OpenFolder, ");
- break;
- case param_type::Save:
- l->append("(Save, ");
- break;
- default:
- l->append("(UNKNOWN, ");
- }
- LogParam(p.title, l);
- l->append(", ");
- LogParam(p.default_file_name, l);
- l->append(", ");
- LogParam(p.accept_types, l);
-}
-
void ParamTraits<ViewMsg_ExtensionLoaded_Params>::Write(Message* m,
const param_type& p) {
WriteParam(m, p.location);