| 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 <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" | |
| 21 #include "ui/gfx/ipc/gfx_param_traits.h" | |
| 22 #include "ui/gfx/ipc/skia/gfx_skia_param_traits.h" | |
| 23 | 20 |
| 24 #if defined(FULL_SAFE_BROWSING) | 21 #if defined(FULL_SAFE_BROWSING) |
| 25 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h" | 22 #include "chrome/common/safe_browsing/ipc_protobuf_message_macros.h" |
| 26 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h" | 23 #include "chrome/common/safe_browsing/protobuf_message_param_traits.h" |
| 27 #include "chrome/common/safe_browsing/zip_analyzer_results.h" | 24 #include "chrome/common/safe_browsing/zip_analyzer_results.h" |
| 28 #endif | 25 #endif |
| 29 | 26 |
| 30 // Singly-included section for typedefs. | 27 // Singly-included section for typedefs. |
| 31 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ | 28 #ifndef CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ |
| 32 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ | 29 #define CHROME_COMMON_CHROME_UTILITY_MESSAGES_H_ |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 133 IPC_STRUCT_MEMBER(base::FilePath, suggested_filename) | 130 IPC_STRUCT_MEMBER(base::FilePath, suggested_filename) |
| 134 IPC_STRUCT_MEMBER(base::FilePath, initial_directory) | 131 IPC_STRUCT_MEMBER(base::FilePath, initial_directory) |
| 135 IPC_STRUCT_MEMBER(base::string16, default_extension) | 132 IPC_STRUCT_MEMBER(base::string16, default_extension) |
| 136 IPC_STRUCT_END() | 133 IPC_STRUCT_END() |
| 137 #endif // OS_WIN | 134 #endif // OS_WIN |
| 138 | 135 |
| 139 //------------------------------------------------------------------------------ | 136 //------------------------------------------------------------------------------ |
| 140 // Utility process messages: | 137 // Utility process messages: |
| 141 // These are messages from the browser to the utility process. | 138 // These are messages from the browser to the utility process. |
| 142 | 139 |
| 143 #if defined(FULL_SAFE_BROWSING) | |
| 144 // Tells the utility process to analyze a zip file for malicious download | |
| 145 // protection, providing a file that can be used temporarily to analyze binaries | |
| 146 // contained therein. | |
| 147 IPC_MESSAGE_CONTROL2(ChromeUtilityMsg_AnalyzeZipFileForDownloadProtection, | |
| 148 IPC::PlatformFileForTransit /* zip_file */, | |
| 149 IPC::PlatformFileForTransit /* temp_file */) | |
| 150 | |
| 151 #if defined(OS_MACOSX) | |
| 152 // Tells the utility process to analyze a DMG file for malicious download | |
| 153 // protection. | |
| 154 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeDmgFileForDownloadProtection, | |
| 155 IPC::PlatformFileForTransit /* dmg_file */) | |
| 156 #endif // defined(OS_MACOSX) | |
| 157 #endif // defined(FULL_SAFE_BROWSING) | |
| 158 | |
| 159 #if defined(OS_WIN) | 140 #if defined(OS_WIN) |
| 160 // Instructs the utility process to invoke GetOpenFileName. |owner| is the | 141 // Instructs the utility process to invoke GetOpenFileName. |owner| is the |
| 161 // parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the | 142 // parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the |
| 162 // user's file choices. |initial_directory| and |filename| select the directory | 143 // user's file choices. |initial_directory| and |filename| select the directory |
| 163 // to be displayed and the file to be initially selected. | 144 // to be displayed and the file to be initially selected. |
| 164 // | 145 // |
| 165 // Either ChromeUtilityHostMsg_GetOpenFileName_Failed or | 146 // Either ChromeUtilityHostMsg_GetOpenFileName_Failed or |
| 166 // ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the | 147 // ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the |
| 167 // operation completes whether due to error or user action. | 148 // operation completes whether due to error or user action. |
| 168 IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName, | 149 IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName, |
| 169 HWND /* owner */, | 150 HWND /* owner */, |
| 170 DWORD /* flags */, | 151 DWORD /* flags */, |
| 171 GetOpenFileNameFilter /* filter */, | 152 GetOpenFileNameFilter /* filter */, |
| 172 base::FilePath /* initial_directory */, | 153 base::FilePath /* initial_directory */, |
| 173 base::FilePath /* filename */) | 154 base::FilePath /* filename */) |
| 174 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetSaveFileName, | 155 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_GetSaveFileName, |
| 175 ChromeUtilityMsg_GetSaveFileName_Params /* params */) | 156 ChromeUtilityMsg_GetSaveFileName_Params /* params */) |
| 176 #endif // defined(OS_WIN) | 157 #endif // defined(OS_WIN) |
| 177 | 158 |
| 178 //------------------------------------------------------------------------------ | 159 //------------------------------------------------------------------------------ |
| 179 // Utility process host messages: | 160 // Utility process host messages: |
| 180 // These are messages from the utility process to the browser. | 161 // These are messages from the utility process to the browser. |
| 181 | 162 |
| 182 // Reply when the utility process has failed while unpacking and parsing a | 163 // Reply when the utility process has failed while unpacking and parsing a |
| 183 // web resource. |error_message| is a user-readable explanation of what | 164 // web resource. |error_message| is a user-readable explanation of what |
| 184 // went wrong. | 165 // went wrong. |
| 185 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, | 166 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Failed, |
| 186 std::string /* error_message, if any */) | 167 std::string /* error_message, if any */) |
| 187 | 168 |
| 188 #if defined(FULL_SAFE_BROWSING) | |
| 189 // Reply when a zip file has been analyzed for malicious download protection. | |
| 190 IPC_MESSAGE_CONTROL1( | |
| 191 ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished, | |
| 192 safe_browsing::zip_analyzer::Results) | |
| 193 | |
| 194 #if defined(OS_MACOSX) | |
| 195 // Reply when a DMG file has been analyzed for malicious download protection. | |
| 196 IPC_MESSAGE_CONTROL1( | |
| 197 ChromeUtilityHostMsg_AnalyzeDmgFileForDownloadProtection_Finished, | |
| 198 safe_browsing::zip_analyzer::Results) | |
| 199 #endif // defined(OS_MACOSX) | |
| 200 #endif // defined(FULL_SAFE_BROWSING) | |
| 201 | |
| 202 #if defined(OS_WIN) | 169 #if defined(OS_WIN) |
| 203 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed) | 170 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed) |
| 204 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, | 171 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, |
| 205 base::FilePath /* directory */, | 172 base::FilePath /* directory */, |
| 206 std::vector<base::FilePath> /* filenames */) | 173 std::vector<base::FilePath> /* filenames */) |
| 207 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) | 174 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetSaveFileName_Failed) |
| 208 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, | 175 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetSaveFileName_Result, |
| 209 base::FilePath /* path */, | 176 base::FilePath /* path */, |
| 210 int /* one_based_filter_index */) | 177 int /* one_based_filter_index */) |
| 211 #endif // defined(OS_WIN) | 178 #endif // defined(OS_WIN) |
| OLD | NEW |