Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Side by Side Diff: chrome/common/chrome_utility_messages.h

Issue 1844103004: Convert the utility process image decoder into a Mojo service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and address comments. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <tuple> 12 #include <tuple>
13 #include <vector> 13 #include <vector>
14 14
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/strings/string16.h" 16 #include "base/strings/string16.h"
17 #include "base/values.h" 17 #include "base/values.h"
18 #include "build/build_config.h" 18 #include "build/build_config.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"
22 #include "ui/gfx/ipc/gfx_param_traits.h" 21 #include "ui/gfx/ipc/gfx_param_traits.h"
23 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" 22 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
24 23
25 #if defined(FULL_SAFE_BROWSING) 24 #if defined(FULL_SAFE_BROWSING)
26 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h" 25 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h"
27 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h" 26 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h"
28 #include "chrome/common/safe_browsing/zip_analyzer_results.h" 27 #include "chrome/common/safe_browsing/zip_analyzer_results.h"
29 #endif 28 #endif
30 29
31 // Singly-included section for typedefs. 30 // Singly-included section for typedefs.
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 IPC_STRUCT_MEMBER(base::FilePath, suggested_filename) 133 IPC_STRUCT_MEMBER(base::FilePath, suggested_filename)
135 IPC_STRUCT_MEMBER(base::FilePath, initial_directory) 134 IPC_STRUCT_MEMBER(base::FilePath, initial_directory)
136 IPC_STRUCT_MEMBER(base::string16, default_extension) 135 IPC_STRUCT_MEMBER(base::string16, default_extension)
137 IPC_STRUCT_END() 136 IPC_STRUCT_END()
138 #endif // OS_WIN 137 #endif // OS_WIN
139 138
140 //------------------------------------------------------------------------------ 139 //------------------------------------------------------------------------------
141 // Utility process messages: 140 // Utility process messages:
142 // These are messages from the browser to the utility process. 141 // These are messages from the browser to the utility process.
143 142
144 // Tell the utility process to decode the given image data.
145 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_DecodeImage,
146 std::vector<unsigned char> /* encoded image contents */,
147 bool /* shrink image if needed for IPC msg limit */,
148 int /* delegate id */)
149
150 #if defined(OS_CHROMEOS)
151 // Tell the utility process to decode the given JPEG image data with a robust
152 // libjpeg codec.
153 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RobustJPEGDecodeImage,
154 std::vector<unsigned char> /* encoded image contents*/,
155 int /* delegate id */)
156 // Tell the utility process to decode the given PNG image data with a robust
157 // libpng codec.
158 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_RobustPNGDecodeImage,
159 std::vector<unsigned char> /* encoded image contents*/,
160 int /* delegate id */)
161 #endif // defined(OS_CHROMEOS)
162
163 // Tell the utility process to patch the given |input_file| using |patch_file| 143 // Tell the utility process to patch the given |input_file| using |patch_file|
164 // and place the output in |output_file|. The patch should use the bsdiff 144 // and place the output in |output_file|. The patch should use the bsdiff
165 // algorithm (Courgette's version). 145 // algorithm (Courgette's version).
166 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff, 146 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff,
167 base::FilePath /* input_file */, 147 base::FilePath /* input_file */,
168 base::FilePath /* patch_file */, 148 base::FilePath /* patch_file */,
169 base::FilePath /* output_file */) 149 base::FilePath /* output_file */)
170 150
171 // Tell the utility process to patch the given |input_file| using |patch_file| 151 // Tell the utility process to patch the given |input_file| using |patch_file|
172 // and place the output in |output_file|. The patch should use the Courgette 152 // and place the output in |output_file|. The patch should use the Courgette
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 //------------------------------------------------------------------------------ 215 //------------------------------------------------------------------------------
236 // Utility process host messages: 216 // Utility process host messages:
237 // These are messages from the utility process to the browser. 217 // These are messages from the utility process to the browser.
238 218
239 // Reply when the utility process has failed while unpacking and parsing a 219 // Reply when the utility process has failed while unpacking and parsing a
240 // web resource. |error_message| is a user-readable explanation of what 220 // web resource. |error_message| is a user-readable explanation of what
241 // went wrong. 221 // went wrong.
242 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, 222 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed,
243 std::string /* error_message, if any */) 223 std::string /* error_message, if any */)
244 224
245 // Reply when the utility process has succeeded in decoding the image.
246 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_DecodeImage_Succeeded,
247 SkBitmap /* decoded image */,
248 int /* delegate id */)
249
250 // Reply when an error occurred decoding the image.
251 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_DecodeImage_Failed,
252 int /* delegate id */)
253
254 // Reply when a file has been patched. 225 // Reply when a file has been patched.
255 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_PatchFile_Finished, int /* result */) 226 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_PatchFile_Finished, int /* result */)
256 227
257 #if defined(OS_CHROMEOS) 228 #if defined(OS_CHROMEOS)
258 // Reply when the utility process has succeeded in creating the zip file. 229 // Reply when the utility process has succeeded in creating the zip file.
259 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Succeeded) 230 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Succeeded)
260 231
261 // Reply when an error occured in creating the zip file. 232 // Reply when an error occured in creating the zip file.
262 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Failed) 233 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_CreateZipFile_Failed)
263 #endif // defined(OS_CHROMEOS) 234 #endif // defined(OS_CHROMEOS)
(...skipping 20 matching lines...) Expand all
284 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, 255 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result,
285 base::FilePath /* directory */, 256 base::FilePath /* directory */,
286 std::vector<base::FilePath> /* filenames */) 257 std::vector<base::FilePath> /* filenames */)
287 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) 258 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed)
288 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, 259 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result,
289 base::FilePath /* path */, 260 base::FilePath /* path */,
290 int /* one_based_filter_index */) 261 int /* one_based_filter_index */)
291 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_BuildDirectWriteFontCache, 262 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_BuildDirectWriteFontCache,
292 base::FilePath /* cache file path */) 263 base::FilePath /* cache file path */)
293 #endif // defined(OS_WIN) 264 #endif // defined(OS_WIN)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698