Skip to content

Commit

Permalink
✨ Provide overridable ContentCLH
Browse files Browse the repository at this point in the history
  • Loading branch information
trickypr committed Jun 30, 2024
1 parent 2b3d8ec commit 8e5a6b4
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/quark-runtime/components/ContentCLH.sys.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
//@ts-check
///<reference types="gecko-types" />

/**
* This is intended to be overridden by your program to provide
* CLI argument parsing once your profile and everything has been
* loaded
*/
export class ContentCLH {
classID = Components.ID('{12238385-abbf-4fdb-b6ce-083549a96ba0}')

// nsISupports
QueryInterface = ChromeUtils.generateQI(['nsICommandLineHandler'])

// nsICommandLineHandler

/**
* @param {nsICommandLineType} cmdLine
* @see {@link https://searchfox.org/mozilla-central/source/toolkit/components/commandlines/nsICommandLineHandler.idl}
*/
handle(cmdLine) { }
}
8 changes: 8 additions & 0 deletions src/quark-runtime/components/components.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,14 @@ Classes = [
'constructor': 'AppLauncher',
'categories': {'command-line-handler': 'y-default'}
},
{
'cid': '{12238385-abbf-4fdb-b6ce-083549a96ba0}',
'contract_ids': ['@trickypr.com/utils/final-clh;1'],
'esModule': 'resource://app/modules/ContentCLH.sys.mjs',
'processes': ProcessSelector.MAIN_PROCESS_ONLY,
'constructor': 'ContentCLH',
'categories': {'command-line-handler': 'x-default'},
},
{
'cid': '{a5ab8550-454e-4ae5-854d-5619a691bbea}',
'contract_ids': ['@fushra.com/mvb/browserglue;1'],
Expand Down

0 comments on commit 8e5a6b4

Please sign in to comment.