| 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 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 33 IPC_STRUCT_TRAITS_MEMBER(service_worker_version_id) | 33 IPC_STRUCT_TRAITS_MEMBER(service_worker_version_id) |
| 34 IPC_STRUCT_TRAITS_MEMBER(scope) | 34 IPC_STRUCT_TRAITS_MEMBER(scope) |
| 35 IPC_STRUCT_TRAITS_MEMBER(script_url) | 35 IPC_STRUCT_TRAITS_MEMBER(script_url) |
| 36 IPC_STRUCT_TRAITS_MEMBER(worker_devtools_agent_route_id) | 36 IPC_STRUCT_TRAITS_MEMBER(worker_devtools_agent_route_id) |
| 37 IPC_STRUCT_TRAITS_MEMBER(pause_after_download) | 37 IPC_STRUCT_TRAITS_MEMBER(pause_after_download) |
| 38 IPC_STRUCT_TRAITS_MEMBER(wait_for_debugger) | 38 IPC_STRUCT_TRAITS_MEMBER(wait_for_debugger) |
| 39 IPC_STRUCT_TRAITS_MEMBER(is_installed) | 39 IPC_STRUCT_TRAITS_MEMBER(is_installed) |
| 40 IPC_STRUCT_TRAITS_MEMBER(settings) | 40 IPC_STRUCT_TRAITS_MEMBER(settings) |
| 41 IPC_STRUCT_TRAITS_END() | 41 IPC_STRUCT_TRAITS_END() |
| 42 | 42 |
| 43 // Parameters structure for EmbeddedWorkerHostMsg_ReportConsoleMessage. | |
| 44 // The data members directly correspond to parameters of | |
| 45 // WorkerMessagingProxy::reportConsoleMessage() | |
| 46 IPC_STRUCT_BEGIN(EmbeddedWorkerHostMsg_ReportConsoleMessage_Params) | |
| 47 IPC_STRUCT_MEMBER(int, source_identifier) | |
| 48 IPC_STRUCT_MEMBER(int, message_level) | |
| 49 IPC_STRUCT_MEMBER(base::string16, message) | |
| 50 IPC_STRUCT_MEMBER(int, line_number) | |
| 51 IPC_STRUCT_MEMBER(GURL, source_url) | |
| 52 IPC_STRUCT_END() | |
| 53 | |
| 54 // Browser -> Renderer message to stop (terminate) the embedded worker. | 43 // Browser -> Renderer message to stop (terminate) the embedded worker. |
| 55 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker, | 44 IPC_MESSAGE_CONTROL1(EmbeddedWorkerMsg_StopWorker, |
| 56 int /* embedded_worker_id */) | 45 int /* embedded_worker_id */) |
| 57 | 46 |
| 58 // Renderer -> Browser message to indicate that the worker is ready for | |
| 59 // inspection. | |
| 60 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerReadyForInspection, | |
| 61 int /* embedded_worker_id */) | |
| 62 | |
| 63 // Renderer -> Browser message to indicate that the worker has loaded the | |
| 64 // script. | |
| 65 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerScriptLoaded, | |
| 66 int /* embedded_worker_id */) | |
| 67 | |
| 68 // Renderer -> Browser message to indicate that the worker thread is started. | |
| 69 IPC_MESSAGE_CONTROL3(EmbeddedWorkerHostMsg_WorkerThreadStarted, | |
| 70 int /* embedded_worker_id */, | |
| 71 int /* thread_id */, | |
| 72 int /* provider_id */) | |
| 73 | |
| 74 // Renderer -> Browser message to indicate that the worker has failed to load | |
| 75 // the script. | |
| 76 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerScriptLoadFailed, | |
| 77 int /* embedded_worker_id */) | |
| 78 | |
| 79 // Renderer -> Browser message to indicate that the worker has evaluated the | |
| 80 // script. | |
| 81 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_WorkerScriptEvaluated, | |
| 82 int /* embedded_worker_id */, | |
| 83 bool /* success */) | |
| 84 | |
| 85 // Renderer -> Browser message to indicate that the worker is started. | |
| 86 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStarted, | |
| 87 int /* embedded_worker_id */) | |
| 88 | |
| 89 // Renderer -> Browser message to indicate that the worker is stopped. | |
| 90 IPC_MESSAGE_CONTROL1(EmbeddedWorkerHostMsg_WorkerStopped, | |
| 91 int /* embedded_worker_id */) | |
| 92 | |
| 93 // Renderer -> Browser message to count an API use. |feature| must be one of the | 47 // Renderer -> Browser message to count an API use. |feature| must be one of the |
| 94 // values from blink::UseCounter::Feature enum. | 48 // values from blink::UseCounter::Feature enum. |
| 95 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_CountFeature, | 49 IPC_MESSAGE_CONTROL2(EmbeddedWorkerHostMsg_CountFeature, |
| 96 int64_t /* service_worker_version_id */, | 50 int64_t /* service_worker_version_id */, |
| 97 uint32_t /* feature */) | 51 uint32_t /* feature */) |
| 98 | 52 |
| 99 // Renderer -> Browser message to report an exception. | |
| 100 IPC_MESSAGE_CONTROL5(EmbeddedWorkerHostMsg_ReportException, | |
| 101 int /* embedded_worker_id */, | |
| 102 base::string16 /* error_message */, | |
| 103 int /* line_number */, | |
| 104 int /* column_number */, | |
| 105 GURL /* source_url */) | |
| 106 | |
| 107 // Renderer -> Browser message to report console message. | |
| 108 IPC_MESSAGE_CONTROL2( | |
| 109 EmbeddedWorkerHostMsg_ReportConsoleMessage, | |
| 110 int /* embedded_worker_id */, | |
| 111 EmbeddedWorkerHostMsg_ReportConsoleMessage_Params /* params */) | |
| 112 | |
| 113 // --------------------------------------------------------------------------- | 53 // --------------------------------------------------------------------------- |
| 114 // For EmbeddedWorkerContext related messages, which are directly sent from | 54 // For EmbeddedWorkerContext related messages, which are directly sent from |
| 115 // browser to the worker thread in the child process. We use a new message class | 55 // browser to the worker thread in the child process. We use a new message class |
| 116 // for this for easier cross-thread message dispatching. | 56 // for this for easier cross-thread message dispatching. |
| 117 | 57 |
| 118 #undef IPC_MESSAGE_START | 58 #undef IPC_MESSAGE_START |
| 119 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart | 59 #define IPC_MESSAGE_START EmbeddedWorkerContextMsgStart |
| 120 | 60 |
| 121 // Browser -> Renderer message to send message. | 61 // Browser -> Renderer message to send message. |
| 122 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker, | 62 IPC_MESSAGE_CONTROL3(EmbeddedWorkerContextMsg_MessageToWorker, |
| 123 int /* thread_id */, | 63 int /* thread_id */, |
| 124 int /* embedded_worker_id */, | 64 int /* embedded_worker_id */, |
| 125 IPC::Message /* message */) | 65 IPC::Message /* message */) |
| OLD | NEW |