1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #include "RemoteWebProgress.h"
10 NS_IMPL_CYCLE_COLLECTION(RemoteWebProgress
, mManager
)
12 NS_IMPL_CYCLE_COLLECTING_ADDREF(RemoteWebProgress
)
13 NS_IMPL_CYCLE_COLLECTING_RELEASE(RemoteWebProgress
)
15 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(RemoteWebProgress
)
16 NS_INTERFACE_MAP_ENTRY(nsISupports
)
17 NS_INTERFACE_MAP_ENTRY(nsIWebProgress
)
18 NS_INTERFACE_MAP_ENTRY(nsIRemoteWebProgress
)
21 NS_IMETHODIMP
RemoteWebProgress::Init(nsIWebProgress
* aManager
,
24 mIsTopLevel
= aIsTopLevel
;
29 NS_IMETHODIMP
RemoteWebProgress::Update(uint64_t aOuterDOMWindowID
,
30 uint64_t aInnerDOMWindowID
,
32 bool aIsLoadingDocument
) {
33 mOuterDOMWindowID
= aOuterDOMWindowID
;
34 mInnerDOMWindowID
= aInnerDOMWindowID
;
35 mLoadType
= aLoadType
;
36 mIsLoadingDocument
= aIsLoadingDocument
;
41 NS_IMETHODIMP
RemoteWebProgress::AddProgressListener(
42 nsIWebProgressListener
* aListener
, uint32_t aNotifyMask
) {
44 return mManager
->AddProgressListener(aListener
, aNotifyMask
);
46 NS_WARNING("RemoteWebProgres::mManager should not be null!");
52 NS_IMETHODIMP
RemoteWebProgress::RemoveProgressListener(
53 nsIWebProgressListener
* aListener
) {
55 return mManager
->RemoveProgressListener(aListener
);
57 NS_WARNING("RemoteWebProgres::mManager should not be null!");
63 NS_IMETHODIMP
RemoteWebProgress::GetDOMWindow(mozIDOMWindowProxy
** aDOMWindow
) {
64 return NS_ERROR_NOT_AVAILABLE
;
67 NS_IMETHODIMP
RemoteWebProgress::GetDOMWindowID(uint64_t* aDOMWindowID
) {
68 *aDOMWindowID
= mOuterDOMWindowID
;
72 NS_IMETHODIMP
RemoteWebProgress::GetInnerDOMWindowID(
73 uint64_t* aInnerDOMWindowID
) {
74 *aInnerDOMWindowID
= mInnerDOMWindowID
;
78 NS_IMETHODIMP
RemoteWebProgress::GetIsTopLevel(bool* aIsTopLevel
) {
79 NS_ENSURE_ARG_POINTER(aIsTopLevel
);
80 *aIsTopLevel
= mIsTopLevel
;
84 NS_IMETHODIMP
RemoteWebProgress::GetIsLoadingDocument(
85 bool* aIsLoadingDocument
) {
86 NS_ENSURE_ARG_POINTER(aIsLoadingDocument
);
87 *aIsLoadingDocument
= mIsLoadingDocument
;
91 NS_IMETHODIMP
RemoteWebProgress::GetLoadType(uint32_t* aLoadType
) {
92 NS_ENSURE_ARG_POINTER(aLoadType
);
93 *aLoadType
= mLoadType
;
97 NS_IMETHODIMP
RemoteWebProgress::GetTarget(nsIEventTarget
** aTarget
) {
98 return NS_ERROR_NOT_IMPLEMENTED
;
101 NS_IMETHODIMP
RemoteWebProgress::SetTarget(nsIEventTarget
* aTarget
) {
102 return NS_ERROR_NOT_IMPLEMENTED
;
106 } // namespace mozilla