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

Unified Diff: chrome/common/chrome_utility_messages.h

Issue 419523006: Experimentally isolate GetOpenFileName in a utility process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/chrome_utility.gypi ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/chrome_utility_messages.h
diff --git a/chrome/common/chrome_utility_messages.h b/chrome/common/chrome_utility_messages.h
index e1710996a8623ab5605525e0620391b93a95aef9..e69b75ff7425d1858e1a7abe30bce068b76b093a 100644
--- a/chrome/common/chrome_utility_messages.h
+++ b/chrome/common/chrome_utility_messages.h
@@ -4,6 +4,10 @@
// Multiply-included message file, so no include guard.
+#if defined(OS_WIN)
+#include <Windows.h>
+#endif // defined(OS_WIN)
+
#include <string>
#include <vector>
@@ -86,6 +90,28 @@ IPC_MESSAGE_CONTROL1(ChromeUtilityMsg_AnalyzeZipFileForDownloadProtection,
IPC::PlatformFileForTransit /* zip_file */)
#endif
+#if defined(OS_WIN)
+// A vector of filters, each being a Tuple2a display string (i.e. "Text Files")
+// and a filter pattern (i.e. "*.txt")..
+typedef std::vector<Tuple2<base::string16, base::string16> >
+ GetOpenFileNameFilter;
+
+// Instructs the utility process to invoke GetOpenFileName. |owner| is the
+// parent of the modal dialog, |flags| are OFN_* flags. |filter| constrains the
+// user's file choices. |initial_directory| and |filename| select the directory
+// to be displayed and the file to be initially selected.
+//
+// Either ChromeUtilityHostMsg_GetOpenFileName_Failed or
+// ChromeUtilityHostMsg_GetOpenFileName_Result will be returned when the
+// operation completes whether due to error or user action.
+IPC_MESSAGE_CONTROL5(ChromeUtilityMsg_GetOpenFileName,
+ HWND /* owner */,
+ DWORD /* flags */,
+ GetOpenFileNameFilter /* filter */,
+ base::FilePath /* initial_directory */,
+ base::FilePath /* filename */)
+#endif // defined(OS_WIN)
+
//------------------------------------------------------------------------------
// Utility process host messages:
// These are messages from the utility process to the browser.
@@ -132,3 +158,10 @@ IPC_MESSAGE_CONTROL1(
ChromeUtilityHostMsg_AnalyzeZipFileForDownloadProtection_Finished,
safe_browsing::zip_analyzer::Results)
#endif
+
+#if defined(OS_WIN)
+IPC_MESSAGE_CONTROL0(ChromeUtilityHostMsg_GetOpenFileName_Failed)
+IPC_MESSAGE_CONTROL2(ChromeUtilityHostMsg_GetOpenFileName_Result,
+ base::FilePath /* directory */,
+ std::vector<base::FilePath> /* filenames */)
+#endif // defined(OS_WIN)
« no previous file with comments | « chrome/chrome_utility.gypi ('k') | chrome/utility/chrome_content_utility_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698