electron/atom/browser/api
Samuel Attard 77a4946069
refactor: rewire the desktop capturer API to remove race conditions (#18029)
We now create a new instance of atom::api::DesktopCapturer for every
request instead of weirdly re-using the same instance and queuing
requests.  This means there is now a 1:1 relationship between request
and DesktopCapturer so there isn't a race condition between the observer
for one request calling back before the observer of another.  This is an
issue ever since the backing APIs moved to worker threads.

This also does a few things to ensure memory management
* Only ever listen to one event per-request, after that we wipe the emit
function to ignore all future events
* Ensures we clean up the window_capturer_, screen_capturer_ and
captured_sources_ in native land once the request is over.

This _in theory_ fixes a flake we've been seeing on CI where we try to
resolve the promise for a request that no longerr exists.
2019-04-29 13:21:28 -07:00
..
views chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_app.cc chore: update base::Bind in app module (#17925) 2019-04-26 21:42:56 -07:00
atom_api_app.h chore: update base::Bind in app module (#17925) 2019-04-26 21:42:56 -07:00
atom_api_app_mac.mm refactor: make app logs dir creation opt-in (#17841) 2019-04-18 22:04:58 -07:00
atom_api_app_mas.mm chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_auto_updater.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_auto_updater.h [chromium-style] override / virtual warnings 2018-04-19 11:12:10 -07:00
atom_api_browser_view.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_browser_view.h fix: destroy WebContents synchronously on shutdown (#15541) 2018-11-08 07:57:28 -08:00
atom_api_browser_window.cc chore: convert some more files from base::Bind (#17968) 2019-04-28 10:03:06 +09:00
atom_api_browser_window.h feat: add multi BrowserView support to BrowserWindow (#16148) 2018-12-22 10:49:26 +09:00
atom_api_browser_window_mac.mm Revert "feat: upgrade to Chromium 72.0.3626.52 (#16334)" 2019-01-22 12:01:04 -08:00
atom_api_browser_window_views.cc also format missing .cc files 2018-04-18 20:48:45 -04:00
atom_api_content_tracing.cc chore: convert some more files from base::Bind (#17968) 2019-04-28 10:03:06 +09:00
atom_api_cookies.cc chore: convert some more files from base::Bind (#17968) 2019-04-28 10:03:06 +09:00
atom_api_cookies.h feat: promisify cookies api (#16464) 2019-01-25 12:11:35 -06:00
atom_api_debugger.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_debugger.h chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
atom_api_desktop_capturer.cc refactor: rewire the desktop capturer API to remove race conditions (#18029) 2019-04-29 13:21:28 -07:00
atom_api_desktop_capturer.h security: allow to block desktopCapturer.getSources() calls (#15964) 2018-12-20 11:44:30 +09:00
atom_api_dialog.cc feat: promisify dialog.showMessageBox() (#17298) 2019-03-12 11:06:59 -07:00
atom_api_download_item.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_download_item.h feat: add methods to allow customization of save dialog during will-download event (#15497) 2018-11-08 10:51:06 -04:00
atom_api_event.cc refactor: use mojo for electron internal IPC (#17406) 2019-04-02 15:38:16 -07:00
atom_api_global_shortcut.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_global_shortcut.h feat: allow registering multiple shortcuts (#15542) 2018-11-07 09:40:38 -08:00
atom_api_in_app_purchase.cc feat: promisify In-App Purchase (#17355) 2019-03-13 13:56:01 -07:00
atom_api_in_app_purchase.h feat: promisify In-App Purchase (#17355) 2019-03-13 13:56:01 -07:00
atom_api_menu.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_menu.h feat: allow MenuItems to work optionally when hidden (#16853) 2019-02-28 17:00:54 +00:00
atom_api_menu_mac.h [chromium-style] out-of-line default constructors and destructors 2018-04-19 11:12:58 -07:00
atom_api_menu_mac.mm chore: convert some more files from base::Bind (#17968) 2019-04-28 10:03:06 +09:00
atom_api_menu_views.cc chore: convert some more files from base::Bind (#17968) 2019-04-28 10:03:06 +09:00
atom_api_menu_views.h fix: fix gn cpplint warnings (#14583) 2018-09-12 19:25:56 -05:00
atom_api_net.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_net.h Fixing code review issues. 2016-10-25 12:41:01 +02:00
atom_api_net_log.cc chore: clean up promise resoution with helpers (#17268) 2019-03-13 14:30:21 -07:00
atom_api_net_log.h chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
atom_api_notification.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_notification.h refactor: move notifications from brightray to atom (#15209) 2018-10-17 20:01:11 +02:00
atom_api_power_monitor.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_power_monitor.h feat: Add new powerMonitor synchronous API (#17144) 2019-02-27 15:54:01 -05:00
atom_api_power_monitor_mac.mm chore: run clang-format 2018-09-19 17:18:10 +02:00
atom_api_power_monitor_win.cc chore: run clang-format 2018-09-19 17:18:10 +02:00
atom_api_power_save_blocker.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_power_save_blocker.h refactor: use public WakeLock interface (#15351) 2018-10-23 22:12:58 -07:00
atom_api_protocol.cc chore: clean up promise resoution with helpers (#17268) 2019-03-13 14:30:21 -07:00
atom_api_protocol.h feat: move webFrame scheme privilege methods to main process (#16416) 2019-01-29 16:11:01 +09:00
atom_api_protocol_ns.cc feat: migrate protocol module to NetworkService (Part 2) (#17965) 2019-04-29 11:37:45 +09:00
atom_api_protocol_ns.h feat: migrate protocol module to NetworkService (Part 2) (#17965) 2019-04-29 11:37:45 +09:00
atom_api_render_process_preferences.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_render_process_preferences.h clang-format atom files 2018-04-18 20:48:45 -04:00
atom_api_screen.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_screen.h remove screen.getMenuBarHeight() deprecation 2018-05-23 09:11:48 -07:00
atom_api_session.cc refactor: session.clearHostResolverCache with network service (#17935) 2019-04-25 10:51:48 -07:00
atom_api_session.h chore: bump chromium to 1e9f9a24aa12 (master) (#17880) 2019-04-20 10:20:37 -07:00
atom_api_system_preferences.cc feat: add systemPreferences.getAnimationSettings() (#17382) 2019-03-19 12:15:40 -07:00
atom_api_system_preferences.h feat: add systemPreferences.getAnimationSettings() (#17382) 2019-03-19 12:15:40 -07:00
atom_api_system_preferences_mac.mm chore: clean up promise resoution with helpers (#17268) 2019-03-13 14:30:21 -07:00
atom_api_system_preferences_win.cc feat: detect high contrast color mode (#15493) 2018-10-31 10:22:18 -04:00
atom_api_top_level_window.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_top_level_window.h feat: allow windows to be excluded from the windows menu (#17404) 2019-03-27 08:10:23 -04:00
atom_api_tray.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_tray.h feat: add tray.getTitle() (#17385) 2019-03-18 12:40:34 -07:00
atom_api_url_request.cc chore: bump chromium to 1e9f9a24aa12 (master) (#17880) 2019-04-20 10:20:37 -07:00
atom_api_url_request.h chore: bump chromium to 1e9f9a24aa12 (master) (#17880) 2019-04-20 10:20:37 -07:00
atom_api_view.cc chore: Bind=>BindRepeating for constructors (#17924) 2019-04-24 11:29:59 -07:00
atom_api_view.h build: define compile time features with buildflag header (#14840) 2018-10-01 16:00:53 -04:00
atom_api_web_contents.cc refactor: natively promisify WebContents.prototype.takeHeapSnapshot (#18000) 2019-04-29 10:11:11 -07:00
atom_api_web_contents.h refactor: natively promisify WebContents.prototype.takeHeapSnapshot (#18000) 2019-04-29 10:11:11 -07:00
atom_api_web_contents_impl.cc build: enable gn check for //electron:electron_lib (#17100) 2019-03-05 10:38:55 +05:30
atom_api_web_contents_mac.mm gfx::NativeView is no longer NSView on mac 2019-01-22 10:32:04 -08:00
atom_api_web_contents_view.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
atom_api_web_contents_view.h refactor: move devtools from brightray to atom (#15234) 2018-10-19 15:50:30 +02:00
atom_api_web_request.cc feat: Upgrade to Chromium 71.0.3578.98 (#15966) 2019-01-11 17:00:43 -08:00
atom_api_web_request.h clang-format atom files 2018-04-18 20:48:45 -04:00
atom_api_web_view_manager.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
event.cc refactor: use mojo for electron internal IPC (#17406) 2019-04-02 15:38:16 -07:00
event.h refactor: use mojo for electron internal IPC (#17406) 2019-04-02 15:38:16 -07:00
event_emitter.cc refactor: use mojo for electron internal IPC (#17406) 2019-04-02 15:38:16 -07:00
event_emitter.h chore: update base::Bind in app module (#17925) 2019-04-26 21:42:56 -07:00
frame_subscriber.cc fix: FrameSubscriber should not scale frame down (#17444) 2019-04-08 11:35:33 +09:00
frame_subscriber.h fix: FrameSubscriber should not scale frame down (#17444) 2019-04-08 11:35:33 +09:00
gpu_info_enumerator.cc Expand GpuInfo to include image decode acceleration support. 2019-03-08 15:04:32 -08:00
gpu_info_enumerator.h Expand GpuInfo to include image decode acceleration support. 2019-03-08 15:04:32 -08:00
gpuinfo_manager.cc chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
gpuinfo_manager.h build: enable gn check for //electron:electron_lib (#17100) 2019-03-05 10:38:55 +05:30
save_page_handler.cc chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
save_page_handler.h chore: make util::Promise a move-only type (#17071) 2019-02-21 12:32:44 +00:00
stream_subscriber.cc chore: node_includes header no longer needs to be at the end of the list (#17090) 2019-03-11 17:13:43 -07:00
stream_subscriber.h fix: make StreamSubscriber ref counted (#17221) 2019-03-07 20:50:03 +05:30
trackable_object.cc fix: fix gn cpplint warnings (#14583) 2018-09-12 19:25:56 -05:00
trackable_object.h Refactoring: use C++11 class member variable initialization 2018-05-22 00:18:38 +02:00