1 // Copyright 2021 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 #include "libcef/browser/chrome/views/chrome_browser_frame.h" 6 7 #include "chrome/browser/themes/theme_service.h" 8 #include "chrome/browser/ui/browser.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h" 10 Init(BrowserView * browser_view,std::unique_ptr<Browser> browser)11void ChromeBrowserFrame::Init(BrowserView* browser_view, 12 std::unique_ptr<Browser> browser) { 13 DCHECK(browser_view); 14 15 DCHECK(!browser_); 16 browser_ = browser.get(); 17 DCHECK(browser_); 18 19 // Initialize BrowserFrame state. 20 InitBrowserView(browser_view); 21 22 // Initialize BrowserView state. 23 browser_view->InitBrowser(std::move(browser)); 24 } 25 CreateRootView()26views::internal::RootView* ChromeBrowserFrame::CreateRootView() { 27 // Bypass the BrowserFrame implementation. 28 return views::Widget::CreateRootView(); 29 } 30 31 std::unique_ptr<views::NonClientFrameView> CreateNonClientFrameView()32ChromeBrowserFrame::CreateNonClientFrameView() { 33 // Bypass the BrowserFrame implementation. 34 return views::Widget::CreateNonClientFrameView(); 35 } 36