Bug 731307 - IDL change for async file picker. r=roc, sr=mounir
authorBrian R. Bondy <netzen@gmail.com>
Fri, 17 Aug 2012 11:35:00 -0400
changeset 108118 b16ef09f140c65e1a6983e83505b536f14b952c0
parent 108117 314b3a20a88cce6da2d8a439f4cd6d51a795dcc5
child 108119 fccf7aeabfe96647c8155b3e7a4100731cf5556d
push id1490
push userakeybl@mozilla.com
push dateMon, 08 Oct 2012 18:29:50 +0000
treeherdermozilla-beta@f335e7dacdc1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc, mounir
bugs731307
milestone17.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 731307 - IDL change for async file picker. r=roc, sr=mounir
widget/nsIFilePicker.idl
--- a/widget/nsIFilePicker.idl
+++ b/widget/nsIFilePicker.idl
@@ -6,17 +6,29 @@
 
 #include "nsISupports.idl"
 
 interface nsIFile;
 interface nsIURI;
 interface nsIDOMWindow;
 interface nsISimpleEnumerator;
 
-[scriptable, uuid(f2c0e216-5d07-4df4-bbcb-37683077ae7e)]
+[scriptable, uuid(0d79adad-b244-49A5-9997-2a8cad93fc44)]
+interface nsIFilePickerShownCallback : nsISupports
+{
+ /**
+  * Callback which is called when a filepicker is shown and a result
+  * is returned.
+  *
+  * @param aResult One of returnOK, returnCancel, or returnReplace
+  */
+  void done(in short aResult);
+};
+
+[scriptable, uuid(60e2dfb6-3fc7-4A2C-8137-16bef44536fc)]
 interface nsIFilePicker : nsISupports
 {
   const short modeOpen        = 0;              // Load a file or directory
   const short modeSave        = 1;              // Save a file or directory
   const short modeGetFolder   = 2;              // Select a folder/directory
   const short modeOpenMultiple= 3;              // Load multiple files
 
   const short returnOK        = 0;              // User hit Ok, process selection
@@ -138,10 +150,18 @@ interface nsIFilePicker : nsISupports
   attribute boolean addToRecentDocs;
 
  /**
   * Show File Dialog. The dialog is displayed modally.
   *
   * @return returnOK if the user selects OK, returnCancel if the user selects cancel
   *
   */
-  short show();
+  [deprecated] short show();
+
+
+ /**
+  * Opens the file dialog asynchrounously.
+  * The passed in object's done method will be called upon completion.
+  */
+  void open(in nsIFilePickerShownCallback aFilePickerShownCallback);
+
 };