win: Add dummy implementation for asynchronous open/save dialog.
authorCheng Zhao <zcbenz@gmail.com>
Tue, 24 Sep 2013 06:47:39 +0000 (14:47 +0800)
committerCheng Zhao <zcbenz@gmail.com>
Tue, 24 Sep 2013 06:47:39 +0000 (14:47 +0800)
browser/ui/file_dialog_win.cc

index 043386c..fa5f691 100644 (file)
@@ -249,6 +249,20 @@ bool ShowOpenDialog(atom::NativeWindow* parent_window,
   return true;
 }
 
+void ShowOpenDialog(atom::NativeWindow* parent_window,
+                    const std::string& title,
+                    const base::FilePath& default_path,
+                    int properties,
+                    const OpenDialogCallback& callback) {
+  std::vector<base::FilePath> paths;
+  bool result = ShowOpenDialog(parent_window,
+                               title,
+                               default_path,
+                               properties,
+                               &paths);
+  callback.Run(result, paths);
+}
+
 bool ShowSaveDialog(atom::NativeWindow* parent_window,
                     const std::string& title,
                     const base::FilePath& default_path,
@@ -292,4 +306,13 @@ bool ShowSaveDialog(atom::NativeWindow* parent_window,
   return true;
 }
 
+void ShowSaveDialog(atom::NativeWindow* parent_window,
+                    const std::string& title,
+                    const base::FilePath& default_path,
+                    const SaveDialogCallback& callback) {
+  base::FilePath path;
+  bool result = ShowSaveDialog(parent_window, title, default_path, &path);
+  callback.Run(result, path);
+}
+
 }  // namespace file_dialog