1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/filesystem/FileSystemRequestParent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,49 @@ 1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim:set ts=2 sw=2 sts=2 et cindent: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +#ifndef mozilla_dom_FileSystemRequestParent_h 1.11 +#define mozilla_dom_FileSystemRequestParent_h 1.12 + 1.13 +#include "mozilla/dom/PFileSystemRequestParent.h" 1.14 +#include "mozilla/dom/ContentChild.h" 1.15 +#include "mozilla/dom/ContentParent.h" 1.16 + 1.17 +namespace mozilla { 1.18 +namespace dom { 1.19 + 1.20 +class FileSystemBase; 1.21 + 1.22 +class FileSystemRequestParent MOZ_FINAL 1.23 + : public PFileSystemRequestParent 1.24 +{ 1.25 + NS_INLINE_DECL_THREADSAFE_REFCOUNTING(FileSystemRequestParent) 1.26 +public: 1.27 + FileSystemRequestParent(); 1.28 + 1.29 + bool 1.30 + IsRunning() 1.31 + { 1.32 + return state() == PFileSystemRequest::__Start; 1.33 + } 1.34 + 1.35 + bool 1.36 + Dispatch(ContentParent* aParent, const FileSystemParams& aParams); 1.37 + 1.38 + virtual void 1.39 + ActorDestroy(ActorDestroyReason why) MOZ_OVERRIDE; 1.40 + 1.41 +private: 1.42 + // Private destructor, to discourage deletion outside of Release(): 1.43 + virtual 1.44 + ~FileSystemRequestParent(); 1.45 + 1.46 + nsRefPtr<FileSystemBase> mFileSystem; 1.47 +}; 1.48 + 1.49 +} // namespace dom 1.50 +} // namespace mozilla 1.51 + 1.52 +#endif // mozilla_dom_FileSystemRequestParent_h