Bug 593891 - Part 1 : Wrap an nsIFile in an nsIDOMFile [r=sicking]

This commit is contained in:
Fabrice Desré 2011-09-26 17:25:41 -07:00
parent 2d00fc8b3a
commit ff414396a2
2 changed files with 16 additions and 1 deletions

View File

@ -72,6 +72,7 @@
#include "nsIPresShell.h"
#include "nsStyleAnimation.h"
#include "nsCSSProps.h"
#include "nsDOMFile.h"
#if defined(MOZ_X11) && defined(MOZ_WIDGET_GTK2)
#include <gdk/gdk.h>
@ -1841,6 +1842,13 @@ nsDOMWindowUtils::GetOuterWindowWithId(PRUint64 aWindowID,
return NS_OK;
}
NS_IMETHODIMP
nsDOMWindowUtils::WrapDOMFile(nsIFile *aFile,
nsIDOMFile **aDOMFile) {
NS_ADDREF(*aDOMFile = new nsDOMFileFile(aFile));
return NS_OK;
}
#ifdef DEBUG
static PRBool
CheckLeafLayers(Layer* aLayer, const nsIntPoint& aOffset, nsIntRegion* aCoveredRegion)

View File

@ -65,8 +65,10 @@ interface nsIDOMEvent;
interface nsITransferable;
interface nsIQueryContentEventResult;
interface nsIDOMWindow;
interface nsIDOMFile;
interface nsIFile;
[scriptable, uuid(748746a7-a6f4-41d6-bc82-1788981b2623)]
[scriptable, uuid(bc6c156a-c41f-43dd-ace3-e3bca9894ed1)]
interface nsIDOMWindowUtils : nsISupports {
/**
@ -888,6 +890,11 @@ interface nsIDOMWindowUtils : nsISupports {
in AString value1,
in AString value2);
/**
* Wrap an nsIFile in an nsIDOMFile
*/
nsIDOMFile wrapDOMFile(in nsIFile aFile);
/**
* Get the type of the currently focused html input, if any.
*/