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_windows_CompositorWidgetChild_h 7 #define widget_windows_CompositorWidgetChild_h 8 9 #include "WinCompositorWidget.h" 10 #include "mozilla/widget/PCompositorWidgetChild.h" 11 #include "mozilla/widget/CompositorWidgetVsyncObserver.h" 12 13 namespace mozilla { 14 class CompositorVsyncDispatcher; 15 16 namespace widget { 17 18 class CompositorWidgetChild final : public PCompositorWidgetChild, 19 public PlatformCompositorWidgetDelegate { 20 public: 21 CompositorWidgetChild(RefPtr<CompositorVsyncDispatcher> aVsyncDispatcher, 22 RefPtr<CompositorWidgetVsyncObserver> aVsyncObserver); 23 ~CompositorWidgetChild() override; 24 25 void EnterPresentLock() override; 26 void LeavePresentLock() override; 27 void OnDestroyWindow() override; 28 void UpdateTransparency(nsTransparencyMode aMode) override; 29 void ClearTransparentWindow() override; 30 HDC GetTransparentDC() const override; 31 32 mozilla::ipc::IPCResult RecvObserveVsync() override; 33 mozilla::ipc::IPCResult RecvUnobserveVsync() override; 34 35 private: 36 RefPtr<CompositorVsyncDispatcher> mVsyncDispatcher; 37 RefPtr<CompositorWidgetVsyncObserver> mVsyncObserver; 38 }; 39 40 } // namespace widget 41 } // namespace mozilla 42 43 #endif // widget_windows_CompositorWidgetChild_h 44