Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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_CreateDirectoryTask_h
8 #define mozilla_dom_CreateDirectoryTask_h
10 #include "mozilla/dom/FileSystemTaskBase.h"
11 #include "nsAutoPtr.h"
13 namespace mozilla {
14 namespace dom {
16 class Promise;
18 class CreateDirectoryTask MOZ_FINAL
19 : public FileSystemTaskBase
20 {
21 public:
22 CreateDirectoryTask(FileSystemBase* aFileSystem,
23 const nsAString& aPath);
24 CreateDirectoryTask(FileSystemBase* aFileSystem,
25 const FileSystemCreateDirectoryParams& aParam,
26 FileSystemRequestParent* aParent);
28 virtual
29 ~CreateDirectoryTask();
31 already_AddRefed<Promise>
32 GetPromise();
34 virtual void
35 GetPermissionAccessType(nsCString& aAccess) const MOZ_OVERRIDE;
37 protected:
38 virtual FileSystemParams
39 GetRequestParams(const nsString& aFileSystem) const MOZ_OVERRIDE;
41 virtual FileSystemResponseValue
42 GetSuccessRequestResult() const MOZ_OVERRIDE;
44 virtual void
45 SetSuccessRequestResult(const FileSystemResponseValue& aValue) MOZ_OVERRIDE;
47 virtual nsresult
48 Work() MOZ_OVERRIDE;
50 virtual void
51 HandlerCallback() MOZ_OVERRIDE;
53 private:
54 nsRefPtr<Promise> mPromise;
55 nsString mTargetRealPath;
56 };
58 } // namespace dom
59 } // namespace mozilla
61 #endif // mozilla_dom_CreateDirectoryTask_h