Chromium Code Reviews| 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 // Multiply-included message file, so no include guard. | 5 // Multiply-included message file, so no include guard. |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <Windows.h> | 8 #include <Windows.h> |
| 9 #endif // defined(OS_WIN) | 9 #endif // defined(OS_WIN) |
| 10 | 10 |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
| 15 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
| 16 #include "base/tuple.h" | 16 #include "base/tuple.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "chrome/common/safe_browsing/zip_analyzer.h" | 18 #include "chrome/common/safe_browsing/zip_analyzer.h" |
| 19 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
| 20 #include "ipc/ipc_platform_file.h" | 20 #include "ipc/ipc_platform_file.h" |
| 21 #include "third_party/skia/include/core/SkBitmap.h" | 21 #include "third_party/skia/include/core/SkBitmap.h" |
| 22 #include "ui/gfx/ipc/gfx_param_traits.h" | 22 #include "ui/gfx/ipc/gfx_param_traits.h" |
| 23 | 23 |
| 24 // Singly-included section for typedefs. | 24 // Singly-included section for typedefs. |
| 25 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ | 25 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ |
| 26 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ | 26 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ |
| 27 | 27 |
| 28 namespace chromeutility { | |
| 29 static const int DUMMY_IMAGE_DELEGATE_ID = -999; | |
|
dcheng
2015/02/27 16:47:18
I think we should be looking into how to clean up
Theresa
2015/03/04 03:10:07
I agree, see webstore_install_helper.cc for though
| |
| 30 } // namespace chromeutility | |
| 31 | |
| 28 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
| 29 // A vector of filters, each being a Tuple containing a display string (i.e. | 33 // A vector of filters, each being a Tuple containing a display string (i.e. |
| 30 // "Text Files") and a filter pattern (i.e. "*.txt"). | 34 // "Text Files") and a filter pattern (i.e. "*.txt"). |
| 31 typedef std::vector<Tuple<base::string16, base::string16>> | 35 typedef std::vector<Tuple<base::string16, base::string16>> |
| 32 GetOpenFileNameFilter; | 36 GetOpenFileNameFilter; |
| 33 #endif // OS_WIN | 37 #endif // OS_WIN |
| 34 | 38 |
| 35 #endif // CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ | 39 #endif // CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ |
| 36 | 40 |
| 37 #define IPC_MESSAGE_START ChromeUtilityMsgStart | 41 #define IPC_MESSAGE_START ChromeUtilityMsgStart |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 58 | 62 |
| 59 //------------------------------------------------------------------------------ | 63 //------------------------------------------------------------------------------ |
| 60 // Utility process messages: | 64 // Utility process messages: |
| 61 // These are messages from the browser to the utility process. | 65 // These are messages from the browser to the utility process. |
| 62 | 66 |
| 63 // Tell the utility process to parse a JSON string into a Value object. | 67 // Tell the utility process to parse a JSON string into a Value object. |
| 64 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_ParseJSON, | 68 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_ParseJSON, |
| 65 std::string /* JSON to parse */) | 69 std::string /* JSON to parse */) |
| 66 | 70 |
| 67 // Tell the utility process to decode the given image data. | 71 // Tell the utility process to decode the given image data. |
| 68 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_DecodeImage, | 72 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_DecodeImage, |
| 69 std::vector<unsigned char> /* encoded image contents */, | 73 std::vector<unsigned char> /* encoded image contents */, |
| 70 bool /* shrink image if needed for IPC msg limit */) | 74 bool /* shrink image if needed for IPC msg limit */, |
| 75 int /* delegate id */) | |
| 71 | 76 |
| 72 // Tell the utility process to decode the given JPEG image data with a robust | 77 // Tell the utility process to decode the given JPEG image data with a robust |
| 73 // libjpeg codec. | 78 // libjpeg codec. |
| 74 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_RobustJPEGDecodeImage, | 79 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RobustJPEGDecodeImage, |
| 75 std::vector<unsigned char>) // encoded image contents | 80 std::vector<unsigned char> /* encoded image contents*/, |
| 81 int /* delegate id */) | |
| 76 | 82 |
| 77 // Tell the utility process to patch the given |input_file| using |patch_file| | 83 // Tell the utility process to patch the given |input_file| using |patch_file| |
| 78 // and place the output in |output_file|. The patch should use the bsdiff | 84 // and place the output in |output_file|. The patch should use the bsdiff |
| 79 // algorithm (Courgette's version). | 85 // algorithm (Courgette's version). |
| 80 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff, | 86 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff, |
| 81 base::FilePath /* input_file */, | 87 base::FilePath /* input_file */, |
| 82 base::FilePath /* patch_file */, | 88 base::FilePath /* patch_file */, |
| 83 base::FilePath /* output_file */) | 89 base::FilePath /* output_file */) |
| 84 | 90 |
| 85 // Tell the utility process to patch the given |input_file| using |patch_file| | 91 // Tell the utility process to patch the given |input_file| using |patch_file| |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 149 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseJSON_Failed, | 155 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_ParseJSON_Failed, |
| 150 std::string /* error message, if any*/) | 156 std::string /* error message, if any*/) |
| 151 | 157 |
| 152 // Reply when the utility process has failed while unpacking and parsing a | 158 // Reply when the utility process has failed while unpacking and parsing a |
| 153 // web resource. |error_message| is a user-readable explanation of what | 159 // web resource. |error_message| is a user-readable explanation of what |
| 154 // went wrong. | 160 // went wrong. |
| 155 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, | 161 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, |
| 156 std::string /* error_message, if any */) | 162 std::string /* error_message, if any */) |
| 157 | 163 |
| 158 // Reply when the utility process has succeeded in decoding the image. | 164 // Reply when the utility process has succeeded in decoding the image. |
| 159 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_DecodeImage_Succeeded, | 165 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_DecodeImage_Succeeded, |
| 160 SkBitmap) // decoded image | 166 SkBitmap /* decoded image */, |
| 167 int /* delegate id */) | |
| 161 | 168 |
| 162 // Reply when an error occurred decoding the image. | 169 // Reply when an error occurred decoding the image. |
| 163 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_DecodeImage_Failed) | 170 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_DecodeImage_Failed, |
| 171 int /* delegate id */) | |
| 164 | 172 |
| 165 // Reply when a file has been patched. | 173 // Reply when a file has been patched. |
| 166 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_PatchFile_Finished, int /* result */) | 174 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_PatchFile_Finished, int /* result */) |
| 167 | 175 |
| 168 #if defined(OS_CHROMEOS) | 176 #if defined(OS_CHROMEOS) |
| 169 // Reply when the utility process has succeeded in creating the zip file. | 177 // Reply when the utility process has succeeded in creating the zip file. |
| 170 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Succeeded) | 178 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Succeeded) |
| 171 | 179 |
| 172 // Reply when an error occured in creating the zip file. | 180 // Reply when an error occured in creating the zip file. |
| 173 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Failed) | 181 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Failed) |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 188 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, | 196 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, |
| 189 base::FilePath /* directory */, | 197 base::FilePath /* directory */, |
| 190 std::vector<base::FilePath> /* filenames */) | 198 std::vector<base::FilePath> /* filenames */) |
| 191 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) | 199 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) |
| 192 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, | 200 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, |
| 193 base::FilePath /* path */, | 201 base::FilePath /* path */, |
| 194 int /* one_based_filter_index */) | 202 int /* one_based_filter_index */) |
| 195 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_BuildDirectWriteFontCache, | 203 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_BuildDirectWriteFontCache, |
| 196 base::FilePath /* cache file path */) | 204 base::FilePath /* cache file path */) |
| 197 #endif // defined(OS_WIN) | 205 #endif // defined(OS_WIN) |
| OLD | NEW |