зеркало из https://github.com/mozilla/gecko-dev.git
Bug 874213 - DeviceStorage: Add .default attribute to the device storage object. r=janv
This commit is contained in:
Родитель
2e8825ec27
Коммит
3357939e3e
|
@ -3057,6 +3057,14 @@ nsDOMDeviceStorage::GetRootDirectoryForFile(const nsAString& aName, nsIFile** aR
|
|||
return ds->mRootDirectory->Clone(aRootDirectory);
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::GetDefault(bool* aDefault) {
|
||||
nsString defaultStorageName;
|
||||
GetWritableStorageName(mStorageType, defaultStorageName);
|
||||
*aDefault = mStorageName.Equals(defaultStorageName);
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsDOMDeviceStorage::GetStorageName(nsAString& aStorageName)
|
||||
{
|
||||
|
|
|
@ -11,7 +11,7 @@ interface nsIDOMDeviceStorageChangeEvent;
|
|||
interface nsIDOMEventListener;
|
||||
interface nsIFile;
|
||||
|
||||
[scriptable, uuid(7cef14d4-d767-4da7-a18e-32c5e009a8e4), builtinclass]
|
||||
[scriptable, uuid(7c1b2305-0f14-4c07-8a8a-359eeb850068), builtinclass]
|
||||
interface nsIDOMDeviceStorage : nsIDOMEventTarget
|
||||
{
|
||||
[implicit_jscontext] attribute jsval onchange;
|
||||
|
@ -30,5 +30,9 @@ interface nsIDOMDeviceStorage : nsIDOMEventTarget
|
|||
// include any path information.
|
||||
readonly attribute DOMString storageName;
|
||||
|
||||
// Determines if this storage area is the one which will be used by default
|
||||
// for storing new files.
|
||||
readonly attribute bool default;
|
||||
|
||||
[noscript] nsIFile getRootDirectoryForFile(in DOMString aName);
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче