netwerk/base/src/nsLoadGroup.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     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/. */
     6 #ifndef nsLoadGroup_h__
     7 #define nsLoadGroup_h__
     9 #include "nsILoadGroup.h"
    10 #include "nsILoadGroupChild.h"
    11 #include "nsPILoadGroupInternal.h"
    12 #include "nsAgg.h"
    13 #include "nsCOMPtr.h"
    14 #include "nsWeakPtr.h"
    15 #include "nsWeakReference.h"
    16 #include "nsISupportsPriority.h"
    17 #include "pldhash.h"
    18 #include "mozilla/TimeStamp.h"
    20 class nsILoadGroupConnectionInfo;
    21 class nsITimedChannel;
    23 class nsLoadGroup : public nsILoadGroup,
    24                     public nsILoadGroupChild,
    25                     public nsISupportsPriority,
    26                     public nsSupportsWeakReference,
    27                     public nsPILoadGroupInternal
    28 {
    29 public:
    30     NS_DECL_AGGREGATED
    32     ////////////////////////////////////////////////////////////////////////////
    33     // nsIRequest methods:
    34     NS_DECL_NSIREQUEST
    36     ////////////////////////////////////////////////////////////////////////////
    37     // nsILoadGroup methods:
    38     NS_DECL_NSILOADGROUP
    39     NS_DECL_NSPILOADGROUPINTERNAL
    41     ////////////////////////////////////////////////////////////////////////////
    42     // nsILoadGroupChild methods:
    43     NS_DECL_NSILOADGROUPCHILD
    45     ////////////////////////////////////////////////////////////////////////////
    46     // nsISupportsPriority methods:
    47     NS_DECL_NSISUPPORTSPRIORITY
    49     ////////////////////////////////////////////////////////////////////////////
    50     // nsLoadGroup methods:
    52     nsLoadGroup(nsISupports* outer);
    54     nsresult Init();
    56 protected:
    57     virtual ~nsLoadGroup();
    59     nsresult MergeLoadFlags(nsIRequest *aRequest, nsLoadFlags& flags);
    61 private:
    62     void TelemetryReport();
    63     void TelemetryReportChannel(nsITimedChannel *timedChannel,
    64                                 bool defaultRequest);
    66 protected:
    67     uint32_t                        mForegroundCount;
    68     uint32_t                        mLoadFlags;
    69     uint32_t                        mDefaultLoadFlags;
    71     nsCOMPtr<nsILoadGroup>          mLoadGroup; // load groups can contain load groups
    72     nsCOMPtr<nsIInterfaceRequestor> mCallbacks;
    73     nsCOMPtr<nsILoadGroupConnectionInfo> mConnectionInfo;
    75     nsCOMPtr<nsIRequest>            mDefaultLoadRequest;
    76     PLDHashTable                    mRequests;
    78     nsWeakPtr                       mObserver;
    79     nsWeakPtr                       mParentLoadGroup;
    81     nsresult                        mStatus;
    82     int32_t                         mPriority;
    83     bool                            mIsCanceling;
    85     /* Telemetry */
    86     mozilla::TimeStamp              mDefaultRequestCreationTime;
    87     bool                            mDefaultLoadIsTimed;
    88     uint32_t                        mTimedRequests;
    89     uint32_t                        mCachedRequests;
    91     /* For nsPILoadGroupInternal */
    92     uint32_t                        mTimedNonCachedRequestsUntilOnEndPageLoad;
    93 };
    95 #endif // nsLoadGroup_h__

mercurial