1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/dom/plugins/ipc/PluginStreamParent.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +/* -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 8 -*- */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef mozilla_plugins_PluginStreamParent_h 1.10 +#define mozilla_plugins_PluginStreamParent_h 1.11 + 1.12 +#include "mozilla/plugins/PPluginStreamParent.h" 1.13 +#include "mozilla/plugins/AStream.h" 1.14 + 1.15 +namespace mozilla { 1.16 +namespace plugins { 1.17 + 1.18 +class PluginInstanceParent; 1.19 + 1.20 +class PluginStreamParent : public PPluginStreamParent, public AStream 1.21 +{ 1.22 + friend class PluginModuleParent; 1.23 + friend class PluginInstanceParent; 1.24 + 1.25 +public: 1.26 + PluginStreamParent(PluginInstanceParent* npp, const nsCString& mimeType, 1.27 + const nsCString& target, NPError* result); 1.28 + virtual ~PluginStreamParent() { } 1.29 + 1.30 + virtual bool IsBrowserStream() MOZ_OVERRIDE { return false; } 1.31 + 1.32 + virtual bool AnswerNPN_Write(const Buffer& data, int32_t* written) MOZ_OVERRIDE; 1.33 + 1.34 + virtual bool Answer__delete__(const NPError& reason, const bool& artificial) MOZ_OVERRIDE; 1.35 + 1.36 +private: 1.37 + void NPN_DestroyStream(NPReason reason); 1.38 + 1.39 + PluginInstanceParent* mInstance; 1.40 + NPStream* mStream; 1.41 + bool mClosed; 1.42 +}; 1.43 + 1.44 +} // namespace plugins 1.45 +} // namespace mozilla 1.46 + 1.47 +#endif