| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 // Multiply-included message file, so no include guard. | 5 // Multiply-included message file, so no include guard. |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Results) | 45 IPC_STRUCT_TRAITS_BEGIN(UpdateManifest::Results) |
| 46 IPC_STRUCT_TRAITS_MEMBER(list) | 46 IPC_STRUCT_TRAITS_MEMBER(list) |
| 47 IPC_STRUCT_TRAITS_MEMBER(daystart_elapsed_seconds) | 47 IPC_STRUCT_TRAITS_MEMBER(daystart_elapsed_seconds) |
| 48 IPC_STRUCT_TRAITS_END() | 48 IPC_STRUCT_TRAITS_END() |
| 49 | 49 |
| 50 //------------------------------------------------------------------------------ | 50 //------------------------------------------------------------------------------ |
| 51 // Utility process messages: | 51 // Utility process messages: |
| 52 // These are messages from the browser to the utility process. | 52 // These are messages from the browser to the utility process. |
| 53 // Tell the utility process to unpack the given extension file in its | 53 // Tell the utility process to unpack the given extension file in its |
| 54 // directory and verify that it is valid. | 54 // directory and verify that it is valid. |
| 55 IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackExtension, | 55 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_UnpackExtension, |
| 56 FilePath /* extension_filename */) | 56 FilePath /* extension_filename */) |
| 57 | 57 |
| 58 // Tell the utility process to parse the given JSON data and verify its | 58 // Tell the utility process to parse the given JSON data and verify its |
| 59 // validity. | 59 // validity. |
| 60 IPC_MESSAGE_CONTROL1(UtilityMsg_UnpackWebResource, | 60 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_UnpackWebResource, |
| 61 std::string /* JSON data */) | 61 std::string /* JSON data */) |
| 62 | 62 |
| 63 // Tell the utility process to parse the given xml document. | 63 // Tell the utility process to parse the given xml document. |
| 64 IPC_MESSAGE_CONTROL1(UtilityMsg_ParseUpdateManifest, | 64 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_ParseUpdateManifest, |
| 65 std::string /* xml document contents */) | 65 std::string /* xml document contents */) |
| 66 | 66 |
| 67 // Tell the utility process to decode the given image data. | 67 // Tell the utility process to decode the given image data. |
| 68 IPC_MESSAGE_CONTROL1(UtilityMsg_DecodeImage, | 68 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_DecodeImage, |
| 69 std::vector<unsigned char>) // encoded image contents | 69 std::vector<unsigned char>) // encoded image contents |
| 70 | 70 |
| 71 // Tell the utility process to decode the given image data, which is base64 | 71 // Tell the utility process to decode the given image data, which is base64 |
| 72 // encoded. | 72 // encoded. |
| 73 IPC_MESSAGE_CONTROL1(UtilityMsg_DecodeImageBase64, | 73 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_DecodeImageBase64, |
| 74 std::string) // base64 encoded image contents | 74 std::string) // base64 encoded image contents |
| 75 | 75 |
| 76 // Tell the utility process to render the given PDF into a metafile. | 76 // Tell the utility process to render the given PDF into a metafile. |
| 77 IPC_MESSAGE_CONTROL5(UtilityMsg_RenderPDFPagesToMetafile, | 77 IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_RenderPDFPagesToMetafile, |
| 78 base::PlatformFile, // PDF file | 78 base::PlatformFile, // PDF file |
| 79 FilePath, // Location for output metafile | 79 FilePath, // Location for output metafile |
| 80 gfx::Rect, // Render Area | 80 gfx::Rect, // Render Area |
| 81 int, // DPI | 81 int, // DPI |
| 82 std::vector<printing::PageRange>) | 82 std::vector<printing::PageRange>) |
| 83 | 83 |
| 84 // Tell the utility process to parse a JSON string into a Value object. | 84 // Tell the utility process to parse a JSON string into a Value object. |
| 85 IPC_MESSAGE_CONTROL1(UtilityMsg_ParseJSON, | 85 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_ParseJSON, |
| 86 std::string /* JSON to parse */) | 86 std::string /* JSON to parse */) |
| 87 | 87 |
| 88 // Tells the utility process to get capabilities and defaults for the specified | 88 // Tells the utility process to get capabilities and defaults for the specified |
| 89 // printer. Used on Windows to isolate the service process from printer driver | 89 // printer. Used on Windows to isolate the service process from printer driver |
| 90 // crashes by executing this in a separate process. This does not run in a | 90 // crashes by executing this in a separate process. This does not run in a |
| 91 // sandbox. | 91 // sandbox. |
| 92 IPC_MESSAGE_CONTROL1(UtilityMsg_GetPrinterCapsAndDefaults, | 92 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetPrinterCapsAndDefaults, |
| 93 std::string /* printer name */) | 93 std::string /* printer name */) |
| 94 | 94 |
| 95 //------------------------------------------------------------------------------ | 95 //------------------------------------------------------------------------------ |
| 96 // Utility process host messages: | 96 // Utility process host messages: |
| 97 // These are messages from the utility process to the browser. | 97 // These are messages from the utility process to the browser. |
| 98 // Reply when the utility process is done unpacking an extension. |manifest| | 98 // Reply when the utility process is done unpacking an extension. |manifest| |
| 99 // is the parsed manifest.json file. | 99 // is the parsed manifest.json file. |
| 100 // The unpacker should also have written out files containing the decoded | 100 // The unpacker should also have written out files containing the decoded |
| 101 // images and message catalogs from the extension. See ExtensionUnpacker for | 101 // images and message catalogs from the extension. See ExtensionUnpacker for |
| 102 // details. | 102 // details. |
| 103 IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Succeeded, | 103 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackExtension_Succeeded, |
| 104 DictionaryValue /* manifest */) | 104 DictionaryValue /* manifest */) |
| 105 | 105 |
| 106 // Reply when the utility process has failed while unpacking an extension. | 106 // Reply when the utility process has failed while unpacking an extension. |
| 107 // |error_message| is a user-displayable explanation of what went wrong. | 107 // |error_message| is a user-displayable explanation of what went wrong. |
| 108 IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackExtension_Failed, | 108 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackExtension_Failed, |
| 109 std::string /* error_message, if any */) | 109 std::string /* error_message, if any */) |
| 110 | 110 |
| 111 // Reply when the utility process is done unpacking and parsing JSON data | 111 // Reply when the utility process is done unpacking and parsing JSON data |
| 112 // from a web resource. | 112 // from a web resource. |
| 113 IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Succeeded, | 113 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Succeeded, |
| 114 DictionaryValue /* json data */) | 114 DictionaryValue /* json data */) |
| 115 | 115 |
| 116 // Reply when the utility process has failed while unpacking and parsing a | 116 // Reply when the utility process has failed while unpacking and parsing a |
| 117 // web resource. |error_message| is a user-readable explanation of what | 117 // web resource. |error_message| is a user-readable explanation of what |
| 118 // went wrong. | 118 // went wrong. |
| 119 IPC_MESSAGE_CONTROL1(UtilityHostMsg_UnpackWebResource_Failed, | 119 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, |
| 120 std::string /* error_message, if any */) | 120 std::string /* error_message, if any */) |
| 121 | 121 |
| 122 // Reply when the utility process has succeeded in parsing an update manifest | 122 // Reply when the utility process has succeeded in parsing an update manifest |
| 123 // xml document. | 123 // xml document. |
| 124 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Succeeded, | 124 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseUpdateManifest_Succeeded, |
| 125 UpdateManifest::Results /* updates */) | 125 UpdateManifest::Results /* updates */) |
| 126 | 126 |
| 127 // Reply when an error occured parsing the update manifest. |error_message| | 127 // Reply when an error occured parsing the update manifest. |error_message| |
| 128 // is a description of what went wrong suitable for logging. | 128 // is a description of what went wrong suitable for logging. |
| 129 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseUpdateManifest_Failed, | 129 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseUpdateManifest_Failed, |
| 130 std::string /* error_message, if any */) | 130 std::string /* error_message, if any */) |
| 131 | 131 |
| 132 // Reply when the utility process has succeeded in decoding the image. | 132 // Reply when the utility process has succeeded in decoding the image. |
| 133 IPC_MESSAGE_CONTROL1(UtilityHostMsg_DecodeImage_Succeeded, | 133 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_DecodeImage_Succeeded, |
| 134 SkBitmap) // decoded image | 134 SkBitmap) // decoded image |
| 135 | 135 |
| 136 // Reply when an error occured decoding the image. | 136 // Reply when an error occured decoding the image. |
| 137 IPC_MESSAGE_CONTROL0(UtilityHostMsg_DecodeImage_Failed) | 137 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_DecodeImage_Failed) |
| 138 | 138 |
| 139 // Reply when the utility process has succeeded in rendering the PDF. | 139 // Reply when the utility process has succeeded in rendering the PDF. |
| 140 IPC_MESSAGE_CONTROL1(UtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, | 140 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Succeeded, |
| 141 int) // Highest rendered page number | 141 int) // Highest rendered page number |
| 142 | 142 |
| 143 // Reply when an error occured rendering the PDF. | 143 // Reply when an error occured rendering the PDF. |
| 144 IPC_MESSAGE_CONTROL0(UtilityHostMsg_RenderPDFPagesToMetafile_Failed) | 144 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_RenderPDFPagesToMetafile_Failed) |
| 145 | 145 |
| 146 #if defined(OS_WIN) | 146 #if defined(OS_WIN) |
| 147 // Request that the given font be loaded by the host so it's cached by the | 147 // Request that the given font be loaded by the host so it's cached by the |
| 148 // OS. Please see ChildProcessHost::PreCacheFont for details. | 148 // OS. Please see ChildProcessHost::PreCacheFont for details. |
| 149 IPC_SYNC_MESSAGE_CONTROL1_0(UtilityHostMsg_PreCacheFont, | 149 IPC_SYNC_MESSAGE_CONTROL1_0(ChromeUtilityHostMsg_PreCacheFont, |
| 150 LOGFONT /* font data */) | 150 LOGFONT /* font data */) |
| 151 #endif // defined(OS_WIN) | 151 #endif // defined(OS_WIN) |
| 152 | 152 |
| 153 // Reply when the utility process successfully parsed a JSON string. | 153 // Reply when the utility process successfully parsed a JSON string. |
| 154 // | 154 // |
| 155 // WARNING: The result can be of any Value subclass type, but we can't easily | 155 // WARNING: The result can be of any Value subclass type, but we can't easily |
| 156 // pass indeterminate value types by const object reference with our IPC macros, | 156 // pass indeterminate value types by const object reference with our IPC macros, |
| 157 // so we put the result Value into a ListValue. Handlers should examine the | 157 // so we put the result Value into a ListValue. Handlers should examine the |
| 158 // first (and only) element of the ListValue for the actual result. | 158 // first (and only) element of the ListValue for the actual result. |
| 159 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Succeeded, | 159 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseJSON_Succeeded, |
| 160 ListValue) | 160 ListValue) |
| 161 | 161 |
| 162 // Reply when the utility process failed in parsing a JSON string. | 162 // Reply when the utility process failed in parsing a JSON string. |
| 163 IPC_MESSAGE_CONTROL1(UtilityHostMsg_ParseJSON_Failed, | 163 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseJSON_Failed, |
| 164 std::string /* error message, if any*/) | 164 std::string /* error message, if any*/) |
| 165 | 165 |
| 166 // Reply when the utility process has succeeded in obtaining the printer | 166 // Reply when the utility process has succeeded in obtaining the printer |
| 167 // capabilities and defaults. | 167 // capabilities and defaults. |
| 168 IPC_MESSAGE_CONTROL2(UtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded, | 168 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Succeeded, |
| 169 std::string /* printer name */, | 169 std::string /* printer name */, |
| 170 printing::PrinterCapsAndDefaults) | 170 printing::PrinterCapsAndDefaults) |
| 171 | 171 |
| 172 // Reply when the utility process has failed to obtain the printer | 172 // Reply when the utility process has failed to obtain the printer |
| 173 // capabilities and defaults. | 173 // capabilities and defaults. |
| 174 IPC_MESSAGE_CONTROL1(UtilityHostMsg_GetPrinterCapsAndDefaults_Failed, | 174 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_GetPrinterCapsAndDefaults_Failed, |
| 175 std::string /* printer name */) | 175 std::string /* printer name */) |
| OLD | NEW |