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

Unified Diff: chrome/common/render_messages.h

Issue 509016: Refactored code to allow associating workers with multiple renderers. (Closed)
Patch Set: Disabled overly-aggressive assertion in ResourceDispatcherHost. Created 10 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/render_messages.h
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index 5efe75ead2c23eebedb8890fd3bd38b688ceb3b0..3f99df2d3625883427b33c6912e303c1ff54310e 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -534,6 +534,24 @@ struct ViewMsg_ExecuteCode_Params {
bool all_frames;
};
+// Parameters for the message that creates a worker thread.
+struct ViewHostMsg_CreateWorker_Params {
+ // URL for the worker script.
+ GURL url;
+
+ // True if this is a SharedWorker, false if it is a dedicated Worker.
+ bool is_shared;
+
+ // Name for a SharedWorker, otherwise empty string.
+ string16 name;
+
+ // The ID of the parent document (unique within parent renderer).
+ unsigned long long document_id;
+
+ // RenderView routing id used to send messages back to the parent.
+ int render_view_route_id;
+};
+
// Creates a new view via a control message since the view doesn't yet exist.
struct ViewMsg_New_Params {
// The parent window's id.
@@ -2296,6 +2314,40 @@ struct ParamTraits<ViewMsg_DOMStorageEvent_Params> {
}
};
+// Traits for ViewHostMsg_CreateWorker_Params
+template <>
+struct ParamTraits<ViewHostMsg_CreateWorker_Params> {
+ typedef ViewHostMsg_CreateWorker_Params param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.url);
+ WriteParam(m, p.is_shared);
+ WriteParam(m, p.name);
+ WriteParam(m, p.document_id);
+ WriteParam(m, p.render_view_route_id);
+ }
+ static bool Read(const Message* m, void** iter, param_type* p) {
+ return
+ ReadParam(m, iter, &p->url) &&
+ ReadParam(m, iter, &p->is_shared) &&
+ ReadParam(m, iter, &p->name) &&
+ ReadParam(m, iter, &p->document_id) &&
+ ReadParam(m, iter, &p->render_view_route_id);
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"(");
+ LogParam(p.url, l);
+ l->append(L", ");
+ LogParam(p.is_shared, l);
+ l->append(L", ");
+ LogParam(p.name, l);
+ l->append(L", ");
+ LogParam(p.document_id, l);
+ l->append(L", ");
+ LogParam(p.render_view_route_id, l);
+ l->append(L")");
+ }
+};
+
// Traits for WebCookie
template <>
struct ParamTraits<webkit_glue::WebCookie> {
« no previous file with comments | « chrome/chrome_browser.gypi ('k') | chrome/common/render_messages_internal.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698