Skip to content

Commit 8e5a6b4

Browse files
committed
✨ Provide overridable ContentCLH
1 parent 2b3d8ec commit 8e5a6b4

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//@ts-check
2+
///<reference types="gecko-types" />
3+
4+
/**
5+
* This is intended to be overridden by your program to provide
6+
* CLI argument parsing once your profile and everything has been
7+
* loaded
8+
*/
9+
export class ContentCLH {
10+
classID = Components.ID('{12238385-abbf-4fdb-b6ce-083549a96ba0}')
11+
12+
// nsISupports
13+
QueryInterface = ChromeUtils.generateQI(['nsICommandLineHandler'])
14+
15+
// nsICommandLineHandler
16+
17+
/**
18+
* @param {nsICommandLineType} cmdLine
19+
* @see {@link https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineHandler.idl}
20+
*/
21+
handle(cmdLine) { }
22+
}

src/quark-runtime/components/components.conf

+8
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@ Classes = [
2121
'constructor': 'AppLauncher',
2222
'categories': {'command-line-handler': 'y-default'}
2323
},
24+
{
25+
'cid': '{12238385-abbf-4fdb-b6ce-083549a96ba0}',
26+
'contract_ids': ['@trickypr.com/utils/final-clh;1'],
27+
'esModule': 'resource://app/modules/ContentCLH.sys.mjs',
28+
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
29+
'constructor': 'ContentCLH',
30+
'categories': {'command-line-handler': 'x-default'},
31+
},
2432
{
2533
'cid': '{a5ab8550-454e-4ae5-854d-5619a691bbea}',
2634
'contract_ids': ['@fushra.com/mvb/browserglue;1'],

0 commit comments

Comments
 (0)