Skip to content

Commit d18fc7a

Browse files
committed
Enable building with CEF 6533 & 6613
Chromium 128 removes the `persist_user_preferences` setting entirely. Chrome runtime is used by default, so to disable 'Cast..' and more, explicitly use the Alloy runtime. DevTools popups can no longer be windowless.
1 parent 75d3eb1 commit d18fc7a

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

obs-browser-plugin.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,9 @@ static void BrowserInit(void)
366366
BPtr<char> conf_path_abs = os_get_abs_path_ptr(conf_path);
367367
CefString(&settings.locale) = obs_get_locale();
368368
CefString(&settings.accept_language_list) = accepted_languages;
369+
#if CHROME_VERSION_BUILD <= 6533
369370
settings.persist_user_preferences = 1;
371+
#endif
370372
CefString(&settings.cache_path) = conf_path_abs;
371373
#if !defined(__APPLE__) || defined(ENABLE_BROWSER_LEGACY)
372374
char *abs_path = os_get_abs_path_ptr(path.c_str());

panel/browser-panel-client.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ bool QCefBrowserClient::OnContextMenuCommand(
348348
QString title;
349349
switch (command_id) {
350350
case MENU_ITEM_DEVTOOLS:
351-
#if defined(_WIN32)
351+
#if defined(_WIN32) && CHROME_VERSION_BUILD < 6533
352352
title = QString(obs_module_text("DevTools"))
353353
.arg(widget->parentWidget()->windowTitle());
354354
windowInfo.SetAsPopup(host->GetWindowHandle(),

panel/browser-panel.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ struct QCefCookieManagerInternal : QCefCookieManager {
8484
BPtr<char> path = os_get_abs_path_ptr(rpath.Get());
8585

8686
CefRequestContextSettings settings;
87+
#if CHROME_VERSION_BUILD <= 6533
8788
settings.persist_user_preferences = 1;
89+
#endif
8890
CefString(&settings.cache_path) = path.Get();
8991
rc = CefRequestContext::CreateContext(
9092
settings, CefRefPtr<CefRequestContextHandler>());
@@ -107,7 +109,9 @@ struct QCefCookieManagerInternal : QCefCookieManager {
107109
BPtr<char> path = os_get_abs_path_ptr(rpath.Get());
108110

109111
CefRequestContextSettings settings;
112+
#if CHROME_VERSION_BUILD <= 6533
110113
settings.persist_user_preferences = 1;
114+
#endif
111115
CefString(&settings.cache_path) = storage_path;
112116
rc = CefRequestContext::CreateContext(
113117
settings, CefRefPtr<CefRequestContextHandler>());
@@ -314,6 +318,10 @@ void QCefWidgetInternal::Init()
314318
QSize size = this->size();
315319
#endif
316320

321+
#if CHROME_VERSION_BUILD >= 6533
322+
windowInfo.runtime_style = CEF_RUNTIME_STYLE_ALLOY;
323+
#endif
324+
317325
#if CHROME_VERSION_BUILD < 4430
318326
#ifdef __APPLE__
319327
windowInfo.SetAsChild((CefWindowHandle)handle, 0, 0,

0 commit comments

Comments
 (0)