michael@0: /* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ 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 michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef mozilla_plugins_PluginStreamParent_h michael@0: #define mozilla_plugins_PluginStreamParent_h michael@0: michael@0: #include "mozilla/plugins/PPluginStreamParent.h" michael@0: #include "mozilla/plugins/AStream.h" michael@0: michael@0: namespace mozilla { michael@0: namespace plugins { michael@0: michael@0: class PluginInstanceParent; michael@0: michael@0: class PluginStreamParent : public PPluginStreamParent, public AStream michael@0: { michael@0: friend class PluginModuleParent; michael@0: friend class PluginInstanceParent; michael@0: michael@0: public: michael@0: PluginStreamParent(PluginInstanceParent* npp, const nsCString& mimeType, michael@0: const nsCString& target, NPError* result); michael@0: virtual ~PluginStreamParent() { } michael@0: michael@0: virtual bool IsBrowserStream() MOZ_OVERRIDE { return false; } michael@0: michael@0: virtual bool AnswerNPN_Write(const Buffer& data, int32_t* written) MOZ_OVERRIDE; michael@0: michael@0: virtual bool Answer__delete__(const NPError& reason, const bool& artificial) MOZ_OVERRIDE; michael@0: michael@0: private: michael@0: void NPN_DestroyStream(NPReason reason); michael@0: michael@0: PluginInstanceParent* mInstance; michael@0: NPStream* mStream; michael@0: bool mClosed; michael@0: }; michael@0: michael@0: } // namespace plugins michael@0: } // namespace mozilla michael@0: michael@0: #endif