Igalia / wolvic-chromium

The official GitHub mirror of the Chromium source
https://chromium.googlesource.com/chromium/src/
BSD 3-Clause "New" or "Revised" License
11 stars 6 forks source link

Expose SelectionPopupControllerImpl's interface to Wolvic #81

Closed mshin-wolvic closed 6 months ago

mshin-wolvic commented 6 months ago

This CL adds the delegation in SelectionPopupController to expose the interface called by native to wolvic.

mshin-wolvic commented 6 months ago

I trust your criteria and understand that you've evaluated several possibilities but I don't like the fact that we have to touch the SelectionPopupControllerImpl file. Isn't there any other way to achieve this?

Unfortunately, I couldn't find a way to implement this without touching the content area. I tried to add the least amount of code to the file that was assumed to be the least expensive when rebasing. Another way I thought is to replace all SelectPopupController class in native side, which will also touch 4 files in //content.

svillar commented 6 months ago

I trust your criteria and understand that you've evaluated several possibilities but I don't like the fact that we have to touch the SelectionPopupControllerImpl file. Isn't there any other way to achieve this?

Unfortunately, I couldn't find a way to implement this without touching the content area. I tried to add the least amount of code to the file that was assumed to be the least expensive when rebasing. Another way I thought is to replace all SelectPopupController class in native side, which will also touch 4 files in //content.

And wouldn't it be possible to provide our own SelectionPopupControllerImpl ? It'll inherit from the one in content but will have the delegate and the delegate calls where appropriate? (I didn't check the code just asking, not sure how feasible that would be)

mshin-wolvic commented 6 months ago

And wouldn't it be possible to provide our own SelectionPopupControllerImpl ? It'll inherit from the one in content but will have the delegate and the delegate calls where appropriate? (I didn't check the code just asking, not sure how feasible that would be)

I also considered inheritance of 'SelectionPopupControllerImpl', but it cant not be exposed to Wolvic since it is placed in //content/browser, SelectionPopupController is exposed to access by the external layer, but It is not suitable for APIs that require a delegate. Rather, it is closer to ask getting information/updating for the selection UI.