| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // Defines messages between the browser and worker process, as well as between | 5 // Defines messages between the browser and worker process, as well as between |
| 6 // the renderer and worker process. | 6 // the renderer and worker process. |
| 7 | 7 |
| 8 // Multiply-included message file, hence no include guard. | 8 // Multiply-included message file, hence no include guard. |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #define IPC_MESSAGE_START WorkerMsgStart | 24 #define IPC_MESSAGE_START WorkerMsgStart |
| 25 | 25 |
| 26 // Parameters structure for WorkerHostMsg_PostConsoleMessageToWorkerObject, | 26 // Parameters structure for WorkerHostMsg_PostConsoleMessageToWorkerObject, |
| 27 // which has too many data parameters to be reasonably put in a predefined | 27 // which has too many data parameters to be reasonably put in a predefined |
| 28 // IPC message. The data members directly correspond to parameters of | 28 // IPC message. The data members directly correspond to parameters of |
| 29 // WebWorkerClient::postConsoleMessageToWorkerObject() | 29 // WebWorkerClient::postConsoleMessageToWorkerObject() |
| 30 IPC_STRUCT_BEGIN(WorkerHostMsg_PostConsoleMessageToWorkerObject_Params) | 30 IPC_STRUCT_BEGIN(WorkerHostMsg_PostConsoleMessageToWorkerObject_Params) |
| 31 IPC_STRUCT_MEMBER(int, source_identifier) | 31 IPC_STRUCT_MEMBER(int, source_identifier) |
| 32 IPC_STRUCT_MEMBER(int, message_type) | 32 IPC_STRUCT_MEMBER(int, message_type) |
| 33 IPC_STRUCT_MEMBER(int, message_level) | 33 IPC_STRUCT_MEMBER(int, message_level) |
| 34 IPC_STRUCT_MEMBER(string16, message) | 34 IPC_STRUCT_MEMBER(base::string16, message) |
| 35 IPC_STRUCT_MEMBER(int, line_number) | 35 IPC_STRUCT_MEMBER(int, line_number) |
| 36 IPC_STRUCT_MEMBER(string16, source_url) | 36 IPC_STRUCT_MEMBER(base::string16, source_url) |
| 37 IPC_STRUCT_END() | 37 IPC_STRUCT_END() |
| 38 | 38 |
| 39 // Parameter structure for WorkerProcessMsg_CreateWorker. | 39 // Parameter structure for WorkerProcessMsg_CreateWorker. |
| 40 IPC_STRUCT_BEGIN(WorkerProcessMsg_CreateWorker_Params) | 40 IPC_STRUCT_BEGIN(WorkerProcessMsg_CreateWorker_Params) |
| 41 IPC_STRUCT_MEMBER(GURL, url) | 41 IPC_STRUCT_MEMBER(GURL, url) |
| 42 IPC_STRUCT_MEMBER(string16, name) | 42 IPC_STRUCT_MEMBER(base::string16, name) |
| 43 IPC_STRUCT_MEMBER(int, route_id) | 43 IPC_STRUCT_MEMBER(int, route_id) |
| 44 IPC_STRUCT_MEMBER(int, creator_process_id) | 44 IPC_STRUCT_MEMBER(int, creator_process_id) |
| 45 IPC_STRUCT_MEMBER(int64, shared_worker_appcache_id) | 45 IPC_STRUCT_MEMBER(int64, shared_worker_appcache_id) |
| 46 IPC_STRUCT_END() | 46 IPC_STRUCT_END() |
| 47 | 47 |
| 48 IPC_ENUM_TRAITS(blink::WebContentSecurityPolicyType) | 48 IPC_ENUM_TRAITS(blink::WebContentSecurityPolicyType) |
| 49 | 49 |
| 50 //----------------------------------------------------------------------------- | 50 //----------------------------------------------------------------------------- |
| 51 // WorkerProcess messages | 51 // WorkerProcess messages |
| 52 // These are messages sent from the browser to the worker process. | 52 // These are messages sent from the browser to the worker process. |
| 53 IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker, | 53 IPC_MESSAGE_CONTROL1(WorkerProcessMsg_CreateWorker, |
| 54 WorkerProcessMsg_CreateWorker_Params) | 54 WorkerProcessMsg_CreateWorker_Params) |
| 55 | 55 |
| 56 //----------------------------------------------------------------------------- | 56 //----------------------------------------------------------------------------- |
| 57 // WorkerProcessHost messages | 57 // WorkerProcessHost messages |
| 58 // These are messages sent from the worker process to the browser process. | 58 // These are messages sent from the worker process to the browser process. |
| 59 | 59 |
| 60 // Sent by the worker process to check whether access to web databases is | 60 // Sent by the worker process to check whether access to web databases is |
| 61 // allowed. | 61 // allowed. |
| 62 IPC_SYNC_MESSAGE_CONTROL5_1(WorkerProcessHostMsg_AllowDatabase, | 62 IPC_SYNC_MESSAGE_CONTROL5_1(WorkerProcessHostMsg_AllowDatabase, |
| 63 int /* worker_route_id */, | 63 int /* worker_route_id */, |
| 64 GURL /* origin url */, | 64 GURL /* origin url */, |
| 65 string16 /* database name */, | 65 base::string16 /* database name */, |
| 66 string16 /* database display name */, | 66 base::string16 /* database display name */, |
| 67 unsigned long /* estimated size */, | 67 unsigned long /* estimated size */, |
| 68 bool /* result */) | 68 bool /* result */) |
| 69 | 69 |
| 70 // Sent by the worker process to check whether access to file system is allowed. | 70 // Sent by the worker process to check whether access to file system is allowed. |
| 71 IPC_SYNC_MESSAGE_CONTROL2_1(WorkerProcessHostMsg_AllowFileSystem, | 71 IPC_SYNC_MESSAGE_CONTROL2_1(WorkerProcessHostMsg_AllowFileSystem, |
| 72 int /* worker_route_id */, | 72 int /* worker_route_id */, |
| 73 GURL /* origin url */, | 73 GURL /* origin url */, |
| 74 bool /* result */) | 74 bool /* result */) |
| 75 | 75 |
| 76 // Sent by the worker process to check whether access to IndexedDB is allowed. | 76 // Sent by the worker process to check whether access to IndexedDB is allowed. |
| 77 IPC_SYNC_MESSAGE_CONTROL3_1(WorkerProcessHostMsg_AllowIndexedDB, | 77 IPC_SYNC_MESSAGE_CONTROL3_1(WorkerProcessHostMsg_AllowIndexedDB, |
| 78 int /* worker_route_id */, | 78 int /* worker_route_id */, |
| 79 GURL /* origin url */, | 79 GURL /* origin url */, |
| 80 string16 /* database name */, | 80 base::string16 /* database name */, |
| 81 bool /* result */) | 81 bool /* result */) |
| 82 | 82 |
| 83 // Sent by the worker process to request being killed. | 83 // Sent by the worker process to request being killed. |
| 84 IPC_SYNC_MESSAGE_CONTROL0_0(WorkerProcessHostMsg_ForceKillWorker) | 84 IPC_SYNC_MESSAGE_CONTROL0_0(WorkerProcessHostMsg_ForceKillWorker) |
| 85 | 85 |
| 86 | 86 |
| 87 //----------------------------------------------------------------------------- | 87 //----------------------------------------------------------------------------- |
| 88 // Worker messages | 88 // Worker messages |
| 89 // These are messages sent from the renderer process to the worker process. | 89 // These are messages sent from the renderer process to the worker process. |
| 90 IPC_MESSAGE_ROUTED5(WorkerMsg_StartWorkerContext, | 90 IPC_MESSAGE_ROUTED5(WorkerMsg_StartWorkerContext, |
| 91 GURL /* url */, | 91 GURL /* url */, |
| 92 string16 /* user_agent */, | 92 base::string16 /* user_agent */, |
| 93 string16 /* source_code */, | 93 base::string16 /* source_code */, |
| 94 string16 /* content_security_policy */, | 94 base::string16 /* content_security_policy */, |
| 95 blink::WebContentSecurityPolicyType) | 95 blink::WebContentSecurityPolicyType) |
| 96 | 96 |
| 97 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) | 97 IPC_MESSAGE_ROUTED0(WorkerMsg_TerminateWorkerContext) |
| 98 | 98 |
| 99 IPC_MESSAGE_ROUTED2(WorkerMsg_Connect, | 99 IPC_MESSAGE_ROUTED2(WorkerMsg_Connect, |
| 100 int /* sent_message_port_id */, | 100 int /* sent_message_port_id */, |
| 101 int /* routing_id */) | 101 int /* routing_id */) |
| 102 | 102 |
| 103 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed) | 103 IPC_MESSAGE_ROUTED0(WorkerMsg_WorkerObjectDestroyed) |
| 104 | 104 |
| 105 | 105 |
| 106 //----------------------------------------------------------------------------- | 106 //----------------------------------------------------------------------------- |
| 107 // WorkerHost messages | 107 // WorkerHost messages |
| 108 // These are messages sent from the worker process to the renderer process. | 108 // These are messages sent from the worker process to the renderer process. |
| 109 // WorkerMsg_PostMessage is also sent here. | 109 // WorkerMsg_PostMessage is also sent here. |
| 110 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed, | 110 IPC_MESSAGE_CONTROL1(WorkerHostMsg_WorkerContextClosed, |
| 111 int /* worker_route_id */) | 111 int /* worker_route_id */) |
| 112 IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed) | 112 IPC_MESSAGE_ROUTED0(WorkerHostMsg_WorkerContextDestroyed) |
| OLD | NEW |