tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

GeckoViewOutputStream.h (909B)


      1 /* -*- Mode: c++; c-basic-offset: 2; tab-width: 2; indent-tabs-mode: nil; -*-
      2 * This Source Code Form is subject to the terms of the Mozilla Public
      3 * License, v. 2.0. If a copy of the MPL was not distributed with this
      4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
      5 
      6 #ifndef GeckoViewOutputStream_h__
      7 #define GeckoViewOutputStream_h__
      8 
      9 #include "mozilla/java/GeckoInputStreamNatives.h"
     10 #include "mozilla/java/GeckoInputStreamWrappers.h"
     11 
     12 #include "nsIOutputStream.h"
     13 #include "nsIRequest.h"
     14 
     15 class GeckoViewOutputStream : public nsIOutputStream {
     16 public:
     17  NS_DECL_THREADSAFE_ISUPPORTS
     18  NS_DECL_NSIOUTPUTSTREAM
     19  explicit GeckoViewOutputStream(
     20      mozilla::java::GeckoInputStream::GlobalRef aStream)
     21      : mStream(aStream) {}
     22 
     23 private:
     24  const mozilla::java::GeckoInputStream::GlobalRef mStream;
     25  virtual ~GeckoViewOutputStream() = default;
     26 };
     27 
     28 #endif  // GeckoViewOutputStream_h__