1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* This Source Code Form is subject to the terms of the Mozilla Public 3 * License, v. 2.0. If a copy of the MPL was not distributed with this 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 5 6 #ifndef widget_gtk_CompositorWidgetParent_h 7 #define widget_gtk_CompositorWidgetParent_h 8 9 #include "GtkCompositorWidget.h" 10 #include "mozilla/VsyncDispatcher.h" 11 #include "mozilla/widget/PCompositorWidgetParent.h" 12 13 namespace mozilla { 14 namespace widget { 15 16 class CompositorWidgetParent final : public PCompositorWidgetParent, 17 public GtkCompositorWidget { 18 public: 19 explicit CompositorWidgetParent(const CompositorWidgetInitData& aInitData, 20 const layers::CompositorOptions& aOptions); 21 ~CompositorWidgetParent() override; 22 ActorDestroy(ActorDestroyReason aWhy)23 void ActorDestroy(ActorDestroyReason aWhy) override {} 24 25 void ObserveVsync(VsyncObserver* aObserver) override; 26 RefPtr<VsyncObserver> GetVsyncObserver() const override; 27 28 mozilla::ipc::IPCResult RecvNotifyClientSizeChanged( 29 const LayoutDeviceIntSize& aClientSize) override; 30 31 private: 32 RefPtr<VsyncObserver> mVsyncObserver; 33 }; 34 35 } // namespace widget 36 } // namespace mozilla 37 38 #endif // widget_gtk_CompositorWidgetParent_h 39