-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Register with the DE as a scheme handler #114
Conversation
Allows new hist policy. Also CLI. Fixes #110
70b98d8
to
e6396c3
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #114 +/- ##
==========================================
+ Coverage 48.15% 50.31% +2.15%
==========================================
Files 490 477 -13
Lines 17748 16093 -1655
Branches 1977 1750 -227
==========================================
- Hits 8547 8097 -450
+ Misses 8577 7440 -1137
+ Partials 624 556 -68 ☔ View full report in Codecov by Sentry. |
for these schemes with desktop env. So users click links. Fixes #113
573b615
to
cf03085
Compare
if (LSSetDefaultHandlerForURLScheme(CFSTR("https"), identifier) != noErr) { | ||
return false; | ||
} | ||
+ LSSetDefaultHandlerForURLScheme(CFSTR("ipfs"), identifier); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this PR, one does actually need to pay attention to the chromium_edits/ folder.
As you can tell from the _mac.mm
suffix, this file is specific to Mac OS.
Type=Application | ||
Categories=Network;WebBrowser; | ||
-MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https; | ||
+MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/http;x-scheme-handler/https;x-scheme-handler/ipfs;x-scheme-handler/ipns; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is specific to Linux. It becomes ipfs_chromium.desktop after @@VARIABLE@@
substitution.
This line registers it as a able to handle these mime types & schemes, so if/when the desktop environment asks you which thing to open a thing with (as in xdg-open
), it'll provide ipfs-chromium as an option.
Somewhat separate concept from default browser.
-const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = {L"http", L"https", | ||
- nullptr}; | ||
+const wchar_t* ShellUtil::kBrowserProtocolAssociations[] = { | ||
+ L"http", L"https", L"ipfs", L"ipns", nullptr}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not OS-specific, but it seems like Windows keeps a bit closer to it.
It's going to be difficult to test this prior to doing release builds.