#ifndef CEF_LIBCEF_BROWSER_VIEWS_BOX_LAYOUT_IMPL_H_
#define CEF_LIBCEF_BROWSER_VIEWS_BOX_LAYOUT_IMPL_H_
#pragma once
#include "include/views/cef_box_layout.h"
#include "libcef/browser/views/layout_impl.h"
#include "ui/views/layout/box_layout.h"
class CefBoxLayoutImpl : public CefLayoutImpl<views::BoxLayout, CefBoxLayout> {
public:
using ParentClass = CefLayoutImpl<views::BoxLayout, CefBoxLayout>;
CefBoxLayoutImpl(const CefBoxLayoutImpl&) = delete;
CefBoxLayoutImpl& operator=(const CefBoxLayoutImpl&) = delete;
static CefRefPtr<CefBoxLayoutImpl> Create(
const CefBoxLayoutSettings& settings,
views::View* owner_view);
void SetFlexForView(CefRefPtr<CefView> view, int flex) override;
void ClearFlexForView(CefRefPtr<CefView> view) override;
CefRefPtr<CefBoxLayout> AsBoxLayout() override { return this; }
private:
explicit CefBoxLayoutImpl(const CefBoxLayoutSettings& settings);
views::BoxLayout* CreateLayout() override;
CefBoxLayoutSettings settings_;
IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefBoxLayoutImpl);
};
#endif