| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 // Message definition file, included multiple times, hence no include guard. | 5 // Message definition file, included multiple times, hence no include guard. |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "content/common/service_worker/embedded_worker_settings.h" | 11 #include "content/common/service_worker/embedded_worker_settings.h" |
| 12 #include "content/common/service_worker/embedded_worker_start_params.h" |
| 12 #include "content/public/common/console_message_level.h" | 13 #include "content/public/common/console_message_level.h" |
| 13 #include "content/public/common/web_preferences.h" | 14 #include "content/public/common/web_preferences.h" |
| 14 #include "ipc/ipc_message.h" | 15 #include "ipc/ipc_message.h" |
| 15 #include "ipc/ipc_message_macros.h" | 16 #include "ipc/ipc_message_macros.h" |
| 16 #include "ipc/ipc_param_traits.h" | 17 #include "ipc/ipc_param_traits.h" |
| 17 #include "url/gurl.h" | 18 #include "url/gurl.h" |
| 18 | 19 |
| 19 #undef IPC_MESSAGE_EXPORT | 20 #undef IPC_MESSAGE_EXPORT |
| 20 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT | 21 #define IPC_MESSAGE_EXPORT CONTENT_EXPORT |
| 21 | 22 |
| 22 #define IPC_MESSAGE_START EmbeddedWorkerMsgStart | 23 #define IPC_MESSAGE_START EmbeddedWorkerMsgStart |
| 23 | 24 |
| 24 IPC_STRUCT_TRAITS_BEGIN(content::EmbeddedWorkerSettings) | 25 IPC_STRUCT_TRAITS_BEGIN(content::EmbeddedWorkerSettings) |
| 25 IPC_STRUCT_TRAITS_MEMBER(v8_cache_options) | 26 IPC_STRUCT_TRAITS_MEMBER(v8_cache_options) |
| 26 IPC_STRUCT_TRAITS_MEMBER(data_saver_enabled) | 27 IPC_STRUCT_TRAITS_MEMBER(data_saver_enabled) |
| 27 IPC_STRUCT_TRAITS_END() | 28 IPC_STRUCT_TRAITS_END() |
| 28 | 29 |
| 29 // Parameters structure for EmbeddedWorkerMsg_StartWorker. | 30 // Parameters structure for EmbeddedWorkerMsg_StartWorker. |
| 30 IPC_STRUCT_BEGIN(EmbeddedWorkerMsg_StartWorker_Params) | 31 IPC_STRUCT_TRAITS_BEGIN(content::EmbeddedWorkerStartParams) |
| 31 IPC_STRUCT_MEMBER(int, embedded_worker_id) | 32 IPC_STRUCT_TRAITS_MEMBER(embedded_worker_id) |
| 32 IPC_STRUCT_MEMBER(int64_t, service_worker_version_id) | 33 IPC_STRUCT_TRAITS_MEMBER(service_worker_version_id) |
| 33 IPC_STRUCT_MEMBER(GURL, scope) | 34 IPC_STRUCT_TRAITS_MEMBER(scope) |
| 34 IPC_STRUCT_MEMBER(GURL, script_url) | 35 IPC_STRUCT_TRAITS_MEMBER(script_url) |
| 35 IPC_STRUCT_MEMBER(int, worker_devtools_agent_route_id) | 36 IPC_STRUCT_TRAITS_MEMBER(worker_devtools_agent_route_id) |
| 36 IPC_STRUCT_MEMBER(bool, pause_after_download) | 37 IPC_STRUCT_TRAITS_MEMBER(pause_after_download) |
| 37 IPC_STRUCT_MEMBER(bool, wait_for_debugger) | 38 IPC_STRUCT_TRAITS_MEMBER(wait_for_debugger) |
| 38 IPC_STRUCT_MEMBER(bool, is_installed) | 39 IPC_STRUCT_TRAITS_MEMBER(is_installed) |
| 39 IPC_STRUCT_MEMBER(content::EmbeddedWorkerSettings, settings) | 40 IPC_STRUCT_TRAITS_MEMBER(settings) |
| 40 IPC_STRUCT_END() | 41 IPC_STRUCT_TRAITS_END() |
| 41 | 42 |
| 42 // Parameters structure for EmbeddedWorkerHostMsg_ReportConsoleMessage. | 43 // Parameters structure for EmbeddedWorkerHostMsg_ReportConsoleMessage. |
| 43 // The data members directly correspond to parameters of | 44 // The data members directly correspond to parameters of |
| 44 // WorkerMessagingProxy::reportConsoleMessage() | 45 // WorkerMessagingProxy::reportConsoleMessage() |
| 45 IPC_STRUCT_BEGIN(EmbeddedWorkerHostMsg_ReportConsoleMessage_Params) | 46 IPC_STRUCT_BEGIN(EmbeddedWorkerHostMsg_ReportConsoleMessage_Params) |
| 46 IPC_STRUCT_MEMBER(int, source_identifier) | 47 IPC_STRUCT_MEMBER(int, source_identifier) |
| 47 IPC_STRUCT_MEMBER(int, message_level) | 48 IPC_STRUCT_MEMBER(int, message_level) |
| 48 IPC_STRUCT_MEMBER(base::string16, message) | 49 IPC_STRUCT_MEMBER(base::string16, message) |
| 49 IPC_STRUCT_MEMBER(int, line_number) | 50 IPC_STRUCT_MEMBER(int, line_number) |
| 50 IPC_STRUCT_MEMBER(GURL, source_url) | 51 IPC_STRUCT_MEMBER(GURL, source_url) |
| 51 IPC_STRUCT_END() | 52 IPC_STRUCT_END() |
| 52 | 53 |
| 53 // Browser -> Renderer message to create a new embedded worker context. | 54 // Browser -> Renderer message to create a new embedded worker context. |
| 54 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StartWorker, | 55 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StartWorker, |
| 55 EmbeddedWorkerMsg_StartWorker_Params /* params */) | 56 content::EmbeddedWorkerStartParams /* params */) |
| 56 | 57 |
| 57 // Browser -> Renderer message to resume a worker that has been started | 58 // Browser -> Renderer message to resume a worker that has been started |
| 58 // with the pause_after_download option. | 59 // with the pause_after_download option. |
| 59 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_ResumeAfterDownload, | 60 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_ResumeAfterDownload, |
| 60 int /* embedded_worker_id */) | 61 int /* embedded_worker_id */) |
| 61 | 62 |
| 62 // Browser -> Renderer message to stop (terminate) the embedded worker. | 63 // Browser -> Renderer message to stop (terminate) the embedded worker. |
| 63 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker, | 64 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker, |
| 64 int /* embedded_worker_id */) | 65 int /* embedded_worker_id */) |
| 65 | 66 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 // for this for easier cross-thread message dispatching. | 125 // for this for easier cross-thread message dispatching. |
| 125 | 126 |
| 126 #undef IPC_MESSAGE_START | 127 #undef IPC_MESSAGE_START |
| 127 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart | 128 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart |
| 128 | 129 |
| 129 // Browser -> Renderer message to send message. | 130 // Browser -> Renderer message to send message. |
| 130 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker, | 131 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker, |
| 131 int /* thread_id */, | 132 int /* thread_id */, |
| 132 int /* embedded_worker_id */, | 133 int /* embedded_worker_id */, |
| 133 IPC::Message /* message */) | 134 IPC::Message /* message */) |
| OLD | NEW |