Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/dullahan.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ class dullahan
bool use_mock_keychain = false; // like adding --use-mock-keychain to Chrome command line
bool autoplay_without_gesture = false; // like adding --autoplay-policy=???? to Chrome command line
bool fake_ui_for_media_stream = false; // like adding --fake-ui-for-media-stream to Chrome command line
bool disable_cookie_database_locking = true;// like adding --disable-features=LockProfileCookieDatabase to the Chrome command line
bool flash_enabled = true; // system flash plugin
bool force_wave_audio = false; // forces Windows WaveOut/In audio
bool image_shrink_standalone_to_fit = true; // scale standalone images larger than browser size to fit
Expand Down
30 changes: 29 additions & 1 deletion src/dullahan_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ dullahan_impl::dullahan_impl() :
mUseMockKeyChain(false),
mAutoPlayWithoutGesture(false),
mFakeUIForMediaStream(false),
mDisableCookieDatabaseLocking(true),
mFlipPixelsY(false),
mFlipMouseY(false),
mRequestContext(nullptr),
Expand All @@ -92,6 +93,8 @@ void dullahan_impl::OnBeforeCommandLineProcessing(const CefString& process_type,
{
if (process_type.empty())
{
std::vector<std::string> disable_features;

// <ND> Enable HTMLImports to get youtube live chat to work
command_line->AppendSwitchWithValue("enable-blink-features", "HTMLImports");
if (mMediaStreamEnabled == true)
Expand Down Expand Up @@ -133,7 +136,7 @@ void dullahan_impl::OnBeforeCommandLineProcessing(const CefString& process_type,

if (mDisableNetworkService)
{
command_line->AppendSwitchWithValue("disable-features", "NetworkService");
disable_features.push_back("NetworkService");
}

if (mUseMockKeyChain)
Expand All @@ -156,6 +159,25 @@ void dullahan_impl::OnBeforeCommandLineProcessing(const CefString& process_type,
command_line->AppendSwitchWithValue("--proxy-server", mProxyHostPort);
}

#ifdef WIN32
if (mDisableCookieDatabaseLocking)
{
disable_features.push_back("LockProfileCookieDatabase");
}
#endif

if (!disable_features.empty())
{
std::ostringstream disabled_features;

for (size_t i = 0, n = disable_features.size(); i < n; ++i) {
if (i > 0) disabled_features << ',';
disabled_features << disable_features[i];
}

command_line->AppendSwitchWithValue("disable-features", disabled_features.str());
}

platformAddCommandLines(command_line);
}
}
Expand Down Expand Up @@ -381,6 +403,12 @@ bool dullahan_impl::initCEF(dullahan::dullahan_settings& user_settings)
// provide their own ("Allow, "Disallow") UI.
mFakeUIForMediaStream = user_settings.fake_ui_for_media_stream;

// this flag if set, disables a security measure introduced in Chrome 114 for W32 that
// prevents multiple processes from accessing the cookie database. It is recommended to
// enable this if the application spawns more than one Dullahan process, or when multiple
// simultaneous instances of the application needs to be supported.
mDisableCookieDatabaseLocking = user_settings.disable_cookie_database_locking;

// if true, this setting inverts the pixels in Y direction - useful if your texture
// coords are upside down compared to default for Dullahan
mFlipPixelsY = user_settings.flip_pixels_y;
Expand Down
1 change: 1 addition & 0 deletions src/dullahan_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ class dullahan_impl :
bool mUseMockKeyChain;
bool mAutoPlayWithoutGesture;
bool mFakeUIForMediaStream;
bool mDisableCookieDatabaseLocking;
bool mFlipPixelsY;
bool mFlipMouseY;
double mRequestedPageZoom;
Expand Down