mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2024-12-13 10:06:28 +01:00
9484d6528c
Also perform related C++ cleanup: - Use =default instead of {} for default implementations of constructors/destructors. - Replace typedef with using.
45 lines
1.5 KiB
C++
45 lines
1.5 KiB
C++
// Copyright 2016 The Chromium Embedded Framework Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be found
|
|
// in the LICENSE file.
|
|
|
|
#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:
|
|
// Necessary for the CEF_REQUIRE_VALID_*() macros to compile.
|
|
using ParentClass = CefLayoutImpl<views::BoxLayout, CefBoxLayout>;
|
|
|
|
CefBoxLayoutImpl(const CefBoxLayoutImpl&) = delete;
|
|
CefBoxLayoutImpl& operator=(const CefBoxLayoutImpl&) = delete;
|
|
|
|
// Create a new CefBoxLayout insance. |owner_view| must be non-nullptr.
|
|
static CefRefPtr<CefBoxLayoutImpl> Create(
|
|
const CefBoxLayoutSettings& settings,
|
|
views::View* owner_view);
|
|
|
|
// CefBoxLayout methods:
|
|
void SetFlexForView(CefRefPtr<CefView> view, int flex) override;
|
|
void ClearFlexForView(CefRefPtr<CefView> view) override;
|
|
|
|
// CefLayout methods:
|
|
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 // CEF_LIBCEF_BROWSER_VIEWS_BOX_LAYOUT_IMPL_H_
|