uriloader/base/nsURILoader.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/uriloader/base/nsURILoader.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,64 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 nsURILoader_h__
    1.10 +#define nsURILoader_h__
    1.11 +
    1.12 +#include "nsCURILoader.h"
    1.13 +#include "nsISupportsUtils.h"
    1.14 +#include "nsCOMArray.h"
    1.15 +#include "nsCOMPtr.h"
    1.16 +#include "nsIInterfaceRequestor.h"
    1.17 +#include "nsIInterfaceRequestorUtils.h"
    1.18 +#include "nsString.h"
    1.19 +#include "nsIWeakReference.h"
    1.20 +#include "mozilla/Attributes.h"
    1.21 +
    1.22 +#ifdef MOZ_LOGGING
    1.23 +// Uncomment the next line to force logging on in release builds
    1.24 +// #define FORCE_PR_LOG
    1.25 +#endif
    1.26 +#include "prlog.h"
    1.27 +
    1.28 +class nsDocumentOpenInfo;
    1.29 +
    1.30 +class nsURILoader MOZ_FINAL : public nsIURILoader
    1.31 +{
    1.32 +public:
    1.33 +  NS_DECL_NSIURILOADER
    1.34 +  NS_DECL_ISUPPORTS
    1.35 +
    1.36 +  nsURILoader();
    1.37 +  ~nsURILoader();
    1.38 +
    1.39 +protected:
    1.40 +  /**
    1.41 +   * Equivalent to nsIURILoader::openChannel, but allows specifying whether the
    1.42 +   * channel is opened already.
    1.43 +   */
    1.44 +  NS_HIDDEN_(nsresult) OpenChannel(nsIChannel* channel,
    1.45 +                                   uint32_t aFlags,
    1.46 +                                   nsIInterfaceRequestor* aWindowContext,
    1.47 +                                   bool aChannelOpen,
    1.48 +                                   nsIStreamListener** aListener);
    1.49 +
    1.50 +  /**
    1.51 +   * we shouldn't need to have an owning ref count on registered
    1.52 +   * content listeners because they are supposed to unregister themselves
    1.53 +   * when they go away. This array stores weak references
    1.54 +   */
    1.55 +  nsCOMArray<nsIWeakReference> m_listeners;
    1.56 +
    1.57 +#ifdef PR_LOGGING
    1.58 +  /**
    1.59 +   * NSPR logging.  The module is called "URILoader"
    1.60 +   */
    1.61 +  static PRLogModuleInfo* mLog;
    1.62 +#endif
    1.63 +  
    1.64 +  friend class nsDocumentOpenInfo;
    1.65 +};
    1.66 +
    1.67 +#endif /* nsURILoader_h__ */

mercurial