mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1095754 - Remove obsolete PPluginWidget apis and code. r=aklotz
This commit is contained in:
parent
464ba3bc8d
commit
d7b79cfddb
@ -36,7 +36,6 @@ parent:
|
||||
async Create();
|
||||
async Destroy();
|
||||
async SetFocus(bool aRaise);
|
||||
async Invalidate(nsIntRect aRect);
|
||||
|
||||
/**
|
||||
* Returns NS_NATIVE_PLUGIN_PORT and its variants: a sharable native
|
||||
@ -45,15 +44,6 @@ parent:
|
||||
* native HWND of the plugin widget.
|
||||
*/
|
||||
sync GetNativePluginPort() returns (uintptr_t value);
|
||||
|
||||
/**
|
||||
* nsIWidget interfaces we'll need until this information flows
|
||||
* over the compositor connection.
|
||||
*/
|
||||
async Show(bool aState);
|
||||
async Resize(nsIntRect aRect);
|
||||
async Move(double aX, double aY);
|
||||
async SetWindowClipRegion(nsIntRect[] Regions, bool aIntersectWithExisting);
|
||||
};
|
||||
|
||||
}
|
||||
|
@ -117,11 +117,6 @@ PluginWidgetParent::RecvCreate()
|
||||
// over with corresponding layer updates.
|
||||
mWidget->RegisterPluginWindowForRemoteUpdates();
|
||||
|
||||
// Force the initial position down into content. If we miss an
|
||||
// initial position update this insures the widget doesn't overlap
|
||||
// chrome.
|
||||
RecvMove(0, 0);
|
||||
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
// For setup, initially GTK code expects 'window' to hold the parent.
|
||||
mWrapper->window = mWidget->GetNativeData(NS_NATIVE_PLUGIN_PORT);
|
||||
@ -144,15 +139,6 @@ PluginWidgetParent::RecvDestroy()
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvShow(const bool& aState)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
PWLOG("PluginWidgetParent::RecvShow(%d)\n", aState);
|
||||
mWidget->Show(aState);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvSetFocus(const bool& aRaise)
|
||||
{
|
||||
@ -162,15 +148,6 @@ PluginWidgetParent::RecvSetFocus(const bool& aRaise)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvInvalidate(const nsIntRect& aRect)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
PWLOG("PluginWidgetParent::RecvInvalidate(%d, %d, %d, %d)\n", aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
mWidget->Invalidate(aRect);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvGetNativePluginPort(uintptr_t* value)
|
||||
{
|
||||
@ -185,54 +162,5 @@ PluginWidgetParent::RecvGetNativePluginPort(uintptr_t* value)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvResize(const nsIntRect& aRect)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
PWLOG("PluginWidgetParent::RecvResize(%d, %d, %d, %d)\n", aRect.x, aRect.y, aRect.width, aRect.height);
|
||||
mWidget->Resize(aRect.width, aRect.height, true);
|
||||
#if defined(MOZ_WIDGET_GTK)
|
||||
mWrapper->width = aRect.width;
|
||||
mWrapper->height = aRect.height;
|
||||
mWrapper->SetAllocation();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvMove(const double& aX, const double& aY)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
PWLOG("PluginWidgetParent::RecvMove(%f, %f)\n", aX, aY);
|
||||
|
||||
|
||||
// This returns the top level window
|
||||
nsCOMPtr<nsIWidget> widget = GetTabParent()->GetWidget();
|
||||
if (!widget) {
|
||||
// return true otherwise ipc will abort the content process, crashing
|
||||
// all tabs.
|
||||
return true;
|
||||
}
|
||||
|
||||
// Passed in coords are at the tab origin, adjust to the main window.
|
||||
nsIntPoint offset = GetTabParent()->GetChildProcessOffset();
|
||||
offset.x = abs(offset.x);
|
||||
offset.y = abs(offset.y);
|
||||
offset += nsIntPoint(ceil(aX), ceil(aY));
|
||||
mWidget->Move(offset.x, offset.y);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
PluginWidgetParent::RecvSetWindowClipRegion(InfallibleTArray<nsIntRect>&& Regions,
|
||||
const bool& aIntersectWithExisting)
|
||||
{
|
||||
ENSURE_CHANNEL;
|
||||
PWLOG("PluginWidgetParent::RecvSetWindowClipRegion()\n");
|
||||
mWidget->SetWindowClipRegion(Regions, aIntersectWithExisting);
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace plugins
|
||||
} // namespace mozilla
|
||||
|
@ -30,14 +30,8 @@ public:
|
||||
virtual void ActorDestroy(ActorDestroyReason aWhy) MOZ_OVERRIDE;
|
||||
virtual bool RecvCreate() MOZ_OVERRIDE;
|
||||
virtual bool RecvDestroy() MOZ_OVERRIDE;
|
||||
virtual bool RecvShow(const bool& aState) MOZ_OVERRIDE;
|
||||
virtual bool RecvSetFocus(const bool& aRaise) MOZ_OVERRIDE;
|
||||
virtual bool RecvInvalidate(const nsIntRect& aRect) MOZ_OVERRIDE;
|
||||
virtual bool RecvGetNativePluginPort(uintptr_t* value) MOZ_OVERRIDE;
|
||||
virtual bool RecvResize(const nsIntRect& aRect) MOZ_OVERRIDE;
|
||||
virtual bool RecvMove(const double& aX, const double& aY) MOZ_OVERRIDE;
|
||||
virtual bool RecvSetWindowClipRegion(InfallibleTArray<nsIntRect>&& Regions,
|
||||
const bool& aIntersectWithExisting) MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// The tab our connection is associated with.
|
||||
|
Loading…
Reference in New Issue
Block a user