mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Removed broken custom import scheme.
It was never used, because the Polymer elements that could be imported using it would themselves import using relative (ie. file) schemes, which would then fail. Since LOOT now Vulcanizes its imports, the whole process is now unnecessary anyway.
This commit is contained in:
@@ -37,7 +37,6 @@ namespace loot {
|
||||
//Common paths.
|
||||
const boost::filesystem::path g_path_readme = boost::filesystem::current_path() / "docs" / "LOOT Readme.html";
|
||||
const boost::filesystem::path g_path_report = boost::filesystem::current_path() / "resources" / "report" / "index.html";
|
||||
const boost::filesystem::path g_path_imports = boost::filesystem::current_path() / "resources" / "report";
|
||||
const boost::filesystem::path g_path_l10n = boost::filesystem::current_path() / "resources" / "l10n";
|
||||
#ifdef _WIN32
|
||||
const boost::filesystem::path g_path_local = GetLocalAppDataPath() / "LOOT";
|
||||
|
||||
@@ -38,7 +38,6 @@ namespace loot {
|
||||
//Common paths.
|
||||
extern const boost::filesystem::path g_path_readme;
|
||||
extern const boost::filesystem::path g_path_report;
|
||||
extern const boost::filesystem::path g_path_imports;
|
||||
extern const boost::filesystem::path g_path_l10n;
|
||||
extern const boost::filesystem::path g_path_local;
|
||||
extern const boost::filesystem::path g_path_settings;
|
||||
|
||||
@@ -64,9 +64,6 @@ namespace loot {
|
||||
|
||||
// Disable spell checking.
|
||||
command_line->AppendSwitch("--disable-spell-checking");
|
||||
|
||||
// Temporary workaround until I figure out what's wrong with my custom URL handling.
|
||||
command_line->AppendSwitch("--allow-file-access-from-files");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,7 +97,6 @@ namespace loot {
|
||||
|
||||
// Register the custom "loot" scheme handlers.
|
||||
CefRegisterSchemeHandlerFactory("loot", "l10n", new LootSchemeHandlerFactory());
|
||||
CefRegisterSchemeHandlerFactory("loot", "import", new LootSchemeHandlerFactory());
|
||||
|
||||
// Specify CEF browser settings here.
|
||||
CefBrowserSettings browser_settings;
|
||||
|
||||
+3
-13
@@ -45,19 +45,9 @@ namespace loot {
|
||||
CefRefPtr<CefRequest> request) {
|
||||
BOOST_LOG_TRIVIAL(trace) << "Handling custom scheme: " << string(request->GetURL());
|
||||
|
||||
/* Two custom URLs are possible:
|
||||
loot://l10n/<l10n path>
|
||||
loot://import/<import filename>
|
||||
*/
|
||||
|
||||
// Get the path from the custom URL.
|
||||
string file;
|
||||
if (boost::starts_with(request->GetURL().ToString(), "loot://l10n/")) {
|
||||
file = (g_path_l10n / request->GetURL().ToString().substr(12)).string();
|
||||
}
|
||||
else {
|
||||
file = (g_path_imports / request->GetURL().ToString().substr(14)).string();
|
||||
}
|
||||
// Get the path from the custom URL, which is of the form
|
||||
// loot://l10n/<l10n path>
|
||||
string file = (g_path_l10n / request->GetURL().ToString().substr(12)).string();
|
||||
|
||||
CefResponse::HeaderMap headers;
|
||||
headers.emplace("Access-Control-Allow-Origin", "*");
|
||||
|
||||
Reference in New Issue
Block a user