1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
5 * You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_RemoveTask_h
8 #define mozilla_dom_RemoveTask_h
10 #include "mozilla/dom/FileSystemTaskBase.h"
11 #include "nsAutoPtr.h"
12 #include "mozilla/ErrorResult.h"
20 class RemoveTask MOZ_FINAL
21 : public FileSystemTaskBase
24 RemoveTask(FileSystemBase
* aFileSystem
,
25 const nsAString
& aDirPath
,
26 FileImpl
* aTargetFile
,
27 const nsAString
& aTargetPath
,
30 RemoveTask(FileSystemBase
* aFileSystem
,
31 const FileSystemRemoveParams
& aParam
,
32 FileSystemRequestParent
* aParent
);
37 already_AddRefed
<Promise
>
41 GetPermissionAccessType(nsCString
& aAccess
) const MOZ_OVERRIDE
;
44 virtual FileSystemParams
45 GetRequestParams(const nsString
& aFileSystem
) const MOZ_OVERRIDE
;
47 virtual FileSystemResponseValue
48 GetSuccessRequestResult() const MOZ_OVERRIDE
;
51 SetSuccessRequestResult(const FileSystemResponseValue
& aValue
) MOZ_OVERRIDE
;
57 HandlerCallback() MOZ_OVERRIDE
;
60 nsRefPtr
<Promise
> mPromise
;
61 nsString mDirRealPath
;
62 // This cannot be a File because this object will be used on a different
63 // thread and File is not thread-safe. Let's use the FileImpl instead.
64 nsRefPtr
<FileImpl
> mTargetFileImpl
;
65 nsString mTargetRealPath
;
71 } // namespace mozilla
73 #endif // mozilla_dom_RemoveTask_h