electron/shell/browser/api
Athul Iddya 905e41bbdd
fix: use StartUpdating method for PipeWire capturer (#38833)
* fix: use StartUpdating method for PipeWire capturer

Fixed a crash related to PipeWire capturer by adapting to Chromium's
interface changes. Chromium expects a call to
`NativeDesktopMediaList::StartUpdating` with an implementation of
`DesktopMediaListObserver` for delegated capturers like PipeWire. This
interface allows listening to user permission events and listing
sources only after the user has made a choice on the permission dialog.

The interface has been implemented by an inner class to allow listening
to screen and window capture permissions concurrently using two
instances of the class. A patch that was resetting the capturer on the
first refresh has been changed to exclude PipeWire. PipeWire capturer
object will follow the lifecycle of `NativeDesktopMediaList`, as is the
case in Chromium.

Fixes #37463

* fix: wait for thumbnails from PipeWire when necessary

The PipeWire stream starts after the dialog is dismissed. If the sources
are listed immediately afterwards, the thumbnail may not have been
generated by that time. Explicitly wait for both thumbnail generation
and a selection on the source dialog before listing sources.
2023-07-11 10:21:11 +02:00
..
views chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_app.cc refactor: use constexpr lookup tables in gin helper (#38818) 2023-06-19 10:33:09 +02:00
electron_api_app.h feat: add did-resign-active event on app (#37933) 2023-04-18 16:53:39 +02:00
electron_api_app_mac.mm chore: bump chromium to 110.0.5415.0 (main) (#36186) 2022-11-17 14:59:23 -05:00
electron_api_app_mas.mm chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_auto_updater.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_auto_updater.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_base_window.cc feat: add BrowserWindow.showAllTabs() for macOS (#38965) 2023-07-10 10:43:37 +02:00
electron_api_base_window.h feat: add BrowserWindow.showAllTabs() for macOS (#38965) 2023-07-10 10:43:37 +02:00
electron_api_browser_view.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_browser_view.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_browser_window.cc fix: handle closing webContents in BrowserViews (#37420) 2023-03-01 11:35:06 +01:00
electron_api_browser_window.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_content_tracing.cc chore: make contentTracing.stopRecording() failure clearer (#38488) 2023-05-31 09:54:41 -04:00
electron_api_cookies.cc perf: prefer base::StringPiece over std::string for build-time strings (#38717) 2023-06-12 09:55:22 +02:00
electron_api_cookies.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_crash_reporter.cc chore: bump chromium to 116.0.5829.0 (main) (#38726) 2023-06-13 14:45:48 -04:00
electron_api_crash_reporter.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_data_pipe_holder.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_data_pipe_holder.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_debugger.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_debugger.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_desktop_capturer.cc fix: use StartUpdating method for PipeWire capturer (#38833) 2023-07-11 10:21:11 +02:00
electron_api_desktop_capturer.h fix: use StartUpdating method for PipeWire capturer (#38833) 2023-07-11 10:21:11 +02:00
electron_api_dialog.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_download_item.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_api_download_item.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_event_emitter.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_event_emitter.h chore: add ELECTRON_ prefix to C++ include guards (#31925) 2021-11-22 16:34:31 +09:00
electron_api_global_shortcut.cc chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_api_global_shortcut.h chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_api_in_app_purchase.cc chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_api_in_app_purchase.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_menu.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_menu.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_menu_mac.h feat: add support for keyboard initialized menu popup (#38903) 2023-06-29 15:54:06 -07:00
electron_api_menu_mac.mm feat: add support for keyboard initialized menu popup (#38903) 2023-06-29 15:54:06 -07:00
electron_api_menu_views.cc feat: add support for keyboard initialized menu popup (#38903) 2023-06-29 15:54:06 -07:00
electron_api_menu_views.h feat: add support for keyboard initialized menu popup (#38903) 2023-06-29 15:54:06 -07:00
electron_api_native_theme.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_native_theme.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_native_theme_mac.mm chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_api_net.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_net_log.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
electron_api_net_log.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_notification.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_notification.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_power_monitor.cc feat: add thermal states to powerMonitor (#37935) 2023-04-19 11:46:55 +02:00
electron_api_power_monitor.h feat: add thermal states to powerMonitor (#37935) 2023-04-19 11:46:55 +02:00
electron_api_power_monitor_mac.mm chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_power_monitor_win.cc chore: drop support for Windows 7 / 8 / 8.1 (#36427) 2022-11-30 17:13:29 -08:00
electron_api_power_save_blocker.cc refactor: prefer base::Contains() over find() + end() (#38443) 2023-05-30 10:28:43 +02:00
electron_api_power_save_blocker.h refactor: prefer base::Contains() over find() + end() (#38443) 2023-05-30 10:28:43 +02:00
electron_api_printing.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
electron_api_protocol.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_protocol.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_push_notifications.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_push_notifications.h chore: use nested namespaces (#37855) 2023-04-11 15:30:25 +09:00
electron_api_push_notifications_mac.mm chore: use nested namespaces (#37855) 2023-04-11 15:30:25 +09:00
electron_api_safe_storage.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_safe_storage.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
electron_api_screen.cc fix: sync api::Screen wrapper method sigs to upstream (#38597) 2023-06-07 09:28:50 +02:00
electron_api_screen.h fix: sync api::Screen wrapper method sigs to upstream (#38597) 2023-06-07 09:28:50 +02:00
electron_api_service_worker_context.cc chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_service_worker_context.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_session.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_session.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_system_preferences.cc chore: fix clang-tidy warnings (#38079) 2023-04-26 10:09:54 -04:00
electron_api_system_preferences.h chore: modernize Value usage in converters (#34794) 2022-07-05 11:25:18 -04:00
electron_api_system_preferences_mac.mm chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_api_system_preferences_win.cc refactor: constexpr lookup tables (#38771) 2023-06-14 17:00:46 -04:00
electron_api_tray.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_tray.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_url_loader.cc refactor: use constexpr lookup tables in gin helper (#38818) 2023-06-19 10:33:09 +02:00
electron_api_url_loader.h chore: bump chromium to 117.0.5852.0 (main) (#38891) 2023-07-01 16:22:55 -04:00
electron_api_utility_process.cc chore: fix clang-tidy warnings (#38079) 2023-04-26 10:09:54 -04:00
electron_api_utility_process.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
electron_api_view.cc chore: remove unused electron::api::View code (#38561) 2023-06-03 10:40:44 -05:00
electron_api_view.h chore: remove unused electron::api::View code (#38561) 2023-06-03 10:40:44 -05:00
electron_api_web_contents.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_web_contents.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_web_contents_impl.cc build: remove enable_osr build flag (#38703) 2023-06-13 14:48:53 -04:00
electron_api_web_contents_mac.mm chore: bump chromium to 116.0.5817.0 (main) (#38465) 2023-06-09 16:08:36 -07:00
electron_api_web_contents_view.cc chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_web_contents_view.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_web_frame_main.cc fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_web_frame_main.h fix: set prototype names on gin::Constructible classes (#39006) 2023-07-10 11:49:20 +02:00
electron_api_web_request.cc refactor: use constexpr lookup tables in gin helper (#38818) 2023-06-19 10:33:09 +02:00
electron_api_web_request.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
electron_api_web_view_manager.cc chore: rename built-in modules to bindings to match naming update in node (#37182) 2023-02-09 10:31:38 +09:00
frame_subscriber.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
frame_subscriber.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
gpu_info_enumerator.cc chore: fix clang-tidy warnings (#38079) 2023-04-26 10:09:54 -04:00
gpu_info_enumerator.h chore: modernize ListValue usage in gpu info (#34663) 2022-06-28 09:52:59 -07:00
gpuinfo_manager.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
gpuinfo_manager.h chore: remove unused std includes (#38767) 2023-06-14 11:07:18 -07:00
message_port.cc refactor: prefer base::Contains() over find() + end() (#38443) 2023-05-30 10:28:43 +02:00
message_port.h chore: update links in comments (#37197) 2023-02-11 18:52:54 -08:00
process_metric.cc refactor: change defined(MAS_BUILD) to IS_MAS_BUILD() (#36332) 2022-11-14 12:46:52 -08:00
process_metric.h chore: bump chromium to 100.0.4857.0 (main) (#32419) 2022-02-09 18:58:52 -08:00
save_page_handler.cc chore: bump chromium to 111.0.5544.3 (main) (#36820) 2023-02-03 12:43:42 +01:00
save_page_handler.h chore: enable check raw ptr fields (#38167) 2023-05-11 16:07:39 -04:00
ui_event.cc chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00
ui_event.h chore: used nested namespaces (#34737) 2022-06-29 12:55:47 -07:00