// Copyright 2021 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. #include "cef/libcef/browser/chrome/views/toolbar_view_impl.h" // static CefRefPtr CefToolbarViewImpl::Create( CefRefPtr delegate, Browser* browser, BrowserView* browser_view, std::optional display_mode) { CEF_REQUIRE_UIT_RETURN(nullptr); CefRefPtr view = new CefToolbarViewImpl(delegate, browser, browser_view, display_mode); view->Initialize(); return view; } // static const char* const CefToolbarViewImpl::kTypeString = "ToolbarView"; CefToolbarViewImpl::CefToolbarViewImpl( CefRefPtr delegate, Browser* browser, BrowserView* browser_view, std::optional display_mode) : ParentClass(delegate), browser_(browser), browser_view_(browser_view), display_mode_(display_mode) {} void CefToolbarViewImpl::Destroyed() { browser_ = nullptr; browser_view_ = nullptr; } CefToolbarViewView* CefToolbarViewImpl::CreateRootView() { return new CefToolbarViewView(delegate(), browser_, browser_view_, display_mode_); } void CefToolbarViewImpl::InitializeRootView() { static_cast(root_view())->Initialize(); }