michael@0: /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this file, michael@0: * You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_dom_FileSystemPermissionRequest_h michael@0: #define mozilla_dom_FileSystemPermissionRequest_h michael@0: michael@0: #include "PCOMContentPermissionRequestChild.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "nsContentPermissionHelper.h" michael@0: #include "nsIRunnable.h" michael@0: michael@0: class nsCString; michael@0: class nsPIDOMWindow; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class FileSystemTaskBase; michael@0: michael@0: class FileSystemPermissionRequest MOZ_FINAL michael@0: : public nsIContentPermissionRequest michael@0: , public nsIRunnable michael@0: , public PCOMContentPermissionRequestChild michael@0: { michael@0: public: michael@0: // Request permission for the given task. michael@0: static void michael@0: RequestForTask(FileSystemTaskBase* aTask); michael@0: michael@0: // Overrides PCOMContentPermissionRequestChild michael@0: michael@0: virtual void michael@0: IPDLRelease() MOZ_OVERRIDE; michael@0: michael@0: bool michael@0: Recv__delete__(const bool& aAllow, michael@0: const InfallibleTArray& aChoices) MOZ_OVERRIDE; michael@0: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSICONTENTPERMISSIONREQUEST michael@0: NS_DECL_NSIRUNNABLE michael@0: private: michael@0: FileSystemPermissionRequest(FileSystemTaskBase* aTask); michael@0: michael@0: virtual michael@0: ~FileSystemPermissionRequest(); michael@0: michael@0: nsCString mPermissionType; michael@0: nsCString mPermissionAccess; michael@0: nsRefPtr mTask; michael@0: nsCOMPtr mWindow; michael@0: nsCOMPtr mPrincipal; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_FileSystemPermissionRequest_h