#ifndef UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_MAC_H_
#define UI_VIEWS_WINDOW_NATIVE_FRAME_VIEW_MAC_H_
#include <optional>
#include "base/memory/raw_ptr.h"
#include "ui/base/metadata/metadata_header_macros.h"
#include "ui/views/window/native_frame_view.h"
namespace views {
class Widget;
class VIEWS_EXPORT NativeFrameViewMacClient {
public:
virtual ~NativeFrameViewMacClient() = default;
virtual std::optional<int> NonClientHitTest(const gfx::Point& point) = 0;
};
class VIEWS_EXPORT NativeFrameViewMac : public NativeFrameView {
METADATA_HEADER(NativeFrameViewMac, NativeFrameView)
public:
NativeFrameViewMac(Widget* widget, NativeFrameViewMacClient* client);
NativeFrameViewMac(const NativeFrameViewMac&) = delete;
NativeFrameViewMac& operator=(const NativeFrameViewMac&) = delete;
~NativeFrameViewMac() override;
gfx::Rect GetWindowBoundsForClientBounds(
const gfx::Rect& client_bounds) const override;
int NonClientHitTest(const gfx::Point& point) override;
private:
raw_ptr<NativeFrameViewMacClient, DanglingUntriaged> client_;
};
}
#endif