tchromium

Chromium embedded framework: Creating an object fails when using “ExecuteFunctionWithContext”

别等时光非礼了梦想. 提交于 2019-12-07 16:21:40
问题 Overview I am using chromium embedded framework (cef) on Delphi 2009, it is the latest release. Error I can use ExecuteFunctionWithContext to successfully execute a JavaScript callback routine and I can supply it with arguments. However, when I try and use TCefv8ValueRef.CreateObject(nil); an access violation occurs in the libcef library. Assumptions Pushing an argument to the JavaScript callback works for TCefv8ValueRef.CreateString and all the other Cefv8Value types. The TCefv8ValueRef

How to attach context menu to TChromium browser

▼魔方 西西 提交于 2019-12-07 06:27:02
问题 I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to attach a context menu to it. How I can achieve that? 回答1: You need to handle the OnBeforeMenu event. In that event handler is enough to set the output parameter Result to True what will suppress the default context menus to popup. After that you can display your own menu on the positions obtained from the menuInfo structure. Here's the code sample with a custom popup menu

How do I clear the cache and cookies for an embedded Chromium browser?

旧街凉风 提交于 2019-12-07 03:15:06
问题 I created a browser with TChromium. The TChromium is created dynamically. Facebook access (login) At the end of the process, the component is destroyed. The problem occurs when the component is created again He continues with the previous session (login). I need to clean all cache and cookies. (Force Log out) Below the code I create the component by: var Chromium: TChromium; begin try Chromium := TChromium.Create(nil); Chromium.SetParentComponent(Form1); Chromium.Align := alClient; chromium

Delphi TChromium / DCEF3 - Constant Access Violations

人盡茶涼 提交于 2019-12-06 12:37:27
问题 I'm trying to use DCEF3 TChromium as a replacement for TWebbrowser component. I downloaded the packages and installed it on my IDE (Delphi 2007). I'm testing the demo on demos\guiclient and when i try to open certain web pages, i get tons of Access Violation exceptions and my app crashes. If i'm inside Delphi, i get this exception before Delphi itself crashes : 'Assertion failure : 'item.src' in \win32scr\DBKIMPL.CPP' at line 2691' One example of a page that has this problem is www

Getting errors creating ChromiumOSR programmatically

跟風遠走 提交于 2019-12-06 03:23:29
问题 I'm trying to create ChromiumOSR programmatically but I keep getting an error (access violation). Here is sample code that causes the problem: var pChromiumOSR: TChromiumOSR; begin pChromiumOSR := TChromiumOSR.Create(Self); pChromiumOSR.OnLoadEnd := pChromiumOSRLoadEnd; pChromiumOSR.Browser.MainFrame.LoadUrl('www.google.com'); end; The problem is that pChromiumOSR.Browser.MainFrame is always nil. If I do pChromiumOSR.load('www.google.com'); I don't get any errors but it doesn't fire the

How to mute the sound of a Delphi Chromium Embedded (TChromium) component?

久未见 提交于 2019-12-05 21:13:42
问题 I need to mute the sound of a TChromium component to make a silent browser. The main problem is on Windows XP where when I mute the sound of a browser, it mute the overall system sound. Is there a way how to mute the sound of a TChromium component ? 回答1: I have succeeded with the following code: procedure CustomCommandLine (const processType: ustring; const commandLine: ICefCommandLine); begin commandLine.AppendSwitch('--mute-audio'); end; begin CefOnBeforeCommandLineProcessing :=

Chromium embedded framework: Creating an object fails when using “ExecuteFunctionWithContext”

点点圈 提交于 2019-12-05 19:32:12
Overview I am using chromium embedded framework (cef) on Delphi 2009, it is the latest release. Error I can use ExecuteFunctionWithContext to successfully execute a JavaScript callback routine and I can supply it with arguments. However, when I try and use TCefv8ValueRef.CreateObject(nil); an access violation occurs in the libcef library. Assumptions Pushing an argument to the JavaScript callback works for TCefv8ValueRef.CreateString and all the other Cefv8Value types. The TCefv8ValueRef.CreateObject(nil) function works fine when it is used as a return value for a chromium extension. (As

How to attach context menu to TChromium browser

爱⌒轻易说出口 提交于 2019-12-05 10:44:04
I have a TChromium broser from Delphi Chromium Embedded (http://code.google.com/p/delphichromiumembedded). I would like to attach a context menu to it. How I can achieve that? You need to handle the OnBeforeMenu event. In that event handler is enough to set the output parameter Result to True what will suppress the default context menus to popup. After that you can display your own menu on the positions obtained from the menuInfo structure. Here's the code sample with a custom popup menu: uses ceflib, cefvcl; procedure TForm1.FormCreate(Sender: TObject); begin Chromium1.Load('www.example.com')

Delphi TChromium / DCEF3 - Constant Access Violations

a 夏天 提交于 2019-12-04 17:15:44
I'm trying to use DCEF3 TChromium as a replacement for TWebbrowser component. I downloaded the packages and installed it on my IDE (Delphi 2007). I'm testing the demo on demos\guiclient and when i try to open certain web pages, i get tons of Access Violation exceptions and my app crashes. If i'm inside Delphi, i get this exception before Delphi itself crashes : 'Assertion failure : 'item.src' in \win32scr\DBKIMPL.CPP' at line 2691' One example of a page that has this problem is www.whatsmyuseragent.com One example of a page that opens correctly is www.google.com After a lot of testing i found