Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionRequestType is out of sync compared to cef_permission_request_types_t #4935

Closed
1 task done
szanto90balazs opened this issue Sep 21, 2024 · 2 comments
Closed
1 task done

Comments

@szanto90balazs
Copy link

Is there an existing issue for this?

  • I have searched both open/closed issues, no issue already exists.

CefSharp Version

128.4.90

Operating System

Windows 11

Architecture

x64

.Net Version

.Net 6.0

Implementation

WPF

Reproduction Steps

  1. Run the CefSharp.Wpf.Example app with debugger attached
  2. Go to https://permission.site/
  3. Click on the Location button
  4. Go to the Debug output and find the following debug line sent by this code (System.Diagnostics.Debug.WriteLine($"{promptId}|{requestedPermissions} {requestingOrigin}");)

Expected behavior

Expected: 1|Geolocation https://permission.site/

Actual behavior

Actual: 1|MicStream https://permission.site/

Regression?

The C# PermissionRequestType enum and the C++ cef_permission_request_types_t enum got out of sync, seems like since this CEF commit: chromiumembedded/cef@dc2231c

image

Known Workarounds

You could introduce MyPermissionRequestType based on the values of cef_permission_request_types_t and cast PermissionRequestType to uint to MyPermissionRequestType, this will require a custom permission handler implementation.

Does this problem also occur in the CEF Sample Application

No

Other information

No response

@szanto90balazs
Copy link
Author

szanto90balazs commented Sep 21, 2024

I'm happy to send a PR with an updated PermissionRequestType and potentially come up with some tests. In the past the uint value of Geolocation changed two times in the enum according to the history of cef_types.h

@amaitland
Copy link
Member

PR would be most welcome 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants