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

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

Issue 2122303002: Revive experiment to isolate shell operations. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 5 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
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/shell_handler_win.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
8 #include <Windows.h>
9 #endif // defined(OS_WIN)
10
11 #include <string> 7 #include <string>
12 #include <tuple>
13 #include <vector> 8 #include <vector>
14 9
15 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
16 #include "base/strings/string16.h"
17 #include "base/values.h" 11 #include "base/values.h"
18 #include "build/build_config.h" 12 #include "build/build_config.h"
19 #include "ipc/ipc_message_macros.h" 13 #include "ipc/ipc_message_macros.h"
20 #include "ipc/ipc_platform_file.h" 14 #include "ipc/ipc_platform_file.h"
21 #include "ui/gfx/ipc/gfx_param_traits.h" 15 #include "ui/gfx/ipc/gfx_param_traits.h"
22 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" 16 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h"
23 17
24 #if defined(FULL_SAFE_BROWSING) 18 #if defined(FULL_SAFE_BROWSING)
25 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h" 19 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h"
26 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h" 20 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h"
27 #include "chrome/common/safe_browsing/zip_analyzer_results.h" 21 #include "chrome/common/safe_browsing/zip_analyzer_results.h"
28 #endif 22 #endif
29 23
30 // Singly-included section for typedefs. 24 // Singly-included section for typedefs.
31 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ 25 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_
32 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ 26 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_
33 27
34 #if defined(OS_WIN)
35 // A vector of filters, each being a tuple containing a display string (i.e.
36 // "Text Files") and a filter pattern (i.e. "*.txt").
37 typedef std::vector<std::tuple<base::string16, base::string16>>
38 GetOpenFileNameFilter;
39 #endif // OS_WIN
40
41 #endif // CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ 28 #endif // CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_
42 29
43 #define IPC_MESSAGE_START ChromeUtilityMsgStart 30 #define IPC_MESSAGE_START ChromeUtilityMsgStart
44 31
45 #if defined(FULL_SAFE_BROWSING) 32 #if defined(FULL_SAFE_BROWSING)
46 IPC_ENUM_TRAITS_VALIDATE( 33 IPC_ENUM_TRAITS_VALIDATE(
47 safe_browsing::ClientDownloadRequest_DownloadType, 34 safe_browsing::ClientDownloadRequest_DownloadType,
48 safe_browsing::ClientDownloadRequest_DownloadType_IsValid(value)) 35 safe_browsing::ClientDownloadRequest_DownloadType_IsValid(value))
49 36
50 IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN(safe_browsing::ClientDownloadRequest_Digests) 37 IPC_PROTOBUF_MESSAGE_TRAITS_BEGIN(safe_browsing::ClientDownloadRequest_Digests)
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 104
118 IPC_STRUCT_TRAITS_BEGIN(safe_browsing::zip_analyzer::Results) 105 IPC_STRUCT_TRAITS_BEGIN(safe_browsing::zip_analyzer::Results)
119 IPC_STRUCT_TRAITS_MEMBER(success) 106 IPC_STRUCT_TRAITS_MEMBER(success)
120 IPC_STRUCT_TRAITS_MEMBER(has_executable) 107 IPC_STRUCT_TRAITS_MEMBER(has_executable)
121 IPC_STRUCT_TRAITS_MEMBER(has_archive) 108 IPC_STRUCT_TRAITS_MEMBER(has_archive)
122 IPC_STRUCT_TRAITS_MEMBER(archived_binary) 109 IPC_STRUCT_TRAITS_MEMBER(archived_binary)
123 IPC_STRUCT_TRAITS_MEMBER(archived_archive_filenames) 110 IPC_STRUCT_TRAITS_MEMBER(archived_archive_filenames)
124 IPC_STRUCT_TRAITS_END() 111 IPC_STRUCT_TRAITS_END()
125 #endif // FULL_SAFE_BROWSING 112 #endif // FULL_SAFE_BROWSING
126 113
127 #if defined(OS_WIN)
128 IPC_STRUCT_BEGIN(ChromeUtilityMsg_GetSaveFileName_Params)
129 IPC_STRUCT_MEMBER(HWND, owner)
130 IPC_STRUCT_MEMBER(DWORD, flags)
131 IPC_STRUCT_MEMBER(GetOpenFileNameFilter, filters)
132 IPC_STRUCT_MEMBER(int, one_based_filter_index)
133 IPC_STRUCT_MEMBER(base::FilePath, suggested_filename)
134 IPC_STRUCT_MEMBER(base::FilePath, initial_directory)
135 IPC_STRUCT_MEMBER(base::string16, default_extension)
136 IPC_STRUCT_END()
137 #endif // OS_WIN
138
139 //------------------------------------------------------------------------------ 114 //------------------------------------------------------------------------------
140 // Utility process messages: 115 // Utility process messages:
141 // These are messages from the browser to the utility process. 116 // These are messages from the browser to the utility process.
142 117
143 // Tell the utility process to patch the given |input_file| using |patch_file| 118 // Tell the utility process to patch the given |input_file| using |patch_file|
144 // and place the output in |output_file|. The patch should use the bsdiff 119 // and place the output in |output_file|. The patch should use the bsdiff
145 // algorithm (Courgette's version). 120 // algorithm (Courgette's version).
146 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff, 121 IPC_MESSAGE_CONTROL3(ChromeUtilityMsg_PatchFileBsdiff,
147 base::FilePath /* input_file */, 122 base::FilePath /* input_file */,
148 base::FilePath /* patch_file */, 123 base::FilePath /* patch_file */,
(...skipping 24 matching lines...) Expand all
173 IPC::PlatformFileForTransit /* temp_file */) 148 IPC::PlatformFileForTransit /* temp_file */)
174 149
175 #if defined(OS_MACOSX) 150 #if defined(OS_MACOSX)
176 // Tells the utility process to analyze a DMG file for malicious download 151 // Tells the utility process to analyze a DMG file for malicious download
177 // protection. 152 // protection.
178 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection, 153 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection,
179 IPC::PlatformFileForTransit /* dmg_file */) 154 IPC::PlatformFileForTransit /* dmg_file */)
180 #endif // defined(OS_MACOSX) 155 #endif // defined(OS_MACOSX)
181 #endif // defined(FULL_SAFE_BROWSING) 156 #endif // defined(FULL_SAFE_BROWSING)
182 157
183 #if defined(OS_WIN)
184 // Instructs the utility process to invoke GetOpenFileName. |owner| is the
185 // parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the
186 // user's file choices. |initial_directory| and |filename| select the directory
187 // to be displayed and the file to be initially selected.
188 //
189 // Either ChromeUtilityHostMsg_GetOpenFileName_Failed or
190 // ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the
191 // operation completes whether due to error or user action.
192 IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName,
193 HWND /* owner */,
194 DWORD /* flags */,
195 GetOpenFileNameFilter /* filter */,
196 base::FilePath /* initial_directory */,
197 base::FilePath /* filename */)
198 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetSaveFileName,
199 ChromeUtilityMsg_GetSaveFileName_Params /* params */)
200 #endif // defined(OS_WIN)
201
202 //------------------------------------------------------------------------------ 158 //------------------------------------------------------------------------------
203 // Utility process host messages: 159 // Utility process host messages:
204 // These are messages from the utility process to the browser. 160 // These are messages from the utility process to the browser.
205 161
206 // Reply when the utility process has failed while unpacking and parsing a 162 // Reply when the utility process has failed while unpacking and parsing a
207 // web resource. |error_message| is a user-readable explanation of what 163 // web resource. |error_message| is a user-readable explanation of what
208 // went wrong. 164 // went wrong.
209 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, 165 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed,
210 std::string /* error_message, if any */) 166 std::string /* error_message, if any */)
211 167
(...skipping 14 matching lines...) Expand all
226 ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished, 182 ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished,
227 safe_browsing::zip_analyzer::Results) 183 safe_browsing::zip_analyzer::Results)
228 184
229 #if defined(OS_MACOSX) 185 #if defined(OS_MACOSX)
230 // Reply when a DMG file has been analyzed for malicious download protection. 186 // Reply when a DMG file has been analyzed for malicious download protection.
231 IPC_MESSAGE_CONTROL1( 187 IPC_MESSAGE_CONTROL1(
232 ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished, 188 ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished,
233 safe_browsing::zip_analyzer::Results) 189 safe_browsing::zip_analyzer::Results)
234 #endif // defined(OS_MACOSX) 190 #endif // defined(OS_MACOSX)
235 #endif // defined(FULL_SAFE_BROWSING) 191 #endif // defined(FULL_SAFE_BROWSING)
236
237 #if defined(OS_WIN)
238 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed)
239 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result,
240 base::FilePath /* directory */,
241 std::vector<base::FilePath> /* filenames */)
242 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed)
243 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result,
244 base::FilePath /* path */,
245 int /* one_based_filter_index */)
246 #endif // defined(OS_WIN)
OLDNEW
« no previous file with comments | « chrome/common/BUILD.gn ('k') | chrome/common/shell_handler_win.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698