Page 2 of 2
Re: UserAgentAndMetadata Source
Posted: Fri Feb 07, 2025 6:33 am
by dilfich
sodlf159 wrote: Wed Feb 05, 2025 5:50 pm
https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setEmitTouchEventsForMouse
So what?
It doesn't work in
OSR, there's still a regular cursor, that's what I was talking about.
Code: Select all
procedure TChrom.CursorChange( Sender : TObject;
const browser : ICefBrowser;
cursor_ : TCefCursorHandle;
cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo;
var aResult : boolean);
begin
Form1.BufferPanel.Cursor := CefCursorToWindowsCursor(cursorType);
aResult := True;
end;
TCefCursorType - there is no touchpad
Re: UserAgentAndMetadata Source
Posted: Sat Feb 08, 2025 3:35 am
by dilfich
And yes, we forgot about the parameter in
setUserAgentOverride.
Code: Select all
TempParams.SetString('platform', 'Linux armv81');
Navigator Object
https://browserleaks.com/javascript
If not specified, it will show
platform Win32
Re: UserAgentAndMetadata Source
Posted: Mon Feb 10, 2025 11:29 pm
by sodlf159
dilfich wrote: Fri Feb 07, 2025 6:33 am
sodlf159 wrote: Wed Feb 05, 2025 5:50 pm
https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setEmitTouchEventsForMouse
So what?
It doesn't work in
OSR, there's still a regular cursor, that's what I was talking about.
Code: Select all
procedure TChrom.CursorChange( Sender : TObject;
const browser : ICefBrowser;
cursor_ : TCefCursorHandle;
cursorType : TCefCursorType;
const customCursorInfo : PCefCursorInfo;
var aResult : boolean);
begin
Form1.BufferPanel.Cursor := CefCursorToWindowsCursor(cursorType);
aResult := True;
end;
TCefCursorType - there is no touchpad
TempParams := TCefDictionaryValueRef.New;
TempParams.SetDouble('configuration', mobile);
TempParams.SetDouble('enabled', True);
Chromium1.ExecuteDevToolsMethod(0, 'Emulation.setEmitTouchEventsForMouse', TempParams);
Re: UserAgentAndMetadata Source
Posted: Tue Feb 11, 2025 8:02 am
by dilfich
sodlf159 wrote: Mon Feb 10, 2025 11:29 pm
TempParams := TCefDictionaryValueRef.New;
TempParams.SetDouble('configuration', mobile);
TempParams.SetDouble('enabled', True);
Chromium1.ExecuteDevToolsMethod(0, 'Emulation.setEmitTouchEventsForMouse', TempParams);
What's new here?
Try it yourself in the demo -
SimpleOSRBrowser
Code: Select all
procedure TForm1.Button1Click(Sender: TObject);
var
TempParams : ICefDictionaryValue;
begin
TempParams := TCefDictionaryValueRef.New;
TempParams.SetBool('enabled', True);
TempParams.SetString('configuration', 'mobile'); // desktop
chrmosr.ExecuteDevToolsMethod(0, 'Emulation.setEmitTouchEventsForMouse', TempParams);
end;