Update source files for bracket style

This commit is contained in:
Marshall Greenblatt
2023-01-02 17:59:03 -05:00
parent d84b07a5cb
commit 3af3eab3e4
366 changed files with 7275 additions and 3834 deletions

View File

@@ -32,8 +32,9 @@ class PopupWindowDelegate : public CefWindowDelegate {
bool CanClose(CefRefPtr<CefWindow> window) override {
CefRefPtr<CefBrowser> browser = browser_view_->GetBrowser();
if (browser)
if (browser) {
return browser->GetHost()->TryCloseBrowser();
}
return true;
}
@@ -49,8 +50,9 @@ CefBrowserPlatformDelegateChromeViews::CefBrowserPlatformDelegateChromeViews(
std::unique_ptr<CefBrowserPlatformDelegateNative> native_delegate,
CefRefPtr<CefBrowserViewImpl> browser_view)
: CefBrowserPlatformDelegateChrome(std::move(native_delegate)) {
if (browser_view)
if (browser_view) {
SetBrowserView(browser_view);
}
}
void CefBrowserPlatformDelegateChromeViews::SetBrowserView(
@@ -74,13 +76,15 @@ void CefBrowserPlatformDelegateChromeViews::BrowserCreated(
}
void CefBrowserPlatformDelegateChromeViews::NotifyBrowserCreated() {
if (browser_view_->delegate())
if (browser_view_->delegate()) {
browser_view_->delegate()->OnBrowserCreated(browser_view_, browser_);
}
}
void CefBrowserPlatformDelegateChromeViews::NotifyBrowserDestroyed() {
if (browser_view_->delegate())
if (browser_view_->delegate()) {
browser_view_->delegate()->OnBrowserDestroyed(browser_view_, browser_);
}
}
void CefBrowserPlatformDelegateChromeViews::BrowserDestroyed(
@@ -91,8 +95,9 @@ void CefBrowserPlatformDelegateChromeViews::BrowserDestroyed(
void CefBrowserPlatformDelegateChromeViews::CloseHostWindow() {
views::Widget* widget = GetWindowWidget();
if (widget && !widget->IsClosed())
if (widget && !widget->IsClosed()) {
widget->Close();
}
}
CefWindowHandle CefBrowserPlatformDelegateChromeViews::GetHostWindowHandle()
@@ -101,8 +106,9 @@ CefWindowHandle CefBrowserPlatformDelegateChromeViews::GetHostWindowHandle()
}
views::Widget* CefBrowserPlatformDelegateChromeViews::GetWindowWidget() const {
if (browser_view_->root_view())
if (browser_view_->root_view()) {
return browser_view_->root_view()->GetWidget();
}
return nullptr;
}

View File

@@ -53,8 +53,9 @@ void ChromeBrowserView::ViewHierarchyChanged(
// this View to a CefWindow with FillLayout and then calling
// CefWindow::Show() without first resizing the CefWindow.
size = details.parent->GetPreferredSize();
if (!size.IsEmpty())
if (!size.IsEmpty()) {
SetSize(size);
}
}
}
}

View File

@@ -47,8 +47,9 @@ class ChildWindowDelegate : public CefWindowDelegate {
CefRect GetInitialBounds(CefRefPtr<CefWindow> window) override {
CefRect initial_bounds(window_info_.bounds);
if (initial_bounds.IsEmpty())
if (initial_bounds.IsEmpty()) {
return CefRect(0, 0, 800, 600);
}
return initial_bounds;
}
@@ -174,15 +175,18 @@ CefRefPtr<CefBrowserHostBase> MaybeCreateChildBrowser(
const CefBrowserCreateParams& create_params) {
// If the BrowserView already exists it means that we're dealing with a popup
// and we'll instead create the Window in OnPopupBrowserViewCreated.
if (create_params.browser_view)
if (create_params.browser_view) {
return nullptr;
}
if (!create_params.window_info)
if (!create_params.window_info) {
return nullptr;
}
const auto parent_handle = GetParentHandle(*create_params.window_info);
if (parent_handle == gfx::kNullAcceleratedWidget)
if (parent_handle == gfx::kNullAcceleratedWidget) {
return nullptr;
}
// Create the BrowserView.
auto browser_view = CefBrowserViewImpl::Create(