mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
chrome: cefclient: Add default handler for request tests (see issue #3444)
Support loading of request tests (e.g. http://tests/other_tests) inside default browsers created via "New window" and "New incognito window" commands.
This commit is contained in:
@ -92,24 +92,21 @@ void ClientAppBrowser::OnBeforeCommandLineProcessing(
|
||||
void ClientAppBrowser::OnRegisterCustomPreferences(
|
||||
cef_preferences_type_t type,
|
||||
CefRawPtr<CefPreferenceRegistrar> registrar) {
|
||||
DelegateSet::iterator it = delegates_.begin();
|
||||
for (; it != delegates_.end(); ++it) {
|
||||
(*it)->OnRegisterCustomPreferences(this, type, registrar);
|
||||
for (auto& delegate : delegates_) {
|
||||
delegate->OnRegisterCustomPreferences(this, type, registrar);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientAppBrowser::OnContextInitialized() {
|
||||
DelegateSet::iterator it = delegates_.begin();
|
||||
for (; it != delegates_.end(); ++it) {
|
||||
(*it)->OnContextInitialized(this);
|
||||
for (auto& delegate : delegates_) {
|
||||
delegate->OnContextInitialized(this);
|
||||
}
|
||||
}
|
||||
|
||||
void ClientAppBrowser::OnBeforeChildProcessLaunch(
|
||||
CefRefPtr<CefCommandLine> command_line) {
|
||||
DelegateSet::iterator it = delegates_.begin();
|
||||
for (; it != delegates_.end(); ++it) {
|
||||
(*it)->OnBeforeChildProcessLaunch(this, command_line);
|
||||
for (auto& delegate : delegates_) {
|
||||
delegate->OnBeforeChildProcessLaunch(this, command_line);
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,4 +119,13 @@ void ClientAppBrowser::OnScheduleMessagePumpWork(int64 delay) {
|
||||
}
|
||||
}
|
||||
|
||||
CefRefPtr<CefClient> ClientAppBrowser::GetDefaultClient() {
|
||||
for (auto& delegate : delegates_) {
|
||||
if (auto client = delegate->GetDefaultClient(this)) {
|
||||
return client;
|
||||
}
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
} // namespace client
|
||||
|
Reference in New Issue
Block a user