Move custom scheme registration to CefContentClient. This works around a problem on Linux where the zygote process has no CefContentRendererClient instance at the time that CefContentClient::AddAdditionalSchemes is executed (the zygote process is later forked to create new render processes).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1271 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-06-04 23:37:26 +00:00
parent ca28f7b67d
commit de41be81b8
9 changed files with 80 additions and 103 deletions

View File

@@ -6,8 +6,7 @@
#include <string>
#include "libcef/browser/content_browser_client.h"
#include "libcef/renderer/content_renderer_client.h"
#include "libcef/common/content_client.h"
#include "base/bind.h"
#include "base/logging.h"
@@ -29,15 +28,9 @@ bool CefSchemeRegistrarImpl::AddCustomScheme(
if (is_standard)
standard_schemes_.push_back(scheme);
if (CefContentRendererClient::Get()) {
CefContentRendererClient::Get()->AddCustomScheme(scheme,
is_standard,
is_local,
is_display_isolated);
}
if (CefContentBrowserClient::Get())
CefContentBrowserClient::Get()->AddCustomScheme(scheme);
CefContentClient::SchemeInfo scheme_info = {
scheme, is_standard, is_local, is_display_isolated};
CefContentClient::Get()->AddCustomScheme(scheme_info);
return true;
}