feat: HTTP preconnect feature minimal for electronjs (#18671)

This commit is contained in:
Kuts Alexey 2019-08-26 19:47:32 +03:00 committed by Jeremy Apthorp
parent c57db7f163
commit cddbddc543
17 changed files with 377 additions and 1 deletions

View file

@ -51,6 +51,7 @@
#include "shell/app/manifests.h"
#include "shell/browser/api/atom_api_app.h"
#include "shell/browser/api/atom_api_protocol_ns.h"
#include "shell/browser/api/atom_api_session.h"
#include "shell/browser/api/atom_api_web_contents.h"
#include "shell/browser/api/atom_api_web_request_ns.h"
#include "shell/browser/atom_autofill_driver_factory.h"
@ -70,6 +71,7 @@
#include "shell/browser/net/system_network_context_manager.h"
#include "shell/browser/notifications/notification_presenter.h"
#include "shell/browser/notifications/platform_notification_service.h"
#include "shell/browser/renderer_host/electron_render_message_filter.h"
#include "shell/browser/session_preferences.h"
#include "shell/browser/ui/devtools_manager_delegate.h"
#include "shell/browser/web_contents_permission_helper.h"
@ -365,6 +367,9 @@ void AtomBrowserClient::RenderProcessWillLaunch(
prefs.web_security = web_preferences->IsEnabled(options::kWebSecurity,
true /* default value */);
}
host->AddFilter(new ElectronRenderMessageFilter(host->GetBrowserContext()));
AddProcessPreferences(host->GetID(), prefs);
// ensure the ProcessPreferences is removed later
host->AddObserver(this);