michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set ts=2 et sw=2 tw=80: */ 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_dom_ExternalHelperAppChild_h michael@0: #define mozilla_dom_ExternalHelperAppChild_h michael@0: michael@0: #include "mozilla/dom/PExternalHelperAppChild.h" michael@0: #include "nsExternalHelperAppService.h" michael@0: #include "nsIStreamListener.h" michael@0: michael@0: class nsIDivertableChannel; michael@0: michael@0: namespace mozilla { michael@0: namespace dom { michael@0: michael@0: class ExternalHelperAppChild : public PExternalHelperAppChild michael@0: , public nsIStreamListener michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSISTREAMLISTENER michael@0: NS_DECL_NSIREQUESTOBSERVER michael@0: michael@0: ExternalHelperAppChild(); michael@0: virtual ~ExternalHelperAppChild(); michael@0: michael@0: // Give the listener a real nsExternalAppHandler to complete processing on michael@0: // the child. michael@0: void SetHandler(nsExternalAppHandler *handler) { mHandler = handler; } michael@0: michael@0: virtual bool RecvCancel(const nsresult& aStatus) MOZ_OVERRIDE; michael@0: private: michael@0: nsresult DivertToParent(nsIDivertableChannel *divertable, nsIRequest *request); michael@0: michael@0: nsRefPtr mHandler; michael@0: nsresult mStatus; michael@0: }; michael@0: michael@0: } // namespace dom michael@0: } // namespace mozilla michael@0: michael@0: #endif // mozilla_dom_ExternalHelperAppChild_h