"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "shell/browser/api/electron_api_protocol.cc" between
electron-11.4.1.tar.gz and electron-11.4.2.tar.gz

About: Electron is a framework for creating native cross platform applications with web technologies like JavaScript, HTML, and CSS.

electron_api_protocol.cc  (electron-11.4.1):electron_api_protocol.cc  (electron-11.4.2)
skipping to change at line 13 skipping to change at line 13
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/electron_api_protocol.h" #include "shell/browser/api/electron_api_protocol.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
#include <vector> #include <vector>
#include "base/command_line.h" #include "base/command_line.h"
#include "base/stl_util.h" #include "base/stl_util.h"
#include "content/common/url_schemes.h"
#include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/child_process_security_policy.h"
#include "gin/object_template_builder.h" #include "gin/object_template_builder.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/electron_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/browser/protocol_registry.h" #include "shell/browser/protocol_registry.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/net_converter.h" #include "shell/common/gin_converters/net_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/gin_helper/promise.h" #include "shell/common/gin_helper/promise.h"
skipping to change at line 127 skipping to change at line 128
} }
if (custom_scheme.options.corsEnabled) { if (custom_scheme.options.corsEnabled) {
cors_schemes.push_back(custom_scheme.scheme); cors_schemes.push_back(custom_scheme.scheme);
url::AddCorsEnabledScheme(custom_scheme.scheme.c_str()); url::AddCorsEnabledScheme(custom_scheme.scheme.c_str());
} }
if (custom_scheme.options.supportFetchAPI) { if (custom_scheme.options.supportFetchAPI) {
fetch_schemes.push_back(custom_scheme.scheme); fetch_schemes.push_back(custom_scheme.scheme);
} }
if (custom_scheme.options.allowServiceWorkers) { if (custom_scheme.options.allowServiceWorkers) {
service_worker_schemes.push_back(custom_scheme.scheme); service_worker_schemes.push_back(custom_scheme.scheme);
// There is no API to add service worker scheme, but there is an API to
// return const reference to the schemes vector.
// If in future the API is changed to return a copy instead of reference,
// the compilation will fail, and we should add a patch at that time.
auto& mutable_schemes = const_cast<std::vector<std::string>&>(
content::GetServiceWorkerSchemes());
mutable_schemes.push_back(custom_scheme.scheme);
} }
if (custom_scheme.options.stream) { if (custom_scheme.options.stream) {
g_streaming_schemes.push_back(custom_scheme.scheme); g_streaming_schemes.push_back(custom_scheme.scheme);
} }
} }
const auto AppendSchemesToCmdLine = [](const char* switch_name, const auto AppendSchemesToCmdLine = [](const char* switch_name,
std::vector<std::string> schemes) { std::vector<std::string> schemes) {
// Add the schemes to command line switches, so child processes can also // Add the schemes to command line switches, so child processes can also
// register them. // register them.
 End of changes. 2 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)