dom/ipc/RemoteWebProgress.h
author Kartikaya Gupta <kgupta@mozilla.com>
Mon, 06 May 2019 22:14:40 +0000
changeset 531641 7748746bf2feda8edd0cabfdaff88b7faf059ad5
parent 530873 e1993a1f09ac53cd1a04fdf6a87f8cad8e44f73e
permissions -rw-r--r--
Bug 1548568 - Cleanup to remove unused guid parameter in callback. r=botond Differential Revision: https://phabricator.services.mozilla.com/D29688

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef mozilla_dom_RemoteWebProgress_h
#define mozilla_dom_RemoteWebProgress_h

#include "nsIRemoteWebProgress.h"

namespace mozilla {
namespace dom {

class RemoteWebProgress final : public nsIRemoteWebProgress {
 public:
  NS_DECL_CYCLE_COLLECTING_ISUPPORTS
  NS_DECL_CYCLE_COLLECTION_CLASS(RemoteWebProgress)

  NS_DECL_NSIWEBPROGRESS
  NS_DECL_NSIREMOTEWEBPROGRESS

  RemoteWebProgress()
      : mManager(nullptr),
        mOuterDOMWindowID(0),
        mInnerDOMWindowID(0),
        mLoadType(0),
        mIsLoadingDocument(false),
        mIsTopLevel(false) {}

  RemoteWebProgress(nsIWebProgress* aManager, uint64_t aOuterDOMWindowID,
                    uint64_t aInnerDOMWindowID, uint32_t aLoadType,
                    bool aIsLoadingDocument, bool aIsTopLevel)
      : mManager(aManager),
        mOuterDOMWindowID(aOuterDOMWindowID),
        mInnerDOMWindowID(aInnerDOMWindowID),
        mLoadType(aLoadType),
        mIsLoadingDocument(aIsLoadingDocument),
        mIsTopLevel(aIsTopLevel) {}

 private:
  virtual ~RemoteWebProgress() = default;

  nsCOMPtr<nsIWebProgress> mManager;

  uint64_t mOuterDOMWindowID;
  uint64_t mInnerDOMWindowID;
  uint32_t mLoadType;
  bool mIsLoadingDocument;
  bool mIsTopLevel;
};

}  // namespace dom
}  // namespace mozilla

#endif  // mozilla_dom_RemoteWebProgress_h