mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 09:45:41 +00:00
f83e394596
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
58 lines
1.7 KiB
C++
58 lines
1.7 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_RemoteFrameChild_h
|
|
#define mozilla_dom_RemoteFrameChild_h
|
|
|
|
#include "mozilla/dom/PRemoteFrameChild.h"
|
|
#include "mozilla/dom/TabChild.h"
|
|
|
|
namespace mozilla {
|
|
namespace dom {
|
|
|
|
/**
|
|
* Child side for a remote frame.
|
|
*/
|
|
class RemoteFrameChild : public PRemoteFrameChild {
|
|
public:
|
|
NS_INLINE_DECL_REFCOUNTING(RemoteFrameChild);
|
|
|
|
TabChild* Manager() {
|
|
MOZ_ASSERT(mIPCOpen);
|
|
return static_cast<TabChild*>(PRemoteFrameChild::Manager());
|
|
}
|
|
|
|
mozilla::layers::LayersId GetLayersId() { return mLayersId; }
|
|
|
|
static already_AddRefed<RemoteFrameChild> Create(nsFrameLoader* aFrameLoader,
|
|
const TabContext& aContext,
|
|
const nsString& aRemoteType);
|
|
|
|
void UpdateDimensions(const nsIntRect& aRect,
|
|
const mozilla::ScreenIntSize& aSize);
|
|
|
|
protected:
|
|
friend class PRemoteFrameChild;
|
|
|
|
mozilla::ipc::IPCResult RecvSetLayersId(
|
|
const mozilla::layers::LayersId& aLayersId);
|
|
|
|
void ActorDestroy(ActorDestroyReason aWhy) override;
|
|
|
|
private:
|
|
explicit RemoteFrameChild(nsFrameLoader* aFrameLoader);
|
|
~RemoteFrameChild();
|
|
|
|
mozilla::layers::LayersId mLayersId;
|
|
bool mIPCOpen;
|
|
RefPtr<nsFrameLoader> mFrameLoader;
|
|
};
|
|
|
|
} // namespace dom
|
|
} // namespace mozilla
|
|
|
|
#endif // !defined(mozilla_dom_RemoteFrameParent_h)
|