1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/netwerk/base/public/nsIRequestObserverProxy.idl Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,31 @@ 1.4 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 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 +#include "nsIRequestObserver.idl" 1.10 + 1.11 +interface nsIEventTarget; 1.12 + 1.13 +/** 1.14 + * A request observer proxy is used to ship data over to another thread 1.15 + * specified by the thread's dispatch target. The "true" request observer's 1.16 + * methods are invoked on the other thread. 1.17 + * 1.18 + * This interface only provides the initialization needed after construction. 1.19 + * Otherwise, these objects are used simply as nsIRequestObserver's. 1.20 + */ 1.21 +[scriptable, uuid(c2b06151-1bf8-4eef-aea9-1532f12f5a10)] 1.22 +interface nsIRequestObserverProxy : nsIRequestObserver 1.23 +{ 1.24 + /** 1.25 + * Initializes an nsIRequestObserverProxy. 1.26 + * 1.27 + * @param observer - receives observer notifications on the main thread 1.28 + * @param context - the context argument that will be passed to OnStopRequest 1.29 + * and OnStartRequest. This has to be stored permanently on 1.30 + * initialization because it sometimes can't be 1.31 + * AddRef/Release'd off-main-thread. 1.32 + */ 1.33 + void init(in nsIRequestObserver observer, in nsISupports context); 1.34 +};