PPluginWidget.ipdl 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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/. */
  4. include protocol PBrowser;
  5. include "mozilla/GfxMessageUtils.h";
  6. using nsIntRect from "nsRect.h";
  7. namespace mozilla {
  8. namespace plugins {
  9. /**
  10. * PPluginWidget - a nsIWidget'ish protocol for windowed plugins in e10s.
  11. * On windows and linux we create native widgets in chrome which we then manage
  12. * from content. On the content side there's PluginWidgetProxy which
  13. * implements nsIWidget. We hand this around layout and plugins code. Anything
  14. * not dealt with via PluginWidgetProxy falls through to PuppetWidget. Native
  15. * widget exists on the chrome side (PluginWidgetParent) attached to the
  16. * browser window as a child. Window management calls are forwarded from
  17. * PluginWidgetProxy to PluginWidgetParent over this interface.
  18. *
  19. * Note lifetime management for PluginWidgetProxy (the plugin widget) and the
  20. * connection (PluginWidgetChild) are separated. PluginWidgetChild will
  21. * be torn down first by the tab, followed by the deref'ing of the nsIWidget
  22. * via layout.
  23. */
  24. sync protocol PPluginWidget {
  25. manager PBrowser;
  26. parent:
  27. async __delete__();
  28. /**
  29. * Used to set the ID of a scroll capture container from the parent process,
  30. * so that we can create a proxy container in the layer tree.
  31. * @param aScrollCaptureId async container ID of the parent container
  32. * @param aPluginInstanceId plugin ID on which to set the scroll capture ID
  33. */
  34. sync Create() returns (nsresult aResult, uint64_t aScrollCaptureId,
  35. uintptr_t aPluginInstanceId);
  36. async SetFocus(bool aRaise);
  37. /**
  38. * Returns NS_NATIVE_PLUGIN_PORT and its variants: a sharable native
  39. * window for plugins. On Linux, this returns an XID for a socket widget
  40. * embedded in the chrome side native window. On Windows this returns the
  41. * native HWND of the plugin widget.
  42. */
  43. sync GetNativePluginPort() returns (uintptr_t value);
  44. /**
  45. * Sends an NS_NATIVE_CHILD_WINDOW to be adopted by the widget's native window
  46. * on the chrome side. This is only currently used on Windows.
  47. */
  48. sync SetNativeChildWindow(uintptr_t childWindow);
  49. };
  50. }
  51. }