How to add own component extension in Chromium browser?

579 views
Skip to first unread message

Max Rock

unread,
Jul 7, 2017, 4:46:34 PM7/7/17
to Chromium-dev
Hello everyone!

I would like to know, how to add anyone extension in Chromium browser. My steps were as follows:
1. I added my_ext folder in src/chrome/browser/resources folder
2. I added kMyExtExtensionId in src\chrome\common\extensions\extension_constants.h (and .cc)
3. I added IDR_MYEXT_MANIFEST in src\chrome\browser\browser_resources.grd with path: resources\my_ext\manifest.json
4. I added in src\chrome\browser\extensions\component_loader.cc:
void ComponentLoader::AddMyExtExtension() {
  Add(IDR_MYEXT_MANIFEST, base::FilePath(FILE_PATH_LITERAL("my_ext")));
}
and paste AddMyExtExtension in function void ComponentLoader::AddDefaultComponentExtensionsWithBackgroundPages because for example it is have background.js script.
5. I added all resources of my_ext in src\chrome\browser\resources\component_extension_resources.grd for example:
<include name="IDR_MYEXT_INDEX_HTML" file="my_ext/index.html" type="BINDATA" />

After this work i compile chromium browser and it threw an error: 
[8812:8816:0707/205259.430:FATAL:extension_pref_value_map.cc(73)] Check failed: false. Extension my_ext_id is not registered but acces....

What have I done wrong?
How do I tell my extension to work in incognito mode?
Why is there an extension_pref_value_map.cc(73)?

Thank you!

Lior Solomon

unread,
Jul 26, 2023, 1:39:13 PM7/26/23
to Chromium-dev, Max Rock
Hi max,
Can you explain how you add the component extension to the Chromium browser?

Kỳ Nguyễn Viết

unread,
Nov 21, 2023, 9:03:04 AM11/21/23
to Chromium-dev, Max Rock
Hi, did you solve this problem? I'm facing the same prob

Tra

unread,
Dec 12, 2023, 1:11:15 AM12/12/23
to Chromium-dev, Kỳ Nguyễn Viết, Max Rock
I found another way to install the extension here: https://stackoverflow.com/questions/50125821/standard-way-to-build-a-chrome-extension-into-chromium
But it seems that this only is an EXTENSION (as extensions installed on the chrome web store) for Chromium, not a COMPONENT (as hangout_services  or pdfViewer). You can refer to chrome://extensions-internals/ 
 
Vào lúc 21:03:04 UTC+7 ngày Thứ Ba, 21 tháng 11, 2023, Kỳ Nguyễn Viết đã viết:
Reply all
Reply to author
Forward
0 new messages