mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Add NetworkService support for chrome and chrome-devtools schemes (see issue #2622).
Known behavior changes: - Unsupported chrome hosts no longer redirect to chrome://version. To test: All tests pass with NetworkService disabled. WebUITest.* and V8Test.* tests pass with NetworkService enabled.
This commit is contained in:
@@ -91,6 +91,7 @@
|
||||
#include "content/public/common/content_switches.h"
|
||||
#include "content/public/common/service_names.mojom.h"
|
||||
#include "content/public/common/storage_quota_params.h"
|
||||
#include "content/public/common/url_constants.h"
|
||||
#include "content/public/common/user_agent.h"
|
||||
#include "content/public/common/web_preferences.h"
|
||||
#include "extensions/browser/extension_message_filter.h"
|
||||
@@ -588,6 +589,33 @@ bool CefContentBrowserClient::DoesSiteRequireDedicatedProcess(
|
||||
return true;
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::GetAdditionalWebUISchemes(
|
||||
std::vector<std::string>* additional_schemes) {
|
||||
// Any schemes listed here are treated as WebUI schemes but do not get WebUI
|
||||
// bindings. Also, view-source is allowed for these schemes. WebUI schemes
|
||||
// will not be passed to HandleExternalProtocol.
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::GetAdditionalViewSourceSchemes(
|
||||
std::vector<std::string>* additional_schemes) {
|
||||
GetAdditionalWebUISchemes(additional_schemes);
|
||||
|
||||
additional_schemes->push_back(extensions::kExtensionScheme);
|
||||
}
|
||||
|
||||
void CefContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
std::vector<std::string>* additional_allowed_schemes) {
|
||||
ContentBrowserClient::GetAdditionalAllowedSchemesForFileSystem(
|
||||
additional_allowed_schemes);
|
||||
additional_allowed_schemes->push_back(content::kChromeDevToolsScheme);
|
||||
additional_allowed_schemes->push_back(content::kChromeUIScheme);
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::IsWebUIAllowedToMakeNetworkRequests(
|
||||
const url::Origin& origin) {
|
||||
return scheme::IsWebUIAllowedToMakeNetworkRequests(origin);
|
||||
}
|
||||
|
||||
bool CefContentBrowserClient::IsHandledURL(const GURL& url) {
|
||||
if (!url.is_valid())
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user