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