tchromium

How do I install the Chromium package in Delphi?

允我心安 提交于 2019-12-25 05:32:53
问题 I downloaded the necessary from http://code.google.com/p/delphichromiumembedded/ with TortoiseSVN, but I do not know how to use it in Delphi XE2. How do I install the TChromium component? 回答1: To install the component, open the appropriate package - in your case, DCEF_XE2.dpk in packages directory and install the package. 来源: https://stackoverflow.com/questions/14124690/how-do-i-install-the-chromium-package-in-delphi

How make a click on a chromium browser link open in the default browser?

孤街醉人 提交于 2019-12-23 20:21:22
问题 I want to achieve that when a user clicks on a hyperlink inside a TChromium browser page, the new page opens in his default browser. 回答1: In the OnBeforeBrowse event check if the navType parameter equals to NAVTYPE_LINKCLICKED and if so, return True to the Result parameter (which will cancel the request for Chromium) and call e.g. ShellExecute passing the request.Url value to open the link in the user's default browser: uses ShellAPI, ceflib; procedure TForm1.Chromium1BeforeBrowse(Sender:

How to change default background color for TChromium component?

末鹿安然 提交于 2019-12-23 18:13:32
问题 I use TChromium. I assign AWebPageAsString which is a static HTML page with a gray background color. FBrowser := TChromium.Create(pnlHolder); FBrowser.Visible := false; FBrowser.Parent := TWinControl(pnlHolder); FBrowser.Align := alClient; FBrowser.OnBeforeBrowse := BrowserBeforeBrowse; FBrowser.HandleNeeded; FBrowser.FontOptions.RemoteFontsDisabled := true; FBrowser.Browser.MainFrame.LoadString(AWebPageAsString, 'navigate:webpage'); When I start the application it is displayed first with

TChromium ChromeTabs Not Working

夙愿已清 提交于 2019-12-21 06:48:25
问题 I want do a Tabs for my TChromium. I have this: Browsers: array[0..1000] of TChromium; And this ChromeTabs procedures: procedure TForm1.ChromeTabsActiveTabChanged(Sender: TObject; ATab: TChromeTab); var c:integer; begin for c := 0 to ChromeTabs.Tabs.Count do if browsers[c]<>NIL then if c=ChromeTabs.ActiveTabIndex then browsers[c].Visible:=true else browsers[c].visible:=false; end; procedure TForm1.ChromeTabsButtonAddClick(Sender: TObject; var Handled: Boolean); begin browsers[ChromeTabs

How to iterate DOM nodes in Delphi Chromium Embedded without use of anonymous method?

雨燕双飞 提交于 2019-12-13 18:43:36
问题 Delphi Embedded Chrome Due to my limited skill, I cannot figure out how to do the same thing in Delphi 7, as it doesn't support an anonymous method! 回答1: procedure TheProcThatHandlesItAll(const doc: ICefDomDocument) var q: ICefDomNode; begin // "q" is the ID of the text input element q := doc.GetElementById('q'); if Assigned(q) then q.SetElementAttribute('value', 'Hello, world'); end procedure TMainForm.actDomExecute(Sender: TObject); begin crm.Browser.MainFrame.VisitDomProc

Changing the user agent in Chromium Embedded 3 (DCEF3) (CefVCL)

﹥>﹥吖頭↗ 提交于 2019-12-13 17:09:45
问题 I'm trying to modify the User Agent of TChromium and I found no procedure for this, in case it is using CefVCL. Already by ceflib looks like it has to yes, I saw a variable "settings" that receives a value "user_agent" but the VCL already has, will have or is not possible this way? 回答1: There is no built in way to do this. In my experience, the user-agent setting does nothing.. so you have to edit ceflib.pas directly (line ~8532) to achieve this effect. settings.user_agent := cefstring

Clear Cookies in TChromium

自闭症网瘾萝莉.ら 提交于 2019-12-13 02:14:53
问题 How to clear cookies in CEF3.1547 I have tried the following solution however this simply does nothing. Cookies are still present. Is there a better solution than this? procedure TForm1.Button1Click(Sender: TObject); var CookieManager: ICefCookieManager; begin // login to site CookieManager := TCefCookieManagerRef.GetGlobalManager; CookieManager.VisitAllCookiesProc( function(const name, value, domain, path: ustring; secure, httponly, hasExpires: Boolean; const creation, lastAccess, expires:

Different cookie handlers for two chromium instances on one form

南楼画角 提交于 2019-12-08 19:33:32
I'm using DCEF3 on Delphi XE3. Task is : Create different cookie storages for different TChromium instances. Problem : I'm creating different ICefCookieManager instances for each TChromium instances and its returning in GetCookieManager event. Example code: type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Chromium1: TChromium; Chromium2: TChromium; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure Chromium1GetCookieManager(Sender: TObject; const browser: ICefBrowser; const mainUrl: ustring; out

Delphi XE3 and TChromium

天涯浪子 提交于 2019-12-08 08:21:38
问题 Make out the work with a component in Delphi XE3 TChromium need to get to the content of the page is loaded forums found examples of working code: procedure DoWork (const doc: ICefDomDocument); var q: ICefDomNode; begin q: = doc.GetElementById ('q'); if Assigned (q) then q.SetElementAttribute ('value', 'Hello, world'); end; procedure actDomExecute; var q: ICefDomNode; begin crm.Browser.MainFrame.VisitDomProc (DoWork); end; But the debugger somehow bypasses execution of an obstinately DoWork.

Different cookie handlers for two chromium instances on one form

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-08 06:21:07
问题 I'm using DCEF3 on Delphi XE3. Task is : Create different cookie storages for different TChromium instances. Problem : I'm creating different ICefCookieManager instances for each TChromium instances and its returning in GetCookieManager event. Example code: type TForm1 = class(TForm) Button1: TButton; Button2: TButton; Chromium1: TChromium; Chromium2: TChromium; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); procedure FormCreate(Sender: TObject); procedure