dom/filesystem/FileSystemPermissionRequest.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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_FileSystemPermissionRequest_h
     8 #define mozilla_dom_FileSystemPermissionRequest_h
    10 #include "PCOMContentPermissionRequestChild.h"
    11 #include "nsAutoPtr.h"
    12 #include "nsContentPermissionHelper.h"
    13 #include "nsIRunnable.h"
    15 class nsCString;
    16 class nsPIDOMWindow;
    18 namespace mozilla {
    19 namespace dom {
    21 class FileSystemTaskBase;
    23 class FileSystemPermissionRequest MOZ_FINAL
    24   : public nsIContentPermissionRequest
    25   , public nsIRunnable
    26   , public PCOMContentPermissionRequestChild
    27 {
    28 public:
    29   // Request permission for the given task.
    30   static void
    31   RequestForTask(FileSystemTaskBase* aTask);
    33   // Overrides PCOMContentPermissionRequestChild
    35   virtual void
    36   IPDLRelease() MOZ_OVERRIDE;
    38   bool
    39   Recv__delete__(const bool& aAllow,
    40     const InfallibleTArray<PermissionChoice>& aChoices) MOZ_OVERRIDE;
    42   NS_DECL_THREADSAFE_ISUPPORTS
    43   NS_DECL_NSICONTENTPERMISSIONREQUEST
    44   NS_DECL_NSIRUNNABLE
    45 private:
    46   FileSystemPermissionRequest(FileSystemTaskBase* aTask);
    48   virtual
    49   ~FileSystemPermissionRequest();
    51   nsCString mPermissionType;
    52   nsCString mPermissionAccess;
    53   nsRefPtr<FileSystemTaskBase> mTask;
    54   nsCOMPtr<nsPIDOMWindow> mWindow;
    55   nsCOMPtr<nsIPrincipal> mPrincipal;
    56 };
    58 } // namespace dom
    59 } // namespace mozilla
    61 #endif // mozilla_dom_FileSystemPermissionRequest_h

mercurial