1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/protocol/http/nsHttpActivityDistributor.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,33 @@ 1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.7 + 1.8 +#ifndef nsHttpActivityDistributor_h__ 1.9 +#define nsHttpActivityDistributor_h__ 1.10 + 1.11 +#include "nsIHttpActivityObserver.h" 1.12 +#include "nsTArray.h" 1.13 +#include "nsProxyRelease.h" 1.14 +#include "mozilla/Mutex.h" 1.15 + 1.16 +namespace mozilla { namespace net { 1.17 + 1.18 +class nsHttpActivityDistributor : public nsIHttpActivityDistributor 1.19 +{ 1.20 +public: 1.21 + typedef nsTArray<nsMainThreadPtrHandle<nsIHttpActivityObserver> > ObserverArray; 1.22 + NS_DECL_THREADSAFE_ISUPPORTS 1.23 + NS_DECL_NSIHTTPACTIVITYOBSERVER 1.24 + NS_DECL_NSIHTTPACTIVITYDISTRIBUTOR 1.25 + 1.26 + nsHttpActivityDistributor(); 1.27 + virtual ~nsHttpActivityDistributor(); 1.28 + 1.29 +protected: 1.30 + ObserverArray mObservers; 1.31 + Mutex mLock; 1.32 +}; 1.33 + 1.34 +}} // namespace mozilla::net 1.35 + 1.36 +#endif // nsHttpActivityDistributor_h__