GoogleChromeLabs / chromeos_smart_card_connector

Smart Card Connector App for Chrome OS
https://chrome.google.com/webstore/detail/smart-card-connector/khpfeaanjngmcnplbdlpegiifgpfgdco
Apache License 2.0
133 stars 50 forks source link

[mv3] Support popup windows - via message channels #1167

Closed emaxx-google closed 1 month ago

emaxx-google commented 1 month ago

This adds support of manifest v3 to the "popup-window" helpers. This is achieved by reimplementing the popup==>background page communication using message ports.

Previously, we used two other mechanisms for this communication:

Neither works in manifest v3 Extensions, hence this commit implements a new approach that should work in all build modes.

github-actions[bot] commented 1 month ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.53% lines.

github-actions[bot] commented 1 month ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.54% lines.

github-actions[bot] commented 1 month ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.53% lines.

github-actions[bot] commented 1 month ago

Continuous Integration: All tests passed. C/C++ test coverage: 73.55% lines.

emaxx-google commented 1 month ago

I've guarded some code in in-popup-main-script.js with checks because when the window is opened via createWindow() there's no popup_id passed and there's no need in one.