Giter VIP home page Giter VIP logo

dcef3's People

Contributors

hgourvest avatar pierreyager avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dcef3's Issues

Issue with 64-bit and OnLoadError event in 2454 branch

Hi Henri
Trying to get 2454 to work with Win64, but it is crashing when Load is called. Example code:

procedure TForm1.Button1Click(Sender: TObject);
begin
  crm:=TChromium.Create(self);
  crm.Parent:=self;
  crm.Align:=alclient;
  crm.Load('www.google.com');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  crm.Free;
end;

Mute audio

Hello,
i was wondering if there is a way to mute the audio of an embedded chromium in delphi?

In Regarads
CreativeMD

Can't play videos (HTML5)

I see that bin dir is missing ffmpegsumo.dll, o avcodecs of any kind... Then i've tried to run a video from web.whatsapp.com using HTML player and the videos doesnt run. Youtube is ok.

guiclient demo memory leak

memory leak occur when I close guiclient demo app.
but If I comment this line, not occur.
CefOnRegisterCustomSchemes := RegisterSchemes;

VisitDom is never Calling

Hi,

I tried to use mainframe.visitdom to itterate through the DOM. But the callback procedure is never calling.

FBrowser.Browser.Mainframe.VisitDomProc(DOMCallback);

I tried although
FBrowser.Browser.Mainframe.VisitDom(TCefFastDomVisitor.Create(DOMCallback));

procedure DOMCallback(const Document: ICefDomDocument);

begin
ShowMessage(Document.Body.GetValue);
end;

CEF 3.2623 support

Henri,

Is there any plan to upgrade to 3.2623 soon? I think that branch includes support for the new print preview functionality which would be a very useful feature.

Unable send character '.' using SendKeyEvent

It's code works for other character but '.' doesn't send:

var
  event: TCefKeyEvent;
  str:WideString;
begin
  str:='.';
  FillChar(event, SizeOf(TCefKeyEvent), 0);
  event.kind := KEYEVENT_KEYDOWN;
  event.character:=str[1];
  event.windows_key_code:=ord(str[1]);
  Chromium1.Browser.Host.Browser.MainFrame.Browser.Host.SendKeyEvent(@event);

  FillChar(event, SizeOf(TCefKeyEvent), 0);
  event.kind := KEYEVENT_CHAR;
  event.character:=str[1];
  event.windows_key_code:=ord(str[1]);
  Chromium1.Browser.Host.Browser.MainFrame.Browser.Host.SendKeyEvent(@event);

  FillChar(event, SizeOf(TCefKeyEvent), 0);
  event.kind := KEYEVENT_KEYUP;
  event.character:=str[1];
  event.windows_key_code:=ord(str[1]);
  Chromium1.Browser.Host.Browser.MainFrame.Browser.Host.SendKeyEvent(@event);

ICefRequest.PostData always is nil.

Hi, I registered a custom scheme which refer to the TFileScheme. and I post a request which has headers, body, now I can get the headers of request, but I cannot get body of request because of ICefRequest.PostData always return nil.
here is my code:

mydpr.dpr;
...
begin
...
 CefRegisterSchemeHandlerFactory('native', '', TWebNativeScheme);
...
end.
unit WebNativeScheme;
...
  TWebNativeScheme = class(TCefResourceHandlerOwn)
  private
    FFrame: ICefFrame;
    FBrowser: ICefBrowser;
    FResponse: IWebResponse;
    FResponseStream: TMemoryStream;
  protected
    // in this method, request.postData always is nil.
    function ProcessRequest(const request: ICefRequest;
      const callback: ICefCallback): Boolean; override;
    ...
  public
    constructor Create(const browser: ICefBrowser; const frame: ICefFrame;
      const schemeName: ustring; const request: ICefRequest); override;
    destructor Destroy; override;
  end;
....

myhtml.html:

...
Ajax.post({
      headers: { 
        key: 'value'    
      },
      url: 'native://ResouceHandler.dll/Unit3/TResourceHandler',
      data: { key1: 'value1' },
      onSuccess: function(http){
        alert(http.responseText);
      },
      onError: function(http){
        alert("fail");
      }
    });
...

Please tell me this is my code wrong, or CEF itself. Thanks.

Font Rendering

How can i get smooth fonts on dcef3? I have tested the same sites on Chrome Client (https://cefbuilds.com/) on the same build from dcef3 and i get smooth fonts. Is there any command to enable direct-write ou something else?

request: add support for creating browsers in different contexts

I've been working with testing some of the new SetPreferences features (as noted in my other thread about dynamically changing the proxy). As part of testing some network issues, I wanted to put several TChromium instances in one app, each with a different proxy. But I eventually noticed that when I used SetPreferences, the change was global. This is because crm.Browser.Host.RequestContext is shared among the different instances. I dug down and here's how I changed it so that each browser got their own context:

procedure TCustomChromium.CreateBrowser;
var
  info: TCefWindowInfo;
  rect: TRect;
  settings: TCefBrowserSettings;
  contextSettings: TCefRequestContextSettings;
  context: ICefRequestContext;
begin
  if not (csDesigning in ComponentState) then
  begin
    FillChar(info, SizeOf(info), 0);
    rect := GetClientRect;
    info.Style := WS_CHILD or WS_VISIBLE or WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_TABSTOP;
    info.parent_window := Handle;
    info.x := rect.left;
    info.y := rect.top;
    info.Width := rect.right - rect.left;
    info.Height := rect.bottom - rect.top;
    FillChar(settings, SizeOf(TCefBrowserSettings), 0);
    settings.size := SizeOf(TCefBrowserSettings);
    GetSettings(settings);
    //contextHandler := TCefRequestContextHandlerRef.
    FillChar(contextSettings, SizeOf(contextSettings), 0);
    contextSettings.size := SizeOf(contextSettings);
    context := TCefRequestContextRef.New(@contextSettings, nil);
{$IFDEF CEF_MULTI_THREADED_MESSAGE_LOOP}
//    CefBrowserHostCreate(@info, FHandler, FDefaultUrl, @settings, nil);
    CefBrowserHostCreate(@info, FHandler, FDefaultUrl, @settings, context);
{$ELSE}
//    FBrowser := CefBrowserHostCreateSync(@info, FHandler, '', @settings, nil);
    FBrowser := CefBrowserHostCreateSync(@info, FHandler, '', @settings, context);
    FBrowserId := FBrowser.Identifier;
{$ENDIF}
  end;
end;

First, does this look correct or have I messed anything up? Do you know of anything wrong with passing in nil to the TCefRequestContextRef.New call?

This is working for me, at least with CEF_MULTI_THREADED_MESSAGE_LOOP turned off.

I was thinking was that TChromium could have a property like UseNewContext and if it was set, then CreateBrowser could use a different context for that one. Otherwise, it would use the global context.

What do you think?

DevTools bugs

f you open the DevTools --> Settings --> WorkSpace and click Add Folder, nothing happens, at least on the guiclient demo on which I based some development of mine.

At the same time, if you try to use TimeLine or Profiles, and you want to save on file (.json), the Save window won't open. The Load window, on the contrary, seems to work fine

FMX / Mouse wheel event isn't working when application is ran on secondary screen

Hello,

TChromiumFMX doesn't react to mouse wheel when application is ran on secondary screen.

Edit ceffmx.pas and modify remplace AbsoluteToLocal with ScreenToLocal

procedure TCustomChromiumFMX.MouseWheel(Shift: TShiftState; WheelDelta: Integer;
  var Handled: Boolean);
var
  event: TCefMouseEvent;
begin
  if (FMouseWheelService <> nil) AND (Browser <> nil) then
  begin
      with  ScreenToLocal(FMouseWheelService.GetMousePos()).Round do
      begin
        event.x := X;
        event.y := Y;
        event.modifiers := getModifiers(Shift);
        Browser.Host.SendMouseWheelEvent(@event, 0, WheelDelta);
      end;
  end;

drop down list

When the position of the form changes, the position of the drop-down box is not re located. Re location only when the size of the form changes. This question should be how to deal with

Some pages crashing app

I'm using branch 2704.

When i load some specific pages on TChromium, it will crash my app. An example of page this problem happens is :

http://www.arenasertanejashows.com.br

Just load this page with TChromium default options and app will crash.

The problem is fixed if i set TChromium.Options.ImageLoading to STATE_DISABLED, but of course, no images are loaded.

Backspace not working if inside ActiveX

Hi, first of all congratulations for this great work! i'm loving DCEF!

I'm putting a TChromium component inside an ActiveX (i'm using delphi 10) so i can run chromium from inside IE8 and it works pretty well.
My only problem is with the backspace key, every time i press it IE go one page back.

Why i'm posting this here? Because before DCEF3 i used DCEF. The same project with DCEF don't have the backspace problem! It correctly handle inside the activex

So.. i'm pretty out of ideas. This thread is my last hope, because the entire project cannot work right now.
Do you have any idea of why this is happening or how to fix it?

I made a few test and the TChromium's "OnKeyEvent" does not trigger at all when pressing backspace, looks like IE intercepts it (but it works with DCEF1 :\ )

thank you!

webrtc

I would like to ask how to open webrtc it

Is there a way to initiate a download from code?

Hi,

I'm looking for a way to download an image from the web and save it locally. Something like this:
crm.Browser.Download('http://some.url.com/some/path/a_picture.jpg', 'c:\local\path\a_picture.jpg');

I've been trying to use the OnGetResourceHandler event, but I suppose I need to write my own ResourceHandler? Is that correct and how do I do that?

procedure TMainForm.crmGetResourceHandler(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const request: ICefRequest; out Result: ICefResourceHandler);
begin
if request.ResourceType = RT_IMAGE then
//Save image somehow
end;

This is just a simplified explanation. On the real website there might be 50, 80 or more images. The site requires that i log in first, so I can't just use "request.Url" with another http component, cause then I get a permission denied error.
Thanks in advance for any help and suggestions. :)

CEF1 and CEF3 compatibilities

Hello Hervé,

Most components from TMS Cloud Pack for Firemonkey are wrapped arround DCEF1. They did it because TWebBrowser wans't available on Win32/Win64 platform till XE6. I recently sent them fixes to make their component works with DCEF3. That wasn't a big deal :

I changed these events from

    {$IFDEF USECHROMIUM}
    procedure BeforeBrowse(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame;
    const request: ICefRequest; navType: TCefHandlerNavtype;
    isRedirect: boolean; out Result: Boolean);
    procedure LoadEnd(Sender: TObject; const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer; out Result: Boolean);
    {$ENDIF}

to

    {$IFDEF USECHROMIUM}
    procedure BeforeBrowse(Sender: TObject;const browser: ICefBrowser; const frame: ICefFrame;
     const request: ICefRequest; isRedirect: Boolean; out Result: Boolean);
    procedure LoadEnd(Sender: TObject;
     const browser: ICefBrowser; const frame: ICefFrame; httpStatusCode: Integer);
    {$ENDIF}

and changed these calls from

FWebBrowser.Browser.MainFrame.LoadFile(AFile, AFile);

to

FWebBrowser.Browser.MainFrame.LoadString(AFile, 'localhost');

Here is the answer they gave me :

What I meant was to modify the event handlers in CEF3 (ceffmx.pas) to match the ones defined in the FMX.TMSWebGMapsWebBrowser.Win source and create a LoadFile that internally calls the correct method. You can work on a copy of CEF3. This way we keep compatibility with CEF1, accommodate for other users that might still use CEF1, and then you can use CEF3 instead of using the default TWebBrowser implementation.

What do you think ?

Problem when using ReCreateBrowser

Henri - Similar to my last report, using branch 2454, the line SendMessage(FBrowser.Host.WindowHandle, WM_CLOSE, 0, 0) in ReCreateBrowser is causing the app to close. All fine after commenting it out

Are there updates of Chrome DLLs for DCEF3 to keep updated with new internet standards

Hi, I have some strange behaviour of Chromium DCEF-2454 with Delphi 7. It seems to be freezing. I can download a page and then suddenly is freezing... If I try to use the LoadUrl again command then LoadStart event is no more triggered.

Any idea where it can come from ?
Is that due to some Java Script that is not supported by my DCEF version ?
Are there DLLs or code updates required to have more stable version ?

Hope someone can help me.

Regards. Renaud.

Release 3.2743

Hi support team,

I would like to know when dcef3 will be using the release 3.2743 ?
I'm facing issues related to PDF files which are solved on release 3.2743

Thanks in advance for your answer

version upgrade

Hello, chrome current version is already 50, can be upgraded at any time DCEF3 version?

Fix Press the backspace key will delete the two characters

In the input box, press the backspace key will delete the two characters
Modify the code
ceffmx.pas
procedure TCustomChromiumFMX.DialogKey(var Key: Word; Shift: TShiftState);
var
event: TCefKeyEvent;
begin
if (Browser <> nil) and (IsFocused) then
begin
FillChar(event, SizeOf(event), 0);
event.kind := KEYEVENT_KEYDOWN;
event.modifiers := getModifiers(Shift);
event.windows_key_code := Key;
Browser.Host.SendKeyEvent(@event);
if Key = 9 then
Key := 0;
end;
Result := False;
if Assigned(FOnBeforeUnloadDialog) then
FOnBeforeUnloadDialog(Self, browser, messageText, isReload, callback, Result);
end;

TO:
procedure TCustomChromiumFMX.DialogKey(var Key: Word; Shift: TShiftState);
var
event: TCefKeyEvent;
begin
if (Browser <> nil) and (IsFocused) then
begin
FillChar(event, SizeOf(event), 0);
if Key = 9 then
event.kind := KEYEVENT_KEYDOWN
else
event.kind := KEYEVENT_KEYUP;
event.modifiers := getModifiers(Shift);
event.windows_key_code := Key;
Browser.Host.SendKeyEvent(@event);
if Key = 9 then
Key := 0;
end;
end;

Can modify this bug.

Tabbed browser example

Any example for tabbed browser? (Overriding OnBeforePopup, creating a new tab, closing a tab)

about ceffmx doOnPaint?

this code Web page can't display normally

procedure TCustomChromiumFMX.doOnPaint(const browser: ICefBrowser;
kind: TCefPaintElementType; dirtyRectsCount: NativeUInt;
const dirtyRects: PCefRectArray; const buffer: Pointer;
width, height: Integer);
var
src, dst: PByte;
offset, i, {j,} w, c: Integer;
begin
if csDestroying in ComponentState then Exit;

if (FBuffer <> nil) and (FBuffer.Width = Width) and (FBuffer.Height = Height) then
// begin
// Move(buffer^, StartLine^, vw * vh * 4);
// InvalidateRect(ClipRect);
// end;
with FBuffer do
for c := 0 to dirtyRectsCount - 1 do
begin
w := Width * 4;
offset := ((dirtyRects[c].y * Width) + dirtyRects[c].x) * 4;
src := @PByte(buffer)[offset];
dst := @PByte(StartLine)[offset];
offset := dirtyRects[c].width * 4;
for i := 0 to dirtyRects[c].height - 1 do
begin
// for j := 0 to offset div 4 do
// PAlphaColorArray(dst)[j] := PAlphaColorArray(src)[j] or $FF000000;
System.Move(src^, dst^, offset);
Inc(dst, w);
Inc(src, w);
end;
//InvalidateRect(ClipRect);
InvalidateRect(RectF(dirtyRects[c].x, dirtyRects[c].y,
dirtyRects[c].x + dirtyRects[c].width, dirtyRects[c].y + dirtyRects[c].height));
end;
end;

but Changes as,Web page can display normally

procedure TCustomChromiumFMX.doOnPaint(const browser: ICefBrowser;
kind: TCefPaintElementType; dirtyRectsCount: NativeUInt;
const dirtyRects: PCefRectArray; const buffer: Pointer;
width, height: Integer);
var
wSrc : PByte;
wOffset, i, j, c : Integer;
wBitmapData: TBitmapData;
wColor: TAlphaColor;
const
_BytesPercolor : integer = 4;
begin
// Khalid : This is not fully optimized as the buffer returned by Chrome engine is not serialized, so need to loop
// on each pixel (well can optimize using memory copy but need to have the same pixel format for Chrom buffer and Firemonkey Tbitmap)

if (FBuffer = nil) then
FBuffer := TBitmap.Create(Width, Height);

if (FBuffer.Width = Width) and (FBuffer.Height = Height) and (dirtyRectsCount > 0) then
begin
FBuffer.Map(TMapAccess.ReadWrite, wBitmapData); // Getting the bitmap data pointer
try
for c := 0 to dirtyRectsCount - 1 do // for each rect
begin
begin
for i := 0 to dirtyRects[c].height - 1 do // loop on pixels
begin
for j := 0 to dirtyRects[c].width - 1 do
begin
wOffset := (((dirtyRects[c].y + i) * width) + dirtyRects[c].x + j) * _BytesPercolor; // calculate offset
wSrc := @PByte(buffer)[wOffset];
System.Move(wSrc^, wColor, _BytesPercolor); // move color value to firemonkey bitmap
wBitmapData.SetPixel(dirtyRects[c].x + j , dirtyRects[c].y + i, wColor);
end;
end;
end;
InvalidateRect(RectF(0,0,width,height)); // update
end;
finally
FBuffer.Unmap(wBitmapData);
end;
end;
end;

Enter-Key in JavaScript KeyUp not working

It looks like in branch 2454, the key up event will not be fired on Enter-key from the browser.

If I do something like this in a HTML page

myTextField.onkeyup = function (e) { console.log("keyup: " + e.keyCode); }

and click any key, it will work for all keys except for the Enter key. The browser only fires keypress and keydown events for this key.

I compared it with a CEF3 test app. There it has worked just fine.
You can download it from here: CEF Builds on "Branch 2454" > "Test App".

For testing this event, I uploaded a Test HTML page with a JQuery file:
TestPage.zip

Is this a bug or did I miss something?

Crash when using Free (solution)

Hi Henri, using branch 2454 and I noticed that the line FBrowser.Host.CloseBrowser(False) in TCustomChromium.Destroy is causing the app to close when Free is called. To reproduce it, just try:

procedure TForm1.Button1Click(Sender: TObject);
begin
  crm:=TChromium.Create(self);
  crm.Parent:=self;
  crm.Align:=alclient;
  crm.Load('www.google.com');
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  crm.Free;
end;

Browser showing internal data sometimes

Hi,

Sometimes when i'm using TChromium, instead of loading the page i'm trying to load, it loads a page with this content :

CEF 3.2704.1427.g95055fe
Chromium 51.0.2704.84
OS Windows
WebKit 537.36
JavaScript 5.1.281.59
Flash
User Agent Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.84 Safari/537.36
Command Line "C:\Program Files (x86)\MyApp\myapp.exe" --single-process --no-sandbox --lang=en-US --log-file="C:\Program Files (x86)\MyApp\debug.log" --log-severity=disable --disable-gpu-watchdog --disable-direct-composition --supports-dual-gpus=false --gpu-driver-bug-workarounds=4,12,13,25,46,54 --gpu-vendor-id=0x8086 --gpu-device-id=0x0a16 --gpu-driver-vendor="Intel Corporation" --gpu-driver-version=20.19.15.4331 --num-raster-threads=2 --content-image-texture-target=3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553 --video-image-texture-target=3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553 logdet
Module Path C:\Program Files (x86)\MyApp\libcef.dll
Cache Path C:\Users\rnrso\AppData\Roaming\MyApp\cookies

Update CEF

Hello.
Whether the CEF updatings to new versions are planned?

symbol 'seek' is deprecated on XE4+

not a bug, bug just an annoying warning :

w1000 symbol 'seek' is deprecated

in

function TCefCustomStreamReader.Seek(offset: Int64; whence: Integer): Integer;
begin
Result := FStream.Seek(offset, whence);
end;

DCEF2623 MultiProcess SendProcessMessage not work

Hi, thanks for update! In example guiclient not work next code if CefSingleProcess:=false;

class procedure TTestExtension.mouseover(const data: string);
var
  msg: ICefProcessMessage;
begin
  msg := TCefProcessMessageRef.New('mouseover');
  msg.ArgumentList.SetString(0, data);
  TCefv8ContextRef.Current.Browser.SendProcessMessage(PID_BROWSER, msg);
end;

Previously worked

Trying to show the developer tools in a 64-bit process leads to a crash

Hello,

Trying to launch developer tools in an external window using TChromium's method called ShowDevTools leads to a crash when running a 64-bit build. I experimented with the guiclient demo and it seems the error comes from libcef.dll. However, using the TChromiumDevTools component as already implemented in the demo works fine even in 64-bit.

I'm using the latest version of dcef3 (branch 2704) on Windows 7 64-bit.

To easily see the issue change the following procedure in the guiclient demo to be:

procedure TMainForm.actDevToolExecute(Sender: TObject);
begin
  if actDevTool.Checked then
  begin
//    DevTools.Visible := True;
//    Splitter.Visible := True;
//    DevTools.ShowDevTools(crm.Browser);
    crm.ShowDevTools();
  end else
  begin
    DevTools.CloseDevTools(crm.Browser);
    Splitter.Visible := False;
    DevTools.Visible := False;
  end;
end;

Then change the build configuration to 64-bit and run the application. Now click the "Show DevTools" menu item from the "Test" menu to see the crash.

Exception on V8

Have exceptrion on build 2704 and 2623 and work good on 2454

Class
Unit Cefutils;

Interface

Uses
Classes,
SysUtils,
StrUtils,
Cefvcl,
Math,
Ceflib;

Type
TCustomRenderMessageReceived = Class(TCefRenderProcessHandlerOwn)
Private
Procedure WriteLogDebug(Const LogText: String);
Protected
Function OnProcessMessageReceived(Const browser: ICefBrowser; sourceProcess: TCefProcessId; Const message: ICefProcessMessage): Boolean; Override;
End;

Implementation

Function TCustomRenderMessageReceived.OnProcessMessageReceived(Const browser: ICefBrowser; sourceProcess: TCefProcessId; Const message: ICefProcessMessage): Boolean;
Var
CefProcessMessage: ICefProcessMessage;
CefV8Value: ICefv8Value;
CefV8Exception: ICefV8Exception;
Begin
Result := False;

If (Message.Name = 'ExecuteEval') Then
Try
CefProcessMessage := TCefProcessMessageRef.New('ExecuteEval');
browser.MainFrame.GetV8Context.Eval(Message.ArgumentList.GetString(0), CefV8Value, CefV8Exception);
browser.SendProcessMessage(PID_BROWSER, CefProcessMessage);
Result := True;
exit;
Except
On E: Exception Do
WriteLogDebug('Exception ExecuteEval: ' + E.message);
End;
End;

Procedure TCustomRenderMessageReceived.WriteLogDebug(Const LogText: String);
Var
VarFile: TextFile;
Begin
Try
AssignFile(VarFile, 'DebugCefLog.txt');
If FileExists('DebugCefLog.txt') = True Then
Begin
Append(VarFile)
End
Else
Begin
ReWrite(VarFile);
End;
Writeln(VarFile, Trim(DateTimeToStr(Date + Time) + ':' + ' ' + LogText));
CloseFile(VarFile);
Except
End;
End;

Initialization

CefRenderProcessHandler := TCustomRenderMessageReceived.Create;

End.

Execute on main
CefProcessMessage := TCefProcessMessageRef.New('ExecuteEval');
crm.browser.SendProcessMessage(PID_RENDERER, CefProcessMessage);

how to install dcef3 in Xe8 ?

hello ,, im new user of delphi ,, i want to ask how to install dcef3 in delphi xe8 ? i was install it in delphi 7 before and not found any problem ..

Huge memory consumption when Options.ImageLoading set to STATE_DISABLED

I'm using branch 2704.

With default options. TChromium won't consume much memory over time, never reaching more than 200-250mb.

But if i set Options.ImageLoading to STATE_DISABLED, after some time loading pages i can see the memory increasing and easily going on > 1GB, just by loading pages. This problem is easily reproduced by using a TTimer to loop page loading each 10 seconds, for instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.