[WRTjs] Refactor popup
[platform/framework/web/chromium-efl.git] / wrt / src / browser / wrt_native_widget.h
1 // Copyright 2022 Samsung Electronics. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BROWSER_WRT_NATIVE_WIDGET_H_
6 #define BROWSER_WRT_NATIVE_WIDGET_H_
7
8 #include "ui/views/widget/native_widget_aura.h"
9
10 namespace wrt {
11
12 class WRTWindowTreeHost;
13
14 class WRTNativeWidget : public views::NativeWidgetAura {
15  public:
16   explicit WRTNativeWidget(views::internal::NativeWidgetDelegate* delegate,
17                            WRTWindowTreeHost* host);
18   ~WRTNativeWidget() override;
19
20   void ActiveAuraWindow(bool active, aura::Window* window);
21   void CheckAndResetWidgetClient();
22   void RemoveWidgetClient();
23
24  private:
25   // views::internal::NativeWidgetPrivate:
26   void Show(ui::WindowShowState show_state,
27             const gfx::Rect& restore_bounds) override;
28   void Hide() override;
29   bool IsVisible() const override;
30   void Activate() override;
31   void Deactivate() override;
32   bool IsActive() const override;
33
34   void InitializeWidgetClient();
35
36   WRTWindowTreeHost* host_;
37 };
38
39 }  // namespace wrt
40
41 #endif  // BROWSER_WRT_NATIVE_WIDGET_H_