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_CompositorWidgetChild_h 7 #define widget_gtk_CompositorWidgetChild_h 8 9 #include "GtkCompositorWidget.h" 10 #include "mozilla/widget/PCompositorWidgetChild.h" 11 #include "mozilla/widget/CompositorWidgetVsyncObserver.h" 12 13 namespace mozilla { 14 namespace widget { 15 16 class CompositorWidgetChild final : public PCompositorWidgetChild, 17 public PlatformCompositorWidgetDelegate { 18 public: 19 CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher, 20 RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver, 21 const CompositorWidgetInitData&); 22 ~CompositorWidgetChild() override; 23 24 bool Initialize(); 25 26 mozilla::ipc::IPCResult RecvObserveVsync() override; 27 mozilla::ipc::IPCResult RecvUnobserveVsync() override; 28 29 void NotifyClientSizeChanged(const LayoutDeviceIntSize& aClientSize) override; 30 31 private: 32 RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher; 33 RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver; 34 }; 35 36 } // namespace widget 37 } // namespace mozilla 38 39 #endif // widget_gtk_CompositorWidgetChild_h 40