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_InProcessCompositorWidgetParent_h
7 #define widget_windows_InProcessCompositorWidgetParent_h
8 
9 #include "WinCompositorWidget.h"
10 
11 class nsWindow;
12 
13 namespace mozilla {
14 namespace widget {
15 
16 // This is the Windows-specific implementation of CompositorWidget. For
17 // the most part it only requires an HWND, however it maintains extra state
18 // for transparent windows, as well as for synchronizing WM_SETTEXT messages
19 // with the compositor.
20 class InProcessWinCompositorWidget final : public WinCompositorWidget {
21  public:
22   InProcessWinCompositorWidget(const WinCompositorWidgetInitData& aInitData,
23                                const layers::CompositorOptions& aOptions,
24                                nsWindow* aWindow);
25 
26   void OnDestroyWindow() override;
27   void UpdateTransparency(nsTransparencyMode aMode) override;
28   void ClearTransparentWindow() override;
29 
30   void ObserveVsync(VsyncObserver* aObserver) override;
31   nsIWidget* RealWidget() override;
32 
33  private:
34   nsWindow* mWindow;
35 };
36 
37 }  // namespace widget
38 }  // namespace mozilla
39 
40 #endif  // widget_windows_InProcessCompositorWidgetParent_h
41