gecko-dev/dom/ipc/RemoteFrameParent.h
Ryan Hunt f83e394596 Bug 1500257 part 5 - Implement messages for loading and displaying remote subframes on PRemoteFrame. r=qdot
This commit hooks up the pieces of the PRemoteFrame protocol that
will proxy initialization, sizing, and display messages. The messages
chosen are just enough to start the frame and get an initial rendering.

Differential Revision: https://phabricator.services.mozilla.com/D17445

--HG--
extra : source : b68b732411e2e1e6851799262246bff70e6649da
extra : intermediate-source : c19bc81c4f43a5adba92184b2572c09c6c5a0680
2019-01-23 11:04:26 -06:00

59 lines
1.8 KiB
C++

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* 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_RemoteFrameParent_h
#define mozilla_dom_RemoteFrameParent_h
#include "mozilla/dom/PRemoteFrameParent.h"
#include "mozilla/dom/TabParent.h"
namespace mozilla {
namespace dom {
class RemoteFrameParent : public PRemoteFrameParent {
public:
NS_INLINE_DECL_REFCOUNTING(RemoteFrameParent);
RemoteFrameParent();
// Initialize this actor after performing startup.
nsresult Init(const nsString& aPresentationURL, const nsString& aRemoteType);
TabParent* GetTabParent() { return mTabParent; }
// Get our manager actor.
TabParent* Manager() {
MOZ_ASSERT(mIPCOpen);
return static_cast<TabParent*>(PRemoteFrameParent::Manager());
}
protected:
friend class PRemoteFrameParent;
mozilla::ipc::IPCResult RecvShow(const ScreenIntSize& aSize,
const bool& aParentIsActive,
const nsSizeMode& aSizeMode);
mozilla::ipc::IPCResult RecvLoadURL(const nsCString& aUrl);
mozilla::ipc::IPCResult RecvUpdateDimensions(
const DimensionInfo& aDimensions);
mozilla::ipc::IPCResult RecvRenderLayers(const bool& aEnabled,
const bool& aForceRepaint,
const LayersObserverEpoch& aEpoch);
void ActorDestroy(ActorDestroyReason aWhy) override;
private:
~RemoteFrameParent();
RefPtr<TabParent> mTabParent;
bool mIPCOpen;
};
} // namespace dom
} // namespace mozilla
#endif // !defined(mozilla_dom_RemoteFrameParent_h)