summaryrefslogtreecommitdiffstats
path: root/chrome/common/render_messages.h
diff options
context:
space:
mode:
authoratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-12 02:47:26 +0000
committeratwilson@chromium.org <atwilson@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-12 02:47:26 +0000
commit8ab0465a0a52812b600580540a69ba4687e4ef22 (patch)
tree12c5483360d5174a2906e84234f4d3db72d8471d /chrome/common/render_messages.h
parent69a83853994057c9bb81fbc8e184cf36650293db (diff)
downloadchromium_src-8ab0465a0a52812b600580540a69ba4687e4ef22.zip
chromium_src-8ab0465a0a52812b600580540a69ba4687e4ef22.tar.gz
chromium_src-8ab0465a0a52812b600580540a69ba4687e4ef22.tar.bz2
Added plumbing to transport the frame name between RenderViewHost and the Webkit layer.
Extended ViewMsg_New and ViewHostMsg_CreateWindow to have a new frame_name parameter. This allows the RVH to know the initial name of the frame associated with its RenderView, and also to set the name of the frame when creating a new RenderView. Review URL: http://codereview.chromium.org/2775003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49622 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_messages.h')
-rw-r--r--chrome/common/render_messages.h60
1 files changed, 59 insertions, 1 deletions
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 6cddbc6..6a82112 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -639,6 +639,27 @@ struct ViewMsg_New_Params {
// The session storage namespace ID this view should use.
int64 session_storage_namespace_id;
+
+ // The name of the frame associated with this view (or empty if none).
+ string16 frame_name;
+};
+
+struct ViewHostMsg_CreateWindow_Params {
+ // Routing ID of the view initiating the open.
+ int opener_id;
+
+ // True if this open request came in the context of a user gesture.
+ bool user_gesture;
+
+ // Type of window requested.
+ WindowContainerType window_container_type;
+
+ // The session storage namespace ID this view should use.
+ int64 session_storage_namespace_id;
+
+ // The name of the resulting frame that should be created (empty if none
+ // has been specified).
+ string16 frame_name;
};
struct ViewHostMsg_RunFileChooser_Params {
@@ -2521,6 +2542,7 @@ struct ParamTraits<ViewMsg_New_Params> {
WriteParam(m, p.web_preferences);
WriteParam(m, p.view_id);
WriteParam(m, p.session_storage_namespace_id);
+ WriteParam(m, p.frame_name);
}
static bool Read(const Message* m, void** iter, param_type* p) {
@@ -2529,7 +2551,8 @@ struct ParamTraits<ViewMsg_New_Params> {
ReadParam(m, iter, &p->renderer_preferences) &&
ReadParam(m, iter, &p->web_preferences) &&
ReadParam(m, iter, &p->view_id) &&
- ReadParam(m, iter, &p->session_storage_namespace_id);
+ ReadParam(m, iter, &p->session_storage_namespace_id) &&
+ ReadParam(m, iter, &p->frame_name);
}
static void Log(const param_type& p, std::wstring* l) {
l->append(L"(");
@@ -2542,6 +2565,8 @@ struct ParamTraits<ViewMsg_New_Params> {
LogParam(p.view_id, l);
l->append(L", ");
LogParam(p.session_storage_namespace_id, l);
+ l->append(L", ");
+ LogParam(p.frame_name, l);
l->append(L")");
}
};
@@ -2592,6 +2617,39 @@ struct ParamTraits<ViewHostMsg_RunFileChooser_Params> {
}
};
+template<>
+struct ParamTraits<ViewHostMsg_CreateWindow_Params> {
+ typedef ViewHostMsg_CreateWindow_Params param_type;
+ static void 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);
+ }
+ static bool 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);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.opener_id, l);
+ l->append(L", ");
+ LogParam(p.user_gesture, l);
+ l->append(L", ");
+ LogParam(p.window_container_type, l);
+ l->append(L", ");
+ LogParam(p.session_storage_namespace_id, l);
+ l->append(L", ");
+ LogParam(p.frame_name, l);
+ l->append(L")");
+ }
+};
+
template <>
struct ParamTraits<ExtensionExtent> {
typedef ExtensionExtent param_type;