michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 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 nsURILoader_h__ michael@0: #define nsURILoader_h__ michael@0: michael@0: #include "nsCURILoader.h" michael@0: #include "nsISupportsUtils.h" michael@0: #include "nsCOMArray.h" michael@0: #include "nsCOMPtr.h" michael@0: #include "nsIInterfaceRequestor.h" michael@0: #include "nsIInterfaceRequestorUtils.h" michael@0: #include "nsString.h" michael@0: #include "nsIWeakReference.h" michael@0: #include "mozilla/Attributes.h" michael@0: michael@0: #ifdef MOZ_LOGGING michael@0: // Uncomment the next line to force logging on in release builds michael@0: // #define FORCE_PR_LOG michael@0: #endif michael@0: #include "prlog.h" michael@0: michael@0: class nsDocumentOpenInfo; michael@0: michael@0: class nsURILoader MOZ_FINAL : public nsIURILoader michael@0: { michael@0: public: michael@0: NS_DECL_NSIURILOADER michael@0: NS_DECL_ISUPPORTS michael@0: michael@0: nsURILoader(); michael@0: ~nsURILoader(); michael@0: michael@0: protected: michael@0: /** michael@0: * Equivalent to nsIURILoader::openChannel, but allows specifying whether the michael@0: * channel is opened already. michael@0: */ michael@0: NS_HIDDEN_(nsresult) OpenChannel(nsIChannel* channel, michael@0: uint32_t aFlags, michael@0: nsIInterfaceRequestor* aWindowContext, michael@0: bool aChannelOpen, michael@0: nsIStreamListener** aListener); michael@0: michael@0: /** michael@0: * we shouldn't need to have an owning ref count on registered michael@0: * content listeners because they are supposed to unregister themselves michael@0: * when they go away. This array stores weak references michael@0: */ michael@0: nsCOMArray m_listeners; michael@0: michael@0: #ifdef PR_LOGGING michael@0: /** michael@0: * NSPR logging. The module is called "URILoader" michael@0: */ michael@0: static PRLogModuleInfo* mLog; michael@0: #endif michael@0: michael@0: friend class nsDocumentOpenInfo; michael@0: }; michael@0: michael@0: #endif /* nsURILoader_h__ */