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) |
| 8 #include <Windows.h> |
| 9 #endif // defined(OS_WIN) |
| 10 |
7 #include <string> | 11 #include <string> |
8 #include <vector> | 12 #include <vector> |
9 | 13 |
10 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
11 #include "base/strings/string16.h" | 15 #include "base/strings/string16.h" |
12 #include "base/tuple.h" | 16 #include "base/tuple.h" |
13 #include "base/values.h" | 17 #include "base/values.h" |
14 #include "chrome/common/safe_browsing/zip_analyzer.h" | 18 #include "chrome/common/safe_browsing/zip_analyzer.h" |
15 #include "ipc/ipc_message_macros.h" | 19 #include "ipc/ipc_message_macros.h" |
16 #include "ipc/ipc_platform_file.h" | 20 #include "ipc/ipc_platform_file.h" |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 // be used if the host process needs a handle to the running utility process. | 83 // be used if the host process needs a handle to the running utility process. |
80 IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_StartupPing) | 84 IPC_MESSAGE_CONTROL0(ChromeUtilityMsg_StartupPing) |
81 | 85 |
82 #if defined(FULL_SAFE_BROWSING) | 86 #if defined(FULL_SAFE_BROWSING) |
83 // Tells the utility process to analyze a zip file for malicious download | 87 // Tells the utility process to analyze a zip file for malicious download |
84 // protection. | 88 // protection. |
85 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeZipFileForDownloadProtection, | 89 IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeZipFileForDownloadProtection, |
86 IPC::PlatformFileForTransit /* zip_file */) | 90 IPC::PlatformFileForTransit /* zip_file */) |
87 #endif | 91 #endif |
88 | 92 |
| 93 #if defined(OS_WIN) |
| 94 // A vector of filters, each being a Tuple2a display string (i.e. "Text Files") |
| 95 // and a filter pattern (i.e. "*.txt").. |
| 96 typedef std::vector<Tuple2<base::string16, base::string16> > |
| 97 GetOpenFileNameFilter; |
| 98 |
| 99 // Instructs the utility process to invoke GetOpenFileName. |owner| is the |
| 100 // parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the |
| 101 // user's file choices. |initial_directory| and |filename| select the directory |
| 102 // to be displayed and the file to be initially selected. |
| 103 // |
| 104 // Either ChromeUtilityHostMsg_GetOpenFileName_Failed or |
| 105 // ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the |
| 106 // operation completes whether due to error or user action. |
| 107 IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName, |
| 108 HWND /* owner */, |
| 109 DWORD /* flags */, |
| 110 GetOpenFileNameFilter /* filter */, |
| 111 base::FilePath /* initial_directory */, |
| 112 base::FilePath /* filename */) |
| 113 #endif // defined(OS_WIN) |
| 114 |
89 //------------------------------------------------------------------------------ | 115 //------------------------------------------------------------------------------ |
90 // Utility process host messages: | 116 // Utility process host messages: |
91 // These are messages from the utility process to the browser. | 117 // These are messages from the utility process to the browser. |
92 | 118 |
93 // Reply when the utility process is done unpacking and parsing JSON data | 119 // Reply when the utility process is done unpacking and parsing JSON data |
94 // from a web resource. | 120 // from a web resource. |
95 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Succeeded, | 121 IPC_MESSAGE_CONTROL1(ChromeUtilityHostMsg_UnpackWebResource_Succeeded, |
96 base::DictionaryValue /* json data */) | 122 base::DictionaryValue /* json data */) |
97 | 123 |
98 // Reply when the utility process has failed while unpacking and parsing a | 124 // Reply when the utility process has failed while unpacking and parsing a |
(...skipping 26 matching lines...) Expand all Loading... |
125 | 151 |
126 // Reply when the utility process has started. | 152 // Reply when the utility process has started. |
127 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_ProcessStarted) | 153 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_ProcessStarted) |
128 | 154 |
129 #if defined(FULL_SAFE_BROWSING) | 155 #if defined(FULL_SAFE_BROWSING) |
130 // Reply when a zip file has been analyzed for malicious download protection. | 156 // Reply when a zip file has been analyzed for malicious download protection. |
131 IPC_MESSAGE_CONTROL1( | 157 IPC_MESSAGE_CONTROL1( |
132 ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished, | 158 ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished, |
133 safe_browsing::zip_analyzer::Results) | 159 safe_browsing::zip_analyzer::Results) |
134 #endif | 160 #endif |
| 161 |
| 162 #if defined(OS_WIN) |
| 163 IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed) |
| 164 IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result, |
| 165 base::FilePath /* directory */, |
| 166 std::vector<base::FilePath> /* filenames */) |
| 167 #endif // defined(OS_WIN) |
OLD | NEW |