Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

how to add third party browser extension from googlechome store

Post Reply
dvbss11
Posts: 28
Joined: Sat Oct 26, 2019 6:30 pm

how to add third party browser extension from googlechome store

Post by dvbss11 »

tell me please how to add third party browser extension from googlechome store?
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: how to add third party browser extension from googlechome store

Post by salvadordf »

Hi,

I tried that using the Chrome runtime mode in the TinyBrowser2 demo several months ago.
I had to navigate to the store and install the extension but it worked.
https://chrome.google.com/webstore/category/extensions
dvbss11
Posts: 28
Joined: Sat Oct 26, 2019 6:30 pm

Re: how to add third party browser extension from googlechome store

Post by dvbss11 »

how to create a new tab programmatically in tiny2
TinyBrowser.FChromium.CreateBrowser(TinyBrowser.FChromium.BrowserHandle, TempRect, '', nil, nil, false);

what would TinyBrowser.FCromium.BrowserCount = 2


I also want to know how to programmatically interact with tiny2, for example, click on settings or activate the extension itself

thanks for your help
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: how to add third party browser extension from googlechome store

Post by salvadordf »

TinyBrowser2 let Chromium create the whole browser window and have limited control over the browser.

We can use most of the events, functions and procedures in TChromium but as far as I know, we can't interact with the user interface programmatically.

You can try sending keyboard shortcuts to open new tabs or to show the menu :
https://support.google.com/chrome/answer/157179?hl=en&co=GENIE.Platform%3DDesktop#zippy=

You can also try to use the DevTools methods to control the browser :
https://chromedevtools.github.io/devtools-protocol/
dvbss11
Posts: 28
Joined: Sat Oct 26, 2019 6:30 pm

Re: how to add third party browser extension from googlechome store

Post by dvbss11 »

trying to extend contextmenu functionality in tiny2 but my label is always enabled = false and i can't click on it



procedure TTinyBrowser2.Chrom_BeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
var b:boolean;
begin
model.InsertItemAt(0,121212, 'TestLabel');
b:=model.IsEnabled(121212);// false
b:=model.SetEnabled(121212,true);// true
b:=model.IsEnabled(121212);// false
model.AddSeparator;
end;
User avatar
salvadordf
Posts: 4056
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: how to add third party browser extension from googlechome store

Post by salvadordf »

The Chrome runtime mode is still in experimental state and some features don't work correctly.
We have to wait until the CEF project implements all the browser features into that mode.
Post Reply