• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2016 The Chromium Embedded Framework Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be found
3 // in the LICENSE file.
4 
5 #ifndef CEF_LIBCEF_BROWSER_VIEWS_FILL_LAYOUT_IMPL_H_
6 #define CEF_LIBCEF_BROWSER_VIEWS_FILL_LAYOUT_IMPL_H_
7 #pragma once
8 
9 #include "include/views/cef_fill_layout.h"
10 
11 #include "libcef/browser/views/layout_impl.h"
12 #include "ui/views/layout/fill_layout.h"
13 
14 class CefFillLayoutImpl
15     : public CefLayoutImpl<views::FillLayout, CefFillLayout> {
16  public:
17   CefFillLayoutImpl(const CefFillLayoutImpl&) = delete;
18   CefFillLayoutImpl& operator=(const CefFillLayoutImpl&) = delete;
19 
20   // Create a new CefFillLayout insance. |owner_view| must be non-nullptr.
21   static CefRefPtr<CefFillLayout> Create(views::View* owner_view);
22 
23   // CefLayout methods:
AsFillLayout()24   CefRefPtr<CefFillLayout> AsFillLayout() override { return this; }
25 
26  private:
27   CefFillLayoutImpl();
28 
29   views::FillLayout* CreateLayout() override;
30 
31   IMPLEMENT_REFCOUNTING_DELETE_ON_UIT(CefFillLayoutImpl);
32 };
33 
34 #endif  // CEF_LIBCEF_BROWSER_VIEWS_FILL_LAYOUT_IMPL_H_
35