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

@@ -62,14 +62,18 @@ void RootWindowViews::InitAsPopup(RootWindow::Delegate* delegate,
config_ = std::make_unique<RootWindowConfig>();
config_->with_controls = with_controls;
if (popupFeatures.xSet)
if (popupFeatures.xSet) {
initial_bounds_.x = popupFeatures.x;
if (popupFeatures.ySet)
}
if (popupFeatures.ySet) {
initial_bounds_.y = popupFeatures.y;
if (popupFeatures.widthSet)
}
if (popupFeatures.widthSet) {
initial_bounds_.width = popupFeatures.width;
if (popupFeatures.heightSet)
}
if (popupFeatures.heightSet) {
initial_bounds_.height = popupFeatures.height;
}
CreateClientHandler(std::string());
initialized_ = true;
@@ -85,8 +89,9 @@ void RootWindowViews::Show(ShowMode mode) {
return;
}
if (!window_)
if (!window_) {
return;
}
window_->Show();
@@ -109,8 +114,9 @@ void RootWindowViews::Hide() {
return;
}
if (window_)
if (window_) {
window_->Hide();
}
}
void RootWindowViews::SetBounds(int x, int y, size_t width, size_t height) {
@@ -134,8 +140,9 @@ void RootWindowViews::Close(bool force) {
return;
}
if (window_)
if (window_) {
window_->Close(force);
}
}
void RootWindowViews::SetDeviceScaleFactor(float device_scale_factor) {
@@ -162,8 +169,9 @@ ClientWindowHandle RootWindowViews::GetWindowHandle() const {
// ClientWindowHandle is a GtkWidget* on Linux and we don't have one of those.
return nullptr;
#else
if (browser_)
if (browser_) {
return browser_->GetHost()->GetWindowHandle();
}
return kNullWindowHandle;
#endif
}
@@ -351,8 +359,9 @@ void RootWindowViews::OnSetAddress(const std::string& url) {
return;
}
if (window_)
if (window_) {
window_->SetAddress(url);
}
}
void RootWindowViews::OnSetTitle(const std::string& title) {
@@ -363,8 +372,9 @@ void RootWindowViews::OnSetTitle(const std::string& title) {
return;
}
if (window_)
if (window_) {
window_->SetTitle(title);
}
}
void RootWindowViews::OnSetFavicon(CefRefPtr<CefImage> image) {
@@ -375,8 +385,9 @@ void RootWindowViews::OnSetFavicon(CefRefPtr<CefImage> image) {
return;
}
if (window_)
if (window_) {
window_->SetFavicon(image);
}
}
void RootWindowViews::OnSetFullscreen(bool fullscreen) {
@@ -387,8 +398,9 @@ void RootWindowViews::OnSetFullscreen(bool fullscreen) {
return;
}
if (window_)
if (window_) {
window_->SetFullscreen(fullscreen);
}
}
void RootWindowViews::OnAutoResize(const CefSize& new_size) {
@@ -449,8 +461,9 @@ void RootWindowViews::OnSetDraggableRegions(
return;
}
if (window_)
if (window_) {
window_->SetDraggableRegions(regions);
}
}
void RootWindowViews::OnTakeFocus(bool next) {
@@ -461,14 +474,16 @@ void RootWindowViews::OnTakeFocus(bool next) {
return;
}
if (window_)
if (window_) {
window_->TakeFocus(next);
}
}
void RootWindowViews::OnBeforeContextMenu(CefRefPtr<CefMenuModel> model) {
CEF_REQUIRE_UI_THREAD();
if (window_)
if (window_) {
window_->OnBeforeContextMenu(model);
}
}
void RootWindowViews::CreateClientHandler(const std::string& url) {
@@ -510,8 +525,9 @@ void RootWindowViews::InitOnUIThread(
// Populate the default image cache.
ImageCache::ImageInfoSet image_set;
for (size_t i = 0U; i < std::size(kDefaultImageCache); ++i)
for (size_t i = 0U; i < std::size(kDefaultImageCache); ++i) {
image_set.push_back(ImageCache::ImageInfo::Create2x(kDefaultImageCache[i]));
}
image_cache_->LoadImages(
image_set, base::BindOnce(&RootWindowViews::CreateViewsWindow, this,
@@ -557,8 +573,9 @@ void RootWindowViews::NotifyDestroyedIfDone() {
scoped_refptr<RootWindow> self = this;
delegate_->OnRootWindowDestroyed(this);
if (!config_->close_callback.is_null())
if (!config_->close_callback.is_null()) {
std::move(config_->close_callback).Run();
}
}
}