aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/Makefile1
-rw-r--r--devel/electron7/Makefile321
-rw-r--r--devel/electron7/Makefile.version4
-rw-r--r--devel/electron7/distinfo17
-rw-r--r--devel/electron7/files/apply-electron-patches.sh20
-rw-r--r--devel/electron7/files/package.json129
-rw-r--r--devel/electron7/files/patch-BUILD.gn95
-rw-r--r--devel/electron7/files/patch-apps_ui_views_app__window__frame__view.cc11
-rw-r--r--devel/electron7/files/patch-ash_display_mirror__window__controller.cc14
-rw-r--r--devel/electron7/files/patch-base_BUILD.gn67
-rw-r--r--devel/electron7/files/patch-base_allocator_allocator__shim.cc11
-rw-r--r--devel/electron7/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc76
-rw-r--r--devel/electron7/files/patch-base_allocator_allocator__shim__override__libc__symbols.h11
-rw-r--r--devel/electron7/files/patch-base_allocator_allocator__shim__unittest.cc36
-rw-r--r--devel/electron7/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h11
-rw-r--r--devel/electron7/files/patch-base_base__switches.cc20
-rw-r--r--devel/electron7/files/patch-base_base__switches.h20
-rw-r--r--devel/electron7/files/patch-base_cpu.cc38
-rw-r--r--devel/electron7/files/patch-base_debug_debugger__posix.cc56
-rw-r--r--devel/electron7/files/patch-base_debug_elf__reader.cc18
-rw-r--r--devel/electron7/files/patch-base_debug_proc__maps__linux.cc11
-rw-r--r--devel/electron7/files/patch-base_debug_stack__trace.cc11
-rw-r--r--devel/electron7/files/patch-base_debug_stack__trace.h10
-rw-r--r--devel/electron7/files/patch-base_debug_stack__trace__posix.cc31
-rw-r--r--devel/electron7/files/patch-base_files_file__path__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_files_file__path__watcher.cc11
-rw-r--r--devel/electron7/files/patch-base_files_file__path__watcher__kqueue.h13
-rw-r--r--devel/electron7/files/patch-base_files_file__path__watcher__stub.cc51
-rw-r--r--devel/electron7/files/patch-base_files_file__path__watcher__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_files_file__util.h11
-rw-r--r--devel/electron7/files/patch-base_files_file__util__posix.cc11
-rw-r--r--devel/electron7/files/patch-base_files_scoped__file.cc11
-rw-r--r--devel/electron7/files/patch-base_i18n_icu__util.cc20
-rw-r--r--devel/electron7/files/patch-base_linux__util.cc18
-rw-r--r--devel/electron7/files/patch-base_logging__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_memory_platform__shared__memory__region.h29
-rw-r--r--devel/electron7/files/patch-base_memory_platform__shared__memory__region__posix.cc38
-rw-r--r--devel/electron7/files/patch-base_memory_protected__memory__posix.cc31
-rw-r--r--devel/electron7/files/patch-base_native__library__posix.cc11
-rw-r--r--devel/electron7/files/patch-base_native__library__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_numerics_safe__math__shared__impl.h12
-rw-r--r--devel/electron7/files/patch-base_posix_can__lower__nice__to.cc20
-rw-r--r--devel/electron7/files/patch-base_posix_unix__domain__socket.cc49
-rw-r--r--devel/electron7/files/patch-base_posix_unix__domain__socket__unittest.cc12
-rw-r--r--devel/electron7/files/patch-base_process_internal__linux.cc16
-rw-r--r--devel/electron7/files/patch-base_process_internal__linux.h11
-rw-r--r--devel/electron7/files/patch-base_process_kill.h16
-rw-r--r--devel/electron7/files/patch-base_process_kill__posix.cc20
-rw-r--r--devel/electron7/files/patch-base_process_launch.cc11
-rw-r--r--devel/electron7/files/patch-base_process_launch.h20
-rw-r--r--devel/electron7/files/patch-base_process_launch__posix.cc10
-rw-r--r--devel/electron7/files/patch-base_process_memory.cc20
-rw-r--r--devel/electron7/files/patch-base_process_memory.h11
-rw-r--r--devel/electron7/files/patch-base_process_memory__unittest.cc18
-rw-r--r--devel/electron7/files/patch-base_process_process__handle.cc11
-rw-r--r--devel/electron7/files/patch-base_process_process__handle.h11
-rw-r--r--devel/electron7/files/patch-base_process_process__handle__freebsd.cc17
-rw-r--r--devel/electron7/files/patch-base_process_process__iterator__freebsd.cc44
-rw-r--r--devel/electron7/files/patch-base_process_process__linux.cc18
-rw-r--r--devel/electron7/files/patch-base_process_process__metrics.cc38
-rw-r--r--devel/electron7/files/patch-base_process_process__metrics.h131
-rw-r--r--devel/electron7/files/patch-base_process_process__metrics__freebsd.cc259
-rw-r--r--devel/electron7/files/patch-base_process_process__metrics__posix.cc20
-rw-r--r--devel/electron7/files/patch-base_process_process__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_profiler_stack__sampling__profiler__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_sampling__heap__profiler_sampling__heap__profiler.cc24
-rw-r--r--devel/electron7/files/patch-base_security__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_strings_safe__sprintf__unittest.cc18
-rw-r--r--devel/electron7/files/patch-base_syslog__logging.cc20
-rw-r--r--devel/electron7/files/patch-base_system_sys__info.h11
-rw-r--r--devel/electron7/files/patch-base_system_sys__info__freebsd.cc59
-rw-r--r--devel/electron7/files/patch-base_system_sys__info__posix.cc11
-rw-r--r--devel/electron7/files/patch-base_task_thread__pool_environment__config__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_test_fontconfig__util__linux.cc408
-rw-r--r--devel/electron7/files/patch-base_test_generate__fontconfig__caches.cc25
-rw-r--r--devel/electron7/files/patch-base_test_launcher_test__launcher.cc10
-rw-r--r--devel/electron7/files/patch-base_test_test__file__util__linux.cc13
-rw-r--r--devel/electron7/files/patch-base_test_test__file__util__posix.cc11
-rw-r--r--devel/electron7/files/patch-base_third__party_libevent_BUILD.gn24
-rw-r--r--devel/electron7/files/patch-base_threading_platform__thread.h11
-rw-r--r--devel/electron7/files/patch-base_threading_platform__thread__linux.cc30
-rw-r--r--devel/electron7/files/patch-base_threading_platform__thread__posix.cc11
-rw-r--r--devel/electron7/files/patch-base_threading_thread__local__storage__unittest.cc11
-rw-r--r--devel/electron7/files/patch-base_threading_thread__task__runner__handle.cc26
-rw-r--r--devel/electron7/files/patch-base_trace__event_malloc__dump__provider.cc21
-rw-r--r--devel/electron7/files/patch-base_trace__event_process__memory__dump.cc11
-rw-r--r--devel/electron7/files/patch-base_trace__event_process__memory__dump.h11
-rw-r--r--devel/electron7/files/patch-build_config_BUILD.gn30
-rw-r--r--devel/electron7/files/patch-build_config_BUILDCONFIG.gn48
-rw-r--r--devel/electron7/files/patch-build_config_compiler_BUILD.gn92
-rw-r--r--devel/electron7/files/patch-build_config_compiler_compiler.gni11
-rw-r--r--devel/electron7/files/patch-build_config_features.gni11
-rw-r--r--devel/electron7/files/patch-build_config_freetype_freetype.gni9
-rw-r--r--devel/electron7/files/patch-build_config_linux_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-build_config_linux_pkg-config.py26
-rw-r--r--devel/electron7/files/patch-build_config_sysroot.gni15
-rw-r--r--devel/electron7/files/patch-build_detect__host__arch.py11
-rw-r--r--devel/electron7/files/patch-build_gn__run__binary.py11
-rw-r--r--devel/electron7/files/patch-build_linux_chrome.map29
-rw-r--r--devel/electron7/files/patch-build_linux_libpci_BUILD.gn53
-rw-r--r--devel/electron7/files/patch-build_linux_unbundle_libusb.gn27
-rw-r--r--devel/electron7/files/patch-build_linux_unbundle_replace__gn__files.py10
-rw-r--r--devel/electron7/files/patch-build_toolchain_gcc__toolchain.gni45
-rw-r--r--devel/electron7/files/patch-build_toolchain_get__concurrent__links.py17
-rw-r--r--devel/electron7/files/patch-build_toolchain_linux_BUILD.gn10
-rw-r--r--devel/electron7/files/patch-cc_BUILD.gn21
-rw-r--r--devel/electron7/files/patch-cc_layers_scrollbar__layer__impl__base.cc13
-rw-r--r--devel/electron7/files/patch-cc_trees_property__tree.cc20
-rw-r--r--devel/electron7/files/patch-chrome_app_chrome__command__ids.h11
-rw-r--r--devel/electron7/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc20
-rw-r--r--devel/electron7/files/patch-chrome_app_chrome__main.cc16
-rw-r--r--devel/electron7/files/patch-chrome_app_chrome__main__delegate.cc144
-rw-r--r--devel/electron7/files/patch-chrome_app_chromium__strings.grd29
-rw-r--r--devel/electron7/files/patch-chrome_app_generated__resources.grd29
-rw-r--r--devel/electron7/files/patch-chrome_app_google__chrome__strings.grd29
-rw-r--r--devel/electron7/files/patch-chrome_app_settings__strings.grdp20
-rw-r--r--devel/electron7/files/patch-chrome_app_shutdown__signal__handlers__posix.cc21
-rw-r--r--devel/electron7/files/patch-chrome_app_theme_chrome__unscaled__resources.grd20
-rw-r--r--devel/electron7/files/patch-chrome_app_theme_theme__resources.grd11
-rw-r--r--devel/electron7/files/patch-chrome_browser_about__flags.cc285
-rw-r--r--devel/electron7/files/patch-chrome_browser_after__startup__task__utils.cc38
-rw-r--r--devel/electron7/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc70
-rw-r--r--devel/electron7/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc17
-rw-r--r--devel/electron7/files/patch-chrome_browser_background_background__mode__manager.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_background_background__mode__optimizer.cc15
-rw-r--r--devel/electron7/files/patch-chrome_browser_browser__features.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_browser__features.h14
-rw-r--r--devel/electron7/files/patch-chrome_browser_browser__resources.grd20
-rw-r--r--devel/electron7/files/patch-chrome_browser_chrome__browser__main.cc75
-rw-r--r--devel/electron7/files/patch-chrome_browser_chrome__browser__main__linux.cc27
-rw-r--r--devel/electron7/files/patch-chrome_browser_chrome__browser__main__posix.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.cc83
-rw-r--r--devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.h17
-rw-r--r--devel/electron7/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_defaults.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_diagnostics_diagnostics__writer.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__commands.cc35
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__commands.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__item__model.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__prefs.cc65
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__prefs.h20
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__query.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__shelf__context__menu.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_download_download__status__updater.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_BUILD.gn15
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_activity__log_activity__log.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc43
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_external__provider__impl.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_extensions_install__signer.cc18
-rw-r--r--devel/electron7/files/patch-chrome_browser_first__run_first__run__dialog.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_first__run_first__run__internal.h18
-rw-r--r--devel/electron7/files/patch-chrome_browser_first__run_first__run__internal__posix.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_flag__descriptions.cc79
-rw-r--r--devel/electron7/files/patch-chrome_browser_flag__descriptions.h87
-rw-r--r--devel/electron7/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc15
-rw-r--r--devel/electron7/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc28
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc27
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc23
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc33
-rw-r--r--devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h36
-rw-r--r--devel/electron7/files/patch-chrome_browser_memory__details.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_memory__details__linux.cc13
-rw-r--r--devel/electron7/files/patch-chrome_browser_metrics_bluetooth__available__utility.cc13
-rw-r--r--devel/electron7/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc21
-rw-r--r--devel/electron7/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc25
-rw-r--r--devel/electron7/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_native__file__system_chrome__native__file__system__permission__context.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_net_system__network__context__manager.cc64
-rw-r--r--devel/electron7/files/patch-chrome_browser_notifications_notification__display__service__impl.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_password__manager_password__store__factory.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc38
-rw-r--r--devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_platform__util.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_plugins_plugins__resource__service.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc43
-rw-r--r--devel/electron7/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_prefs_browser__prefs.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_prefs_pref__service__incognito__whitelist.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_process__singleton__posix.cc34
-rw-r--r--devel/electron7/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_profiles_profile__attributes__entry.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_renderer__preferences__util.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py19
-rw-r--r--devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js20
-rw-r--r--devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html29
-rw-r--r--devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.js33
-rw-r--r--devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc15
-rw-r--r--devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_search_search__suggest_search__suggest__service.cc14
-rw-r--r--devel/electron7/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.cc17
-rw-r--r--devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.h20
-rw-r--r--devel/electron7/files/patch-chrome_browser_signin_signin__util.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ssl_captive__portal__blocking__page.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ssl_ssl__error__controller__client.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_sync_chrome__sync__client.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.cc56
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.h48
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc72
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h50
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc16
-rw-r--r--devel/electron7/files/patch-chrome_browser_task__manager_task__manager__observer.h16
-rw-r--r--devel/electron7/files/patch-chrome_browser_themes_theme__service__factory.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_tracing_crash__service__uploader.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_browser__command__controller.cc38
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_browser__view__prefs.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_input__method_input__method__engine__base.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc10
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_sad__tab.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc31
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_tab__helpers.cc25
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__columns.cc15
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc50
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_toolbar_app__menu__model.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_ui__features.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_ui__features.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_accelerator__table.cc46
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc38
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_chrome__views__delegate.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_first__run__dialog.cc24
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__frame.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__view.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_hung__renderer__view.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_tabs_new__tab__button.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc29
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_webui_about__ui.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc55
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h11
-rw-r--r--devel/electron7/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc20
-rw-r--r--devel/electron7/files/patch-chrome_browser_web__applications_extensions_bookmark__app__finalizer__utils.cc11
-rw-r--r--devel/electron7/files/patch-chrome_browser_web__applications_extensions_web__app__extension__shortcut.cc11
-rw-r--r--devel/electron7/files/patch-chrome_common_BUILD.gn13
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__features.cc27
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__features.h24
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__paths.cc101
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__paths.h42
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__paths__internal.h11
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__switches.cc11
-rw-r--r--devel/electron7/files/patch-chrome_common_chrome__switches.h11
-rw-r--r--devel/electron7/files/patch-chrome_common_extensions_api_api__sources.gni11
-rw-r--r--devel/electron7/files/patch-chrome_common_extensions_command.cc11
-rw-r--r--devel/electron7/files/patch-chrome_common_features.gni14
-rw-r--r--devel/electron7/files/patch-chrome_common_pref__names.cc44
-rw-r--r--devel/electron7/files/patch-chrome_common_pref__names.h41
-rw-r--r--devel/electron7/files/patch-chrome_common_webui__url__constants.cc48
-rw-r--r--devel/electron7/files/patch-chrome_common_webui__url__constants.h32
-rw-r--r--devel/electron7/files/patch-chrome_renderer_chrome__content__renderer__client.cc45
-rw-r--r--devel/electron7/files/patch-chrome_renderer_pepper_pepper__flash__font__file__host.cc29
-rw-r--r--devel/electron7/files/patch-chrome_renderer_pepper_pepper__flash__font__file__host.h20
-rw-r--r--devel/electron7/files/patch-chrome_service_cloud__print_print__system.cc11
-rw-r--r--devel/electron7/files/patch-chrome_test_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-chrome_test_base_in__process__browser__test.cc22
-rw-r--r--devel/electron7/files/patch-chrome_test_base_testing__browser__process.h13
-rw-r--r--devel/electron7/files/patch-chrome_test_chromedriver_chrome__launcher.cc13
-rw-r--r--devel/electron7/files/patch-chrome_test_chromedriver_chrome_chrome__finder.cc20
-rw-r--r--devel/electron7/files/patch-chromecast_browser_cast__browser__main__parts.cc38
-rw-r--r--devel/electron7/files/patch-chromecast_browser_cast__content__browser__client.cc11
-rw-r--r--devel/electron7/files/patch-chromecast_browser_metrics_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-chromecast_browser_tts_tts__controller__impl.cc14
-rw-r--r--devel/electron7/files/patch-chromecast_media_base_monotonic__clock.cc23
-rw-r--r--devel/electron7/files/patch-components_autofill_content_renderer_password__form__conversion__utils.cc14
-rw-r--r--devel/electron7/files/patch-components_autofill_core_browser_autofill__experiments.cc11
-rw-r--r--devel/electron7/files/patch-components_autofill_core_browser_personal__data__manager.cc15
-rw-r--r--devel/electron7/files/patch-components_autofill_core_common_autofill__payments__features.cc11
-rw-r--r--devel/electron7/files/patch-components_autofill_core_common_autofill__util.cc11
-rw-r--r--devel/electron7/files/patch-components_content__settings_core_browser_website__settings__registry.cc11
-rw-r--r--devel/electron7/files/patch-components_cookie__config_cookie__store__util.cc24
-rw-r--r--devel/electron7/files/patch-components_crash_content_app_BUILD.gn20
-rw-r--r--devel/electron7/files/patch-components_crash_content_app_crashpad.cc43
-rw-r--r--devel/electron7/files/patch-components_crash_content_browser_BUILD.gn27
-rw-r--r--devel/electron7/files/patch-components_crash_core_common_BUILD.gn28
-rw-r--r--devel/electron7/files/patch-components_discardable__memory_service_discardable__shared__memory__manager.cc20
-rw-r--r--devel/electron7/files/patch-components_download_internal_common_base__file.cc20
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_event__constants.cc27
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_event__constants.h30
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_feature__constants.cc20
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_feature__constants.h20
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_feature__list.cc20
-rw-r--r--devel/electron7/files/patch-components_feature__engagement_public_feature__list.h38
-rw-r--r--devel/electron7/files/patch-components_feedback_anonymizer__tool.cc14
-rw-r--r--devel/electron7/files/patch-components_flags__ui_flags__state.cc11
-rw-r--r--devel/electron7/files/patch-components_gcm__driver_gcm__client.h10
-rw-r--r--devel/electron7/files/patch-components_gcm__driver_gcm__client__impl.cc12
-rw-r--r--devel/electron7/files/patch-components_keyed__service_core_dependency__graph__unittest.cc14
-rw-r--r--devel/electron7/files/patch-components_metrics_BUILD.gn14
-rw-r--r--devel/electron7/files/patch-components_metrics_drive__metrics__provider__linux.cc16
-rw-r--r--devel/electron7/files/patch-components_metrics_metrics__log.cc11
-rw-r--r--devel/electron7/files/patch-components_metrics_system__memory__stats__recorder__linux.cc18
-rw-r--r--devel/electron7/files/patch-components_neterror_resources_neterror.js11
-rw-r--r--devel/electron7/files/patch-components_network__session__configurator_browser_network__session__configurator.cc11
-rw-r--r--devel/electron7/files/patch-components_new__or__sad__tab__strings.grdp38
-rw-r--r--devel/electron7/files/patch-components_os__crypt_os__crypt.h48
-rw-r--r--devel/electron7/files/patch-components_os__crypt_os__crypt__unittest.cc11
-rw-r--r--devel/electron7/files/patch-components_plugins_renderer_plugin__placeholder.cc14
-rw-r--r--devel/electron7/files/patch-components_policy_core_common_cloud_cloud__policy__util.cc73
-rw-r--r--devel/electron7/files/patch-components_policy_core_common_schema.cc14
-rw-r--r--devel/electron7/files/patch-components_policy_resources_policy__templates.json83
-rw-r--r--devel/electron7/files/patch-components_policy_tools_generate__policy__source.py19
-rw-r--r--devel/electron7/files/patch-components_previews_core_previews__features.cc18
-rw-r--r--devel/electron7/files/patch-components_storage__monitor_BUILD.gn16
-rw-r--r--devel/electron7/files/patch-components_storage__monitor_removable__device__constants.cc11
-rw-r--r--devel/electron7/files/patch-components_storage__monitor_removable__device__constants.h11
-rw-r--r--devel/electron7/files/patch-components_storage__monitor_storage__monitor__freebsd.cc57
-rw-r--r--devel/electron7/files/patch-components_storage__monitor_storage__monitor__freebsd.h48
-rw-r--r--devel/electron7/files/patch-components_sync__device__info_local__device__info__util__linux.cc26
-rw-r--r--devel/electron7/files/patch-components_update__client_update__query__params.cc11
-rw-r--r--devel/electron7/files/patch-components_url__matcher_regex__set__matcher.cc16
-rw-r--r--devel/electron7/files/patch-components_url__matcher_url__matcher__factory.cc14
-rw-r--r--devel/electron7/files/patch-components_webcrypto_algorithms_test__helpers.cc14
-rw-r--r--devel/electron7/files/patch-content_app_content__main__runner__impl.cc73
-rw-r--r--devel/electron7/files/patch-content_browser_browser__main__loop.cc46
-rw-r--r--devel/electron7/files/patch-content_browser_child__process__launcher__helper__linux.cc92
-rw-r--r--devel/electron7/files/patch-content_browser_devtools_protocol_system__info__handler.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_gpu_gpu__process__host.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_media_media__internals.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_memory_swap__metrics__driver__impl__linux.cc27
-rw-r--r--devel/electron7/files/patch-content_browser_ppapi__plugin__process__host.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_input_input__device__change__observer.cc29
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_pepper_pepper__file__io__host.cc20
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__message__filter.cc29
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__message__filter.h19
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__process__host__impl.cc47
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__process__host__impl.h15
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__view__host__impl.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__widget__host__view__aura.cc29
-rw-r--r--devel/electron7/files/patch-content_browser_renderer__host_render__widget__host__view__event__handler.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_scheduler_responsiveness_jank__monitor.cc11
-rw-r--r--devel/electron7/files/patch-content_browser_scheduler_responsiveness_native__event__observer.cc29
-rw-r--r--devel/electron7/files/patch-content_browser_scheduler_responsiveness_native__event__observer.h47
-rw-r--r--devel/electron7/files/patch-content_browser_scheduler_responsiveness_watcher.cc20
-rw-r--r--devel/electron7/files/patch-content_browser_utility__process__host.cc29
-rw-r--r--devel/electron7/files/patch-content_browser_webui_shared__resources__data__source.cc17
-rw-r--r--devel/electron7/files/patch-content_common_BUILD.gn15
-rw-r--r--devel/electron7/files/patch-content_common_common__sandbox__support__linux.cc10
-rw-r--r--devel/electron7/files/patch-content_common_user__agent.cc17
-rw-r--r--devel/electron7/files/patch-content_gpu_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-content_gpu_gpu__main.cc56
-rw-r--r--devel/electron7/files/patch-content_gpu_gpu__sandbox__hook__linux.cc58
-rw-r--r--devel/electron7/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.cc38
-rw-r--r--devel/electron7/files/patch-content_ppapi__plugin_ppapi__blink__platform__impl.h25
-rw-r--r--devel/electron7/files/patch-content_public_app_content__main__delegate.cc18
-rw-r--r--devel/electron7/files/patch-content_public_app_content__main__delegate.h20
-rw-r--r--devel/electron7/files/patch-content_public_app_v8__snapshot__overlay__manifest.cc11
-rw-r--r--devel/electron7/files/patch-content_public_common_child__process__host.h11
-rw-r--r--devel/electron7/files/patch-content_public_common_common__param__traits__macros.h11
-rw-r--r--devel/electron7/files/patch-content_public_common_content__features.cc29
-rw-r--r--devel/electron7/files/patch-content_public_common_content__switches.cc11
-rw-r--r--devel/electron7/files/patch-content_public_common_content__switches.h11
-rw-r--r--devel/electron7/files/patch-content_public_common_use__zoom__for__dsf__policy.cc11
-rw-r--r--devel/electron7/files/patch-content_public_test_browser__test__base.cc13
-rw-r--r--devel/electron7/files/patch-content_public_test_mock__render__thread.cc11
-rw-r--r--devel/electron7/files/patch-content_renderer_media_audio_audio__device__factory.cc11
-rw-r--r--devel/electron7/files/patch-content_renderer_media_webrtc_webrtc__audio__renderer__unittest.cc11
-rw-r--r--devel/electron7/files/patch-content_renderer_render__process__impl.cc20
-rw-r--r--devel/electron7/files/patch-content_renderer_render__thread__impl.cc51
-rw-r--r--devel/electron7/files/patch-content_renderer_renderer__blink__platform__impl.cc56
-rw-r--r--devel/electron7/files/patch-content_renderer_renderer__blink__platform__impl.h29
-rw-r--r--devel/electron7/files/patch-content_renderer_renderer__main__platform__delegate__linux.cc19
-rw-r--r--devel/electron7/files/patch-content_shell_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-content_shell_app_shell__main__delegate.cc20
-rw-r--r--devel/electron7/files/patch-content_shell_browser_shell__browser__context.cc20
-rw-r--r--devel/electron7/files/patch-content_shell_browser_shell__browser__main__parts.cc20
-rw-r--r--devel/electron7/files/patch-content_shell_browser_web__test_web__test__browser__context.cc11
-rw-r--r--devel/electron7/files/patch-content_shell_browser_web__test_web__test__browser__main__parts.cc11
-rw-r--r--devel/electron7/files/patch-content_shell_test__runner_test__runner.cc29
-rw-r--r--devel/electron7/files/patch-content_test_content__test__suite.cc18
-rw-r--r--devel/electron7/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.cc29
-rw-r--r--devel/electron7/files/patch-content_utility_utility__blink__platform__with__sandbox__support__impl.h24
-rw-r--r--devel/electron7/files/patch-device_bluetooth_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-device_gamepad_gamepad__provider.cc11
-rw-r--r--devel/electron7/files/patch-device_gamepad_hid__writer__linux.cc11
-rw-r--r--devel/electron7/files/patch-electron_BUILD.gn40
-rw-r--r--devel/electron7/files/patch-electron_chromium__src_chrome_browser_process__singleton__posix.cc20
-rw-r--r--devel/electron7/files/patch-electron_default__app_default__app.ts11
-rw-r--r--devel/electron7/files/patch-electron_lib_browser_api_app.ts11
-rw-r--r--devel/electron7/files/patch-electron_lib_browser_api_dialog.js11
-rw-r--r--devel/electron7/files/patch-electron_lib_browser_api_menu-item-roles.js11
-rw-r--r--devel/electron7/files/patch-electron_lib_browser_init.ts11
-rw-r--r--devel/electron7/files/patch-electron_lib_browser_rpc-server.js11
-rw-r--r--devel/electron7/files/patch-electron_lib_common_api_clipboard.js11
-rw-r--r--devel/electron7/files/patch-electron_script_lib_config.py12
-rw-r--r--devel/electron7/files/patch-electron_script_lib_utils.js11
-rw-r--r--devel/electron7/files/patch-electron_script_spec-runner.js11
-rw-r--r--devel/electron7/files/patch-electron_shell_app_atom__main.cc35
-rw-r--r--devel/electron7/files/patch-electron_shell_app_atom__main__delegate.cc29
-rw-r--r--devel/electron7/files/patch-electron_shell_app_node__main.cc20
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_api_atom__api__app.cc47
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_api_atom__api__web__contents.cc34
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_api_process__metric.h20
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_atom__browser__main__parts.cc11
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_atom__browser__main__parts__posix.cc20
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_atom__paths.h18
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_browser.h33
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_native__window__views.cc47
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_native__window__views.h11
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_relauncher__linux.cc32
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_ui_views_atom__views__delegate.cc38
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_ui_views_atom__views__delegate.h11
-rw-r--r--devel/electron7/files/patch-electron_shell_browser_ui_views_submenu__button.cc11
-rw-r--r--devel/electron7/files/patch-electron_shell_common_api_atom__api__crash__reporter.cc18
-rw-r--r--devel/electron7/files/patch-electron_shell_common_api_electron__bindings.cc11
-rw-r--r--devel/electron7/files/patch-electron_shell_common_atom__command__line.cc11
-rw-r--r--devel/electron7/files/patch-electron_shell_common_atom__command__line.h11
-rw-r--r--devel/electron7/files/patch-electron_shell_common_crash__reporter_crash__reporter.cc14
-rw-r--r--devel/electron7/files/patch-electron_shell_common_node__bindings.cc11
-rw-r--r--devel/electron7/files/patch-electron_shell_common_node__bindings__linux.cc69
-rw-r--r--devel/electron7/files/patch-electron_shell_common_platform__util.h11
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-app-spec.ts100
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-browser-window-spec.ts74
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-content-tracing-spec.ts11
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-net-log-spec.js29
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-screen-spec.ts38
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-tray-spec.ts11
-rw-r--r--devel/electron7/files/patch-electron_spec-main_api-web-contents-spec.ts11
-rw-r--r--devel/electron7/files/patch-electron_spec-main_version-bump-spec.ts18
-rw-r--r--devel/electron7/files/patch-electron_spec-main_visibility-state-spec.ts11
-rw-r--r--devel/electron7/files/patch-electron_spec_api-clipboard-spec.js38
-rw-r--r--devel/electron7/files/patch-electron_spec_api-crash-reporter-spec.js101
-rw-r--r--devel/electron7/files/patch-electron_spec_api-notification-dbus-spec.js10
-rw-r--r--devel/electron7/files/patch-electron_spec_api-power-monitor-spec.js11
-rw-r--r--devel/electron7/files/patch-electron_spec_api-process-spec.js11
-rw-r--r--devel/electron7/files/patch-electron_spec_api-shell-spec.js23
-rw-r--r--devel/electron7/files/patch-electron_spec_api-subframe-spec.js11
-rw-r--r--devel/electron7/files/patch-electron_spec_chromium-spec.js27
-rw-r--r--devel/electron7/files/patch-electron_spec_fixtures_api_crash-restart.html11
-rw-r--r--devel/electron7/files/patch-electron_spec_fixtures_module_crash.js11
-rw-r--r--devel/electron7/files/patch-electron_spec_node-spec.js11
-rw-r--r--devel/electron7/files/patch-extensions_browser_api_declarative__webrequest_webrequest__action.cc14
-rw-r--r--devel/electron7/files/patch-extensions_browser_api_messaging_message__service.cc34
-rw-r--r--devel/electron7/files/patch-extensions_browser_api_networking__private_networking__private__delegate__factory.cc20
-rw-r--r--devel/electron7/files/patch-extensions_browser_api_web__request_form__data__parser.cc14
-rw-r--r--devel/electron7/files/patch-extensions_browser_browser__context__keyed__service__factories.cc11
-rw-r--r--devel/electron7/files/patch-extensions_common_api___permission__features.json29
-rw-r--r--devel/electron7/files/patch-extensions_common_api_runtime.json11
-rw-r--r--devel/electron7/files/patch-extensions_common_feature__switch.cc16
-rw-r--r--devel/electron7/files/patch-extensions_common_features_feature.cc11
-rw-r--r--devel/electron7/files/patch-extensions_common_image__util.cc14
-rw-r--r--devel/electron7/files/patch-extensions_common_stack__frame.cc14
-rw-r--r--devel/electron7/files/patch-extensions_renderer_bindings_api__binding__util.cc11
-rw-r--r--devel/electron7/files/patch-extensions_shell_app_shell__main__delegate.cc20
-rw-r--r--devel/electron7/files/patch-extensions_shell_browser_api_runtime_shell__runtime__api__delegate.cc11
-rw-r--r--devel/electron7/files/patch-extensions_shell_browser_shell__extensions__api__client.cc20
-rw-r--r--devel/electron7/files/patch-extensions_shell_browser_shell__extensions__api__client.h19
-rw-r--r--devel/electron7/files/patch-google__apis_gcm_engine_heartbeat__manager.cc53
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_common_gpu__memory__buffer__support.cc11
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_service_external__vk__image__backing.cc65
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_service_external__vk__image__backing.h11
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_service_external__vk__image__gl__representation.cc20
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_service_program__manager.cc14
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_tests_gl__copy__texture__CHROMIUM__unittest.cc11
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_tests_gl__test__utils.cc20
-rw-r--r--devel/electron7/files/patch-gpu_command__buffer_tests_gl__test__utils.h11
-rw-r--r--devel/electron7/files/patch-gpu_config_gpu__control__list.cc32
-rw-r--r--devel/electron7/files/patch-gpu_config_gpu__test__config.cc11
-rw-r--r--devel/electron7/files/patch-gpu_ipc_common_gpu__memory__buffer__support.cc56
-rw-r--r--devel/electron7/files/patch-gpu_ipc_common_gpu__memory__buffer__support.h29
-rw-r--r--devel/electron7/files/patch-gpu_ipc_service_gpu__init.cc118
-rw-r--r--devel/electron7/files/patch-gpu_ipc_service_gpu__memory__buffer__factory.cc20
-rw-r--r--devel/electron7/files/patch-gpu_ipc_service_gpu__watchdog__thread.cc76
-rw-r--r--devel/electron7/files/patch-gpu_ipc_service_gpu__watchdog__thread.h13
-rw-r--r--devel/electron7/files/patch-gpu_vulkan_vulkan__function__pointers.cc32
-rw-r--r--devel/electron7/files/patch-gpu_vulkan_vulkan__function__pointers.h42
-rw-r--r--devel/electron7/files/patch-headless_lib_browser_headless__content__browser__client.cc20
-rw-r--r--devel/electron7/files/patch-headless_lib_browser_headless__content__browser__client.h11
-rw-r--r--devel/electron7/files/patch-headless_lib_browser_headless__request__context__manager.cc29
-rw-r--r--devel/electron7/files/patch-headless_lib_headless__content__main__delegate.cc20
-rw-r--r--devel/electron7/files/patch-headless_lib_headless__content__main__delegate.h11
-rw-r--r--devel/electron7/files/patch-headless_lib_headless__macros.h13
-rw-r--r--devel/electron7/files/patch-ipc_ipc__channel.h11
-rw-r--r--devel/electron7/files/patch-ipc_ipc__channel__common.cc20
-rw-r--r--devel/electron7/files/patch-ipc_ipc__channel__mojo.cc15
-rw-r--r--devel/electron7/files/patch-ipc_ipc__message__utils.cc11
-rw-r--r--devel/electron7/files/patch-ipc_ipc__message__utils.h11
-rw-r--r--devel/electron7/files/patch-media_BUILD.gn12
-rw-r--r--devel/electron7/files/patch-media_audio_BUILD.gn22
-rw-r--r--devel/electron7/files/patch-media_audio_alsa_audio__manager__alsa.cc54
-rw-r--r--devel/electron7/files/patch-media_audio_audio__input__device.cc11
-rw-r--r--devel/electron7/files/patch-media_audio_audio__manager.cc29
-rw-r--r--devel/electron7/files/patch-media_audio_audio__manager.h11
-rw-r--r--devel/electron7/files/patch-media_audio_audio__output__proxy__unittest.cc11
-rw-r--r--devel/electron7/files/patch-media_audio_pulse_pulse.sigs46
-rw-r--r--devel/electron7/files/patch-media_base_audio__latency.cc11
-rw-r--r--devel/electron7/files/patch-media_base_scopedfd__helper.h23
-rw-r--r--devel/electron7/files/patch-media_base_video__frame.cc74
-rw-r--r--devel/electron7/files/patch-media_base_video__frame.h50
-rw-r--r--devel/electron7/files/patch-media_capture_video_create__video__capture__device__factory.cc20
-rw-r--r--devel/electron7/files/patch-media_capture_video_fake__video__capture__device__factory.cc11
-rw-r--r--devel/electron7/files/patch-media_capture_video_file__video__capture__device__factory.cc11
-rw-r--r--devel/electron7/files/patch-media_capture_video_linux_v4l2__capture__delegate.cc26
-rw-r--r--devel/electron7/files/patch-media_capture_video_linux_video__capture__device__factory__linux.cc32
-rw-r--r--devel/electron7/files/patch-media_capture_video_linux_video__capture__device__linux.cc61
-rw-r--r--devel/electron7/files/patch-media_capture_video_mock__gpu__memory__buffer__manager.cc11
-rw-r--r--devel/electron7/files/patch-media_capture_video_video__capture__buffer__pool__impl.cc11
-rw-r--r--devel/electron7/files/patch-media_capture_video_video__capture__device__client.cc11
-rw-r--r--devel/electron7/files/patch-media_filters_vp9__parser.h10
-rw-r--r--devel/electron7/files/patch-media_formats_common_offset__byte__queue.cc20
-rw-r--r--devel/electron7/files/patch-media_formats_common_offset__byte__queue.h22
-rw-r--r--devel/electron7/files/patch-media_formats_mp2t_es__parser__adts.cc26
-rw-r--r--devel/electron7/files/patch-media_formats_mp2t_es__parser__mpeg1audio.cc26
-rw-r--r--devel/electron7/files/patch-media_gpu_libyuv__image__processor.cc38
-rw-r--r--devel/electron7/files/patch-media_gpu_linux_platform__video__frame__utils.cc20
-rw-r--r--devel/electron7/files/patch-media_media__options.gni12
-rw-r--r--devel/electron7/files/patch-media_mojo_clients_mojo__video__encode__accelerator.cc11
-rw-r--r--devel/electron7/files/patch-media_mojo_mojom_video__frame__mojom__traits.cc20
-rw-r--r--devel/electron7/files/patch-media_mojo_services_gpu__mojo__media__client.cc20
-rw-r--r--devel/electron7/files/patch-media_video_gpu__memory__buffer__video__frame__pool.cc11
-rw-r--r--devel/electron7/files/patch-mojo_public_c_system_thunks.cc58
-rw-r--r--devel/electron7/files/patch-mojo_public_js_mojo__bindings__resources.grd11
-rw-r--r--devel/electron7/files/patch-net_BUILD.gn46
-rw-r--r--devel/electron7/files/patch-net_base_address__tracker__linux.cc177
-rw-r--r--devel/electron7/files/patch-net_base_address__tracker__linux.h12
-rw-r--r--devel/electron7/files/patch-net_base_address__tracker__linux__unittest.cc14
-rw-r--r--devel/electron7/files/patch-net_base_network__change__notifier.cc28
-rw-r--r--devel/electron7/files/patch-net_base_network__interfaces__posix.h11
-rw-r--r--devel/electron7/files/patch-net_disk__cache_blockfile_disk__format.h12
-rw-r--r--devel/electron7/files/patch-net_dns_address__sorter__posix.cc12
-rw-r--r--devel/electron7/files/patch-net_dns_dns__config__service__posix__unittest.cc47
-rw-r--r--devel/electron7/files/patch-net_dns_dns__reloader.cc13
-rw-r--r--devel/electron7/files/patch-net_dns_dns__util.cc11
-rw-r--r--devel/electron7/files/patch-net_dns_host__resolver__proc.cc11
-rw-r--r--devel/electron7/files/patch-net_features.gni11
-rw-r--r--devel/electron7/files/patch-net_http_http__auth__gssapi__posix.cc14
-rw-r--r--devel/electron7/files/patch-net_http_http__auth__gssapi__posix.h12
-rw-r--r--devel/electron7/files/patch-net_nqe_network__quality__estimator.cc11
-rw-r--r--devel/electron7/files/patch-net_nqe_network__quality__estimator__unittest.cc11
-rw-r--r--devel/electron7/files/patch-net_proxy__resolution_proxy__config__service__linux.cc39
-rw-r--r--devel/electron7/files/patch-net_proxy__resolution_proxy__resolution__service.cc29
-rw-r--r--devel/electron7/files/patch-net_socket_socket__posix.cc11
-rw-r--r--devel/electron7/files/patch-net_socket_socks5__client__socket.cc13
-rw-r--r--devel/electron7/files/patch-net_socket_tcp__socket__posix.cc20
-rw-r--r--devel/electron7/files/patch-net_socket_udp__socket__posix.cc108
-rw-r--r--devel/electron7/files/patch-net_socket_udp__socket__posix.h11
-rw-r--r--devel/electron7/files/patch-net_socket_unix__domain__client__socket__posix.cc11
-rw-r--r--devel/electron7/files/patch-net_tools_cert__verify__tool_cert__verify__tool.cc20
-rw-r--r--devel/electron7/files/patch-net_tools_quic_quic__http__proxy__backend.cc11
-rw-r--r--devel/electron7/files/patch-net_traffic__annotation_network__traffic__annotation.h20
-rw-r--r--devel/electron7/files/patch-net_url__request_url__fetcher.cc11
-rw-r--r--devel/electron7/files/patch-net_url__request_url__fetcher.h11
-rw-r--r--devel/electron7/files/patch-net_url__request_url__request__context.cc11
-rw-r--r--devel/electron7/files/patch-net_url__request_url__request__context.h11
-rw-r--r--devel/electron7/files/patch-net_url__request_url__request__context__builder.cc20
-rw-r--r--devel/electron7/files/patch-pdf_pdfium_pdfium__engine.cc56
-rw-r--r--devel/electron7/files/patch-ppapi_proxy_file__io__resource.cc48
-rw-r--r--devel/electron7/files/patch-ppapi_proxy_flash__resource.cc11
-rw-r--r--devel/electron7/files/patch-printing_cups__config__helper.py11
-rw-r--r--devel/electron7/files/patch-remoting_base_chromoting__event.cc11
-rw-r--r--devel/electron7/files/patch-remoting_client_display_sys__opengl.h11
-rw-r--r--devel/electron7/files/patch-remoting_host_evaluate__capability.cc11
-rw-r--r--devel/electron7/files/patch-remoting_host_host__attributes.cc11
-rw-r--r--devel/electron7/files/patch-remoting_host_host__details.cc11
-rw-r--r--devel/electron7/files/patch-remoting_host_host__main.cc27
-rw-r--r--devel/electron7/files/patch-remoting_host_it2me_it2me__native__messaging__host__main.cc35
-rw-r--r--devel/electron7/files/patch-remoting_host_me2me__desktop__environment.cc11
-rw-r--r--devel/electron7/files/patch-remoting_host_remoting__me2me__host.cc108
-rw-r--r--devel/electron7/files/patch-remoting_host_switches.cc14
-rw-r--r--devel/electron7/files/patch-remoting_host_switches.h14
-rw-r--r--devel/electron7/files/patch-remoting_resources_remoting__strings.grd20
-rw-r--r--devel/electron7/files/patch-remoting_webapp_base_js_platform.js17
-rw-r--r--devel/electron7/files/patch-sandbox_features.gni10
-rw-r--r--devel/electron7/files/patch-sandbox_linux_BUILD.gn47
-rw-r--r--devel/electron7/files/patch-sandbox_linux_services_init__process__reaper.cc15
-rw-r--r--devel/electron7/files/patch-sandbox_linux_services_libc__interceptor.cc21
-rw-r--r--devel/electron7/files/patch-services_audio_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-services_device_geolocation_location__arbitrator.cc11
-rw-r--r--devel/electron7/files/patch-services_device_hid_BUILD.gn22
-rw-r--r--devel/electron7/files/patch-services_device_hid_hid__connection__freebsd.cc243
-rw-r--r--devel/electron7/files/patch-services_device_hid_hid__connection__freebsd.h71
-rw-r--r--devel/electron7/files/patch-services_device_hid_hid__service.cc20
-rw-r--r--devel/electron7/files/patch-services_device_hid_hid__service__freebsd.cc378
-rw-r--r--devel/electron7/files/patch-services_device_hid_hid__service__freebsd.h51
-rw-r--r--devel/electron7/files/patch-services_device_serial_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-services_device_serial_serial__io__handler__posix.cc11
-rw-r--r--devel/electron7/files/patch-services_device_time__zone__monitor_time__zone__monitor.cc20
-rw-r--r--devel/electron7/files/patch-services_device_time__zone__monitor_time__zone__monitor__linux.cc14
-rw-r--r--devel/electron7/files/patch-services_device_usb_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-services_network_BUILD.gn10
-rw-r--r--devel/electron7/files/patch-services_network_network__context.cc11
-rw-r--r--devel/electron7/files/patch-services_network_network__sandbox__hook__linux.cc18
-rw-r--r--devel/electron7/files/patch-services_network_network__service.cc20
-rw-r--r--devel/electron7/files/patch-services_network_network__service.h11
-rw-r--r--devel/electron7/files/patch-services_resource__coordinator_memory__instrumentation_queued__request__dispatcher.cc20
-rw-r--r--devel/electron7/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics.h32
-rw-r--r--devel/electron7/files/patch-services_resource__coordinator_public_cpp_memory__instrumentation_os__metrics__linux.cc103
-rw-r--r--devel/electron7/files/patch-services_service__manager_embedder_main.cc11
-rw-r--r--devel/electron7/files/patch-services_service__manager_embedder_set__process__title__linux.cc19
-rw-r--r--devel/electron7/files/patch-services_service__manager_embedder_set__process__title__linux.h20
-rw-r--r--devel/electron7/files/patch-services_service__manager_public_cpp_service__executable_BUILD.gn14
-rw-r--r--devel/electron7/files/patch-services_service__manager_sandbox_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-services_service__manager_sandbox_sandbox__type.cc11
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_common_zygote__features.gni8
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_host_zygote__host__impl__linux.cc40
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_host_zygote__host__impl__linux.h13
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_zygote__host__linux.h16
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_zygote__linux.cc15
-rw-r--r--devel/electron7/files/patch-services_service__manager_zygote_zygote__main__linux.cc48
-rw-r--r--devel/electron7/files/patch-services_video__capture_broadcasting__receiver.cc20
-rw-r--r--devel/electron7/files/patch-skia_ext_SkMemory__new__handler.cpp20
-rw-r--r--devel/electron7/files/patch-third__party_angle_BUILD.gn21
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__internal.h16
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__libpci.cpp90
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__linux.cpp21
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_gpu__info__util_SystemInfo__x11.cpp55
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_libANGLE_Display.cpp20
-rw-r--r--devel/electron7/files/patch-third__party_angle_src_libANGLE_renderer_driver__utils.h11
-rw-r--r--devel/electron7/files/patch-third__party_angle_third__party_vulkan-loader_src_loader_loader.c11
-rw-r--r--devel/electron7/files/patch-third__party_angle_third__party_vulkan-loader_src_loader_vk__loader__platform.h11
-rw-r--r--devel/electron7/files/patch-third__party_angle_third__party_vulkan-validation-layers_src_layers_vk__loader__platform.h11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_BUILD.gn13
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_editing_editing__behavior.cc11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_html_canvas_canvas__async__blob__creator.cc11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_html_forms_internal__popup__menu.cc11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_inspector_inspector__memory__agent.cc11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_layout_layout__view.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_paint_paint__layer.cc11
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_core_scroll_scrollbar__theme__aura.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_modules_mediastream_processed__local__audio__source.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_BUILD.gn10
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_font__cache.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_font__cache.h53
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_font__description.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_font__metrics.cc29
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_font__unique__name__lookup.cc20
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_fonts_skia_font__cache__skia.cc38
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_wtf_container__annotations.h27
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_wtf_stack__util.cc14
-rw-r--r--devel/electron7/files/patch-third__party_blink_renderer_platform_wtf_threading__pthreads.cc22
-rw-r--r--devel/electron7/files/patch-third__party_boringssl_BUILD.gn36
-rw-r--r--devel/electron7/files/patch-third__party_boringssl_src_crypto_cpu-aarch64-linux.c63
-rw-r--r--devel/electron7/files/patch-third__party_boringssl_src_crypto_ex__data.c13
-rw-r--r--devel/electron7/files/patch-third__party_breakpad_breakpad_src_common_simple__string__dictionary.h11
-rw-r--r--devel/electron7/files/patch-third__party_cacheinvalidation_src_google_cacheinvalidation_include_types.h11
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_build_crashpad__buildconfig.gni11
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_client_BUILD.gn15
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_client_crashpad__client__posix.cc41
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_misc_address__types.h20
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_misc_capture__context.h20
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_misc_metrics.cc11
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_misc_uuid.cc11
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_posix_close__multiple.cc29
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_posix_drop__privileges.cc11
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_posix_signals.cc40
-rw-r--r--devel/electron7/files/patch-third__party_crashpad_crashpad_util_posix_symbolic__constants__posix.cc20
-rw-r--r--devel/electron7/files/patch-third__party_crc32c_src_src_crc32c__arm64__linux__check.h53
-rw-r--r--devel/electron7/files/patch-third__party_electron__node_deps_uv_BUILD.gn45
-rw-r--r--devel/electron7/files/patch-third__party_ffmpeg_libavutil_mem.c12
-rw-r--r--devel/electron7/files/patch-third__party_googletest_src_googletest_src_gtest-port.cc43
-rw-r--r--devel/electron7/files/patch-third__party_googletest_src_googletest_src_gtest.cc10
-rw-r--r--devel/electron7/files/patch-third__party_leveldatabase_env__chromium.cc14
-rw-r--r--devel/electron7/files/patch-third__party_libXNVCtrl_NVCtrl.c25
-rw-r--r--devel/electron7/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_memory_singleton.h11
-rw-r--r--devel/electron7/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_synchronization_lock.h11
-rw-r--r--devel/electron7/files/patch-third__party_libphonenumber_dist_cpp_src_phonenumbers_base_thread__checker.h19
-rw-r--r--devel/electron7/files/patch-third__party_libyuv_include_libyuv_row.h37
-rw-r--r--devel/electron7/files/patch-third__party_nasm_config_config-linux.h29
-rw-r--r--devel/electron7/files/patch-third__party_node_node.py10
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_core_fxcrt_cfx__datetime.cpp11
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_core_fxcrt_fx__system.h11
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_core_fxge_fx__ge__linux.cpp14
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_fxjs_cjs__publicmethods.cpp106
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_fxjs_fx__date__helpers.cpp22
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_third__party_base_allocator_partition__allocator_page__allocator.cc11
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_third__party_base_allocator_partition__allocator_page__allocator__internals__posix.h38
-rw-r--r--devel/electron7/files/patch-third__party_pdfium_xfa_fgas_font_cfx__fontsourceenum__file.cpp14
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_include_perfetto_base_build__config.h51
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_include_perfetto_base_time.h20
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_include_perfetto_ext_base_event__fd.h13
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_include_perfetto_ext_base_thread__utils.h24
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_src_base_unix__socket.cc12
-rw-r--r--devel/electron7/files/patch-third__party_perfetto_src_tracing_core_tracing__service__impl.cc12
-rw-r--r--devel/electron7/files/patch-third__party_protobuf_src_google_protobuf_stubs_platform__macros.h11
-rw-r--r--devel/electron7/files/patch-third__party_sfntly_src_cpp_src_sfntly_table_core_cmap__table.cc47
-rw-r--r--devel/electron7/files/patch-third__party_skia_src_core_SkCpu.cpp19
-rw-r--r--devel/electron7/files/patch-third__party_skia_src_gpu_GrAutoLocaleSetter.h11
-rw-r--r--devel/electron7/files/patch-third__party_skia_src_images_SkJpegEncoder.cpp41
-rw-r--r--devel/electron7/files/patch-third__party_skia_src_ports_SkOSFile__stdio.cpp11
-rw-r--r--devel/electron7/files/patch-third__party_skia_src_sksl_SkSLString.h11
-rw-r--r--devel/electron7/files/patch-third__party_skia_third__party_vulkanmemoryallocator_include_vk__mem__alloc.h11
-rw-r--r--devel/electron7/files/patch-third__party_snappy_src_snappy.h20
-rw-r--r--devel/electron7/files/patch-third__party_sqlite_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_BUILD.gn24
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_Common_Configurator.cpp12
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_Common_MutexLock.hpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_Common_SharedLibrary.hpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_Main_SwiftConfig.cpp14
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libEGL_Display.cpp20
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libEGL_Surface.cpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.cpp29
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libEGL_libEGL.hpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libGLES__CM_libGLES__CM.hpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_OpenGL_libGLESv2_libGLESv2.hpp11
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_src_Yarn_Thread.cpp22
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_config.h152
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_third__party_llvm-7.0_configs_linux_include_llvm_Config_llvm-config.h20
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_third__party_llvm-subzero_build_Linux_include_llvm_Config_config.h29
-rw-r--r--devel/electron7/files/patch-third__party_swiftshader_third__party_llvm-subzero_lib_Support_Unix_Process.inc11
-rw-r--r--devel/electron7/files/patch-third__party_usrsctp_BUILD.gn20
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_BUILD.gn12
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_modules_audio__device_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_modules_rtp__rtcp_source_forward__error__correction.cc10
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_byte__order.h11
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_ifaddrs__converter.h11
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_ip__address.cc12
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_ip__address.h13
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_network.cc29
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_network.h13
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_physical__socket__server.cc65
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_physical__socket__server.h11
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_rtc__base_platform__thread__types.cc39
-rw-r--r--devel/electron7/files/patch-third__party_webrtc_system__wrappers_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-third__party_zlib_arm__features.c46
-rw-r--r--devel/electron7/files/patch-tools_gn_base_files_file__posix.cc11
-rw-r--r--devel/electron7/files/patch-tools_gn_base_files_file__util.h11
-rw-r--r--devel/electron7/files/patch-tools_gn_base_files_file__util__posix.cc11
-rw-r--r--devel/electron7/files/patch-tools_gn_base_files_scoped__file.cc11
-rw-r--r--devel/electron7/files/patch-tools_gn_build_gen.py24
-rw-r--r--devel/electron7/files/patch-tools_gn_tools_gn_exec__process.cc13
-rw-r--r--devel/electron7/files/patch-tools_gn_util_sys__info.cc11
-rw-r--r--devel/electron7/files/patch-tools_json__schema__compiler_feature__compiler.py10
-rw-r--r--devel/electron7/files/patch-tools_json__schema__compiler_model.py11
-rw-r--r--devel/electron7/files/patch-tools_perf_chrome__telemetry__build_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-tools_variations_fieldtrial__to__struct.py10
-rw-r--r--devel/electron7/files/patch-ui_base_dragdrop_os__exchange__data__provider__factory.cc20
-rw-r--r--devel/electron7/files/patch-ui_base_ime_init_input__method__initializer.cc38
-rw-r--r--devel/electron7/files/patch-ui_base_resource_resource__bundle.cc20
-rw-r--r--devel/electron7/files/patch-ui_base_resource_resource__bundle__freebsd.cc24
-rw-r--r--devel/electron7/files/patch-ui_base_ui__base__features.cc20
-rw-r--r--devel/electron7/files/patch-ui_base_ui__base__features.h15
-rw-r--r--devel/electron7/files/patch-ui_base_webui_web__ui__util.cc11
-rw-r--r--devel/electron7/files/patch-ui_events_devices_x11_device__data__manager__x11.cc19
-rw-r--r--devel/electron7/files/patch-ui_events_event__switches.cc11
-rw-r--r--devel/electron7/files/patch-ui_events_event__switches.h11
-rw-r--r--devel/electron7/files/patch-ui_events_keycodes_dom_keycode__converter.cc11
-rw-r--r--devel/electron7/files/patch-ui_gfx_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-ui_gfx_canvas__skia.cc11
-rw-r--r--devel/electron7/files/patch-ui_gfx_codec_jpeg__codec.cc20
-rw-r--r--devel/electron7/files/patch-ui_gfx_font__fallback__linux.cc13
-rw-r--r--devel/electron7/files/patch-ui_gfx_font__list.cc11
-rw-r--r--devel/electron7/files/patch-ui_gfx_font__render__params.h18
-rw-r--r--devel/electron7/files/patch-ui_gfx_gpu__memory__buffer.h20
-rw-r--r--devel/electron7/files/patch-ui_gfx_ipc_gfx__param__traits__macros.h44
-rw-r--r--devel/electron7/files/patch-ui_gfx_linux_client__native__pixmap__dmabuf.cc25
-rw-r--r--devel/electron7/files/patch-ui_gfx_mojom_buffer__types__mojom__traits.cc75
-rw-r--r--devel/electron7/files/patch-ui_gfx_mojom_buffer__types__mojom__traits.h29
-rw-r--r--devel/electron7/files/patch-ui_gfx_native__pixmap__handle.cc56
-rw-r--r--devel/electron7/files/patch-ui_gfx_native__pixmap__handle.h38
-rw-r--r--devel/electron7/files/patch-ui_gfx_render__text.cc46
-rw-r--r--devel/electron7/files/patch-ui_gl_BUILD.gn11
-rw-r--r--devel/electron7/files/patch-ui_gl_generate__bindings.py12
-rw-r--r--devel/electron7/files/patch-ui_gl_gl__bindings__api__autogen__glx.h10
-rw-r--r--devel/electron7/files/patch-ui_gl_gl__bindings__autogen__glx.cc61
-rw-r--r--devel/electron7/files/patch-ui_gl_gl__bindings__autogen__glx.h43
-rw-r--r--devel/electron7/files/patch-ui_gl_gl__fence.cc11
-rw-r--r--devel/electron7/files/patch-ui_gl_gl__surface__glx.cc14
-rw-r--r--devel/electron7/files/patch-ui_gl_sync__control__vsync__provider.cc43
-rw-r--r--devel/electron7/files/patch-ui_gl_sync__control__vsync__provider.h34
-rw-r--r--devel/electron7/files/patch-ui_message__center_public_cpp_message__center__constants.h11
-rw-r--r--devel/electron7/files/patch-ui_message__center_views_message__popup__view.cc11
-rw-r--r--devel/electron7/files/patch-ui_native__theme_native__theme.h11
-rw-r--r--devel/electron7/files/patch-ui_native__theme_native__theme__base.cc11
-rw-r--r--devel/electron7/files/patch-ui_platform__window_platform__window__delegate.h20
-rw-r--r--devel/electron7/files/patch-ui_platform__window_platform__window__init__properties.h11
-rw-r--r--devel/electron7/files/patch-ui_strings_app__locale__settings.grd11
-rw-r--r--devel/electron7/files/patch-ui_views_bubble_bubble__dialog__delegate__view.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_controls_label.cc20
-rw-r--r--devel/electron7/files/patch-ui_views_controls_textfield_textfield.cc73
-rw-r--r--devel/electron7/files/patch-ui_views_corewm_tooltip__aura.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_examples_widget__example.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_selection__controller.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_style_platform__style.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_views__delegate.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_views__delegate.h11
-rw-r--r--devel/electron7/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.cc20
-rw-r--r--devel/electron7/files/patch-ui_views_widget_desktop__aura_desktop__window__tree__host__platform.h11
-rw-r--r--devel/electron7/files/patch-ui_views_window_custom__frame__view.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_window_dialog__delegate.cc11
-rw-r--r--devel/electron7/files/patch-ui_views_window_frame__background.cc11
-rw-r--r--devel/electron7/files/patch-ui_webui_resources_js_cr.js14
-rw-r--r--devel/electron7/files/patch-ui_webui_resources_js_icon.js11
-rw-r--r--devel/electron7/files/patch-v8_BUILD.gn32
-rw-r--r--devel/electron7/files/patch-v8_src_api_api.cc20
-rw-r--r--devel/electron7/files/patch-v8_src_base_cpu.cc18
-rw-r--r--devel/electron7/files/patch-v8_src_base_platform_platform-posix.cc24
-rw-r--r--devel/electron7/files/patch-v8_src_trap-handler_handler-inside-posix.cc20
-rw-r--r--devel/electron7/files/patch-v8_src_trap-handler_handler-inside-posix.h11
-rw-r--r--devel/electron7/files/patch-v8_src_trap-handler_trap-handler.h11
-rw-r--r--devel/electron7/files/patch-weblayer_browser_browser__main__parts__impl.cc20
-rw-r--r--devel/electron7/files/patch-weblayer_shell_app_shell__main.cc20
-rw-r--r--devel/electron7/files/yarn.lock7925
-rw-r--r--devel/electron7/pkg-descr10
-rw-r--r--devel/electron7/pkg-plist124
814 files changed, 28630 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index 67826a4cdc3d..82e9d3a70ca0 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -520,6 +520,7 @@
SUBDIR += eiffelstudio
SUBDIR += electron4
SUBDIR += electron6
+ SUBDIR += electron7
SUBDIR += elf
SUBDIR += elfio
SUBDIR += elfkickers
diff --git a/devel/electron7/Makefile b/devel/electron7/Makefile
new file mode 100644
index 000000000000..2ec23baf012b
--- /dev/null
+++ b/devel/electron7/Makefile
@@ -0,0 +1,321 @@
+# $FreeBSD$
+
+PORTNAME= electron
+DISTVERSIONPREFIX= v
+DISTVERSION= ${ELECTRON_VER:S/-beta./.b/}
+CATEGORIES= devel java
+MASTER_SITES= https://github.com/tagattie/FreeBSD-Electron/releases/download/v7.1.5/:chromium \
+ https://commondatastorage.googleapis.com/chromium-browser-official/:chromium_official \
+ https://commondatastorage.googleapis.com/chromium-nodejs/:chromium_node \
+ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts
+PKGNAMESUFFIX= ${ELECTRON_VER_MAJOR}
+DISTFILES= chromium-${CHROMIUM_VER}${EXTRACT_SUFX}:chromium \
+ chromium-${CHROMIUM_OFFICIAL_VER}${EXTRACT_SUFX}:chromium_official \
+ ${CHROMIUM_NODE_MODULES_HASH}:chromium_node \
+ ${CHROMIUM_TEST_FONTS_HASH}:chromium_testfonts \
+ electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX}:prefetch
+DIST_SUBDIR= ${PORTNAME}
+
+MAINTAINER= tagattie@yandex.com
+COMMENT= Build cross-platform desktop apps with JavaScript, HTML, and CSS
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/electron/LICENSE
+
+FETCH_DEPENDS= yarn:www/yarn-node12
+EXTRACT_DEPENDS= yarn:www/yarn-node12
+PATCH_DEPENDS= git:devel/git
+BUILD_DEPENDS= ${LOCALBASE}/bin/ar:devel/binutils \
+ gperf:devel/gperf \
+ yasm:devel/yasm \
+ ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat \
+ node:www/node12 \
+ npm:www/npm-node12
+LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \
+ libatspi.so:accessibility/at-spi2-core \
+ libsnappy.so:archivers/snappy \
+ libFLAC.so:audio/flac \
+ libopus.so:audio/opus \
+ libdbus-1.so:devel/dbus \
+ libnotify.so:devel/libnotify \
+ libpci.so:devel/libpci \
+ libnspr4.so:devel/nspr \
+ libre2.so:devel/re2 \
+ libdrm.so:graphics/libdrm \
+ libwebp.so:graphics/webp \
+ libavcodec.so:multimedia/ffmpeg \
+ libopenh264.so:multimedia/openh264 \
+ libfreetype.so:print/freetype2 \
+ libharfbuzz.so:print/harfbuzz \
+ libsecret-1.so:security/libsecret \
+ libnss3.so:security/nss \
+ libexpat.so:textproc/expat2 \
+ libfontconfig.so:x11-fonts/fontconfig
+RUN_DEPENDS= xdg-open:devel/xdg-utils
+TEST_DEPENDS= git:devel/git \
+ ${PYTHON_PKGNAMEPREFIX}python-dbusmock>0:devel/py-python-dbusmock@${PY_FLAVOR} \
+ npm:www/npm-node12
+
+USES= bison dos2unix gettext-tools gl gnome jpeg localbase:ldflags \
+ ninja pkgconfig python:2.7,build,test tar:xz xorg
+
+USE_GITHUB= yes
+GH_TAGNAME= ${DISTVERSIONPREFIX}${ELECTRON_VER}
+GH_TUPLE= nodejs:node:v${NODE_VER}:node \
+ nodejs:nan:${NAN_VER}:nan
+ # boto:boto:f7574aa6cc2c819430c1f05e9a1a1a666ef8169b:boto \
+ # yaml:pyyaml:3.12:pyyaml \
+ # kennethreitz:requests:e4d59bedfd3c7f4f254f4f5d036587bcd8152458:requests
+
+# Official chromium version containing "gn" which is known to work
+CHROMIUM_OFFICIAL_VER= 78.0.3904.108
+# See ${WRKSRC}/electron/DEPS for CHROMIUM_VER
+CHROMIUM_VER= 78.0.3904.130
+# See ${WRKSRC}/third_party/node/node_modules.tar.gz.sha1 for CHROMIUM_NODE_MODULES_HASH
+CHROMIUM_NODE_MODULES_HASH= ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9
+# See ${WRKSRC}/third_party/test_fonts/test_fonts.tar.gz.sha1 for CHROMIUM_TEST_FONTS_HASH
+CHROMIUM_TEST_FONTS_HASH= a22de844e32a3f720d219e3911c3da3478039f89
+# See ${WRKSRC}/electron/DEPS for NODE_VER
+NODE_VER= 12.8.1
+# See ${WRKSRC}/electron/DEPS for NAN_VER
+NAN_VER= 2ee313aaca52e2b478965ac50eb5082520380d1b
+
+NO_WRKSUBDIR= yes
+WRKSRC_SUBDIR= src
+
+DATADIR= ${PREFIX}/share/${PORTNAME}${PKGNAMESUFFIX}
+
+DOS2UNIX_FILES= third_party/skia/third_party/vulkanmemoryallocator/include/vk_mem_alloc.h
+BINARY_ALIAS= python=${PYTHON_CMD}
+
+USE_XORG= x11 xcb xcomposite xcursor xdamage xext xfixes xi xrandr \
+ xrender xscrnsaver xtst
+USE_GL= gl glesv2
+USE_GNOME= atk cairo pango gdkpixbuf2 gtk30 libxml2 libxslt
+USE_JAVA= yes
+JAVA_VERSION= 1.8
+JAVA_BUILD= yes
+
+USE_LDCONFIG= ${DATADIR}
+
+GN_ARGS+= clang_use_chrome_plugins=false \
+ enable_hangout_services_extension=true \
+ enable_nacl=false \
+ enable_one_click_signin=true \
+ enable_remoting=false \
+ fieldtrial_testing_like_official_build=true \
+ is_clang=true \
+ toolkit_views=true \
+ treat_warnings_as_errors=false \
+ use_allocator="none" \
+ use_allocator_shim=false \
+ use_aura=true \
+ use_bundled_fontconfig=false \
+ use_custom_libcxx=false \
+ use_gnome_keyring=false \
+ use_jumbo_build=true \
+ use_lld=true \
+ use_sysroot=false \
+ use_system_freetype=true \
+ use_system_harfbuzz=true \
+ use_system_libjpeg=true \
+ extra_cxxflags="${CXXFLAGS}" \
+ extra_ldflags="${LDFLAGS}"
+GN_BOOTSTRAP_FLAGS= --no-clean --no-rebuild --skip-generate-buildfiles
+
+ALL_TARGET= electron third_party/electron_node:headers
+MAKE_ARGS= -C out/${BUILDTYPE}
+MAKE_ENV+= C_INCLUDE_PATH=${LOCALBASE}/include \
+ CPLUS_INCLUDE_PATH=${LOCALBASE}/include
+
+OPTIONS_DEFINE= CUPS DEBUG DIST DRIVER KERBEROS
+DIST_DESC= Build distribution zip files
+DRIVER_DESC= Install chromedriver
+OPTIONS_GROUP= AUDIO
+OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO
+OPTIONS_DEFAULT= CUPS DRIVER KERBEROS ALSA
+OPTIONS_SUB= yes
+
+ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
+ALSA_RUN_DEPENDS= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:audio/alsa-plugins
+ALSA_VARS= GN_ARGS+=use_alsa=true
+ALSA_VARS_OFF= GN_ARGS+=use_alsa=false
+
+CUPS_LIB_DEPENDS= libcups.so:print/cups
+CUPS_VARS= GN_ARGS+=use_cups=true
+CUPS_VARS_OFF= GN_ARGS+=use_cups=false
+
+DEBUG_VARS= BUILDTYPE=Debug \
+ GN_ARGS+=is_component_build=false
+DEBUG_VARS_OFF= BUILDTYPE=Release
+
+DIST_IMPLIES= DRIVER
+
+DRIVER_ALL_TARGET= chromedriver
+
+KERBEROS_VARS= GN_ARGS+=use_kerberos=true
+KERBEROS_VARS_OFF= GN_ARGS+=use_kerberos=false
+
+PULSEAUDIO_LIB_DEPENDS= libpulse.so:audio/pulseaudio
+PULSEAUDIO_VARS= GN_ARGS+=use_pulseaudio=true
+PULSEAUDIO_VARS_OFF= GN_ARGS+=use_pulseaudio=false
+
+POST_BUILD_TARGETS= licenses version
+POST_BUILD_DIST_TARGETS= electron_dist_zip electron_chromedriver_zip electron_mksnapshot_zip
+
+YARN_TIMESTAMP= 1583472449
+
+PLIST_SUB= ELECTRON_VER=${ELECTRON_VER} \
+ ELECTRON_VER_MAJOR=${ELECTRON_VER_MAJOR}
+
+.include "Makefile.version"
+.include <bsd.port.pre.mk>
+
+.if ${ARCH} == "amd64"
+PLIST_SUB+= AMD64=""
+.else
+PLIST_SUB+= AMD64="@comment "
+.endif
+
+.if ${ARCH} == "i386"
+PLIST_SUB+= I386=""
+.else
+PLIST_SUB+= I386="@comment "
+.endif
+
+pre-fetch:
+ @${MKDIR} ${DISTDIR}/${DIST_SUBDIR}
+ if [ ! -f ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} ]; \
+ then ${MKDIR} ${WRKDIR}; \
+ ${ECHO_CMD} 'yarn-offline-mirror "./yarn-offline-cache"' >> \
+ ${WRKDIR}/.yarnrc; \
+ ${CP} ${FILESDIR}/package.json ${FILESDIR}/yarn.lock ${WRKDIR}; \
+ cd ${WRKDIR} && ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache \
+ yarn --frozen-lockfile --ignore-scripts; \
+ ${MTREE_CMD} -cbnSp yarn-offline-cache | ${MTREE_CMD} -C | ${SED} \
+ -e 's:time=[0-9.]*:time=${YARN_TIMESTAMP}.000000000:' \
+ -e 's:\([gu]id\)=[0-9]*:\1=0:g' \
+ -e 's:flags=.*:flags=none:' \
+ -e 's:^\.:./yarn-offline-cache:' > yarn-offline-cache.mtree; \
+ ${TAR} cJf ${DISTDIR}/${DIST_SUBDIR}/electron-yarn-cache-${ELECTRON_VER}${EXTRACT_SUFX} \
+ @yarn-offline-cache.mtree; \
+ ${RM} -r ${WRKDIR}; \
+ fi
+
+post-extract:
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_VER} ${WRKSRC}
+ ${RM} -r ${WRKSRC}/tools/gn
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/chromium-${CHROMIUM_OFFICIAL_VER}/tools/gn \
+ ${WRKSRC}/tools/gn
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${PORTNAME}-${ELECTRON_VER} ${WRKSRC}/electron
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_nan}-${NAN_VER} \
+ ${WRKSRC}/third_party/nan
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_node}-${NODE_VER} \
+ ${WRKSRC}/third_party/electron_node
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/yarn-offline-cache ${WRKDIR}
+ ${ECHO_CMD} 'yarn-offline-mirror "../../../yarn-offline-cache"' >> ${WRKSRC}/electron/.yarnrc
+ cd ${WRKSRC}/electron && \
+ ${SETENV} HOME=${WRKDIR} XDG_CACHE_HOME=${WRKDIR}/.cache yarn --frozen-lockfile --offline
+ # ${RMDIR} ${WRKSRC}/electron/vendor/${GH_PROJECT_boto}
+ # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_boto}-${GH_TAGNAME_boto} \
+ # ${WRKSRC}/electron/vendor/${GH_PROJECT_boto}
+ # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_pyyaml}-${GH_TAGNAME_pyyaml} \
+ # ${WRKSRC}/electron/vendor/${GH_PROJECT_pyyaml}
+ # ${RMDIR} ${WRKSRC}/electron/vendor/${GH_PROJECT_requests}
+ # ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/${GH_PROJECT_requests}-${GH_TAGNAME_requests} \
+ # ${WRKSRC}/electron/vendor/${GH_PROJECT_requests}
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/node_modules ${WRKSRC}/third_party/node
+ ${MV} ${WRKDIR}/${PORTNAME}-${ELECTRON_VER}/test_fonts ${WRKSRC}/third_party/test_fonts
+
+pre-patch:
+ ${SH} ${FILESDIR}/apply-electron-patches.sh ${WRKSRC}
+ # ${FIND} ${WRKSRC} -type f -name '*.orig' -print -delete
+ # ${FIND} ${WRKSRC} -type f -name '*~' -print -delete
+
+pre-configure:
+ # cd ${WRKSRC}/electron/vendor/${GH_PROJECT_boto} && \
+ # ${PYTHON_CMD} setup.py build
+ # cd ${WRKSRC}/electron/vendor/${GH_PROJECT_requests} && \
+ # ${PYTHON_CMD} setup.py build
+ # We used to remove bundled libraries to be sure that chromium uses
+ # system libraries and not shipped ones.
+ # cd ${WRKSRC} && ${PYTHON_CMD} \
+ #./build/linux/unbundle/remove_bundled_libraries.py [list of preserved]
+ cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ${PYTHON_CMD} \
+ ./build/linux/unbundle/replace_gn_files.py --system-libraries \
+ ffmpeg flac freetype harfbuzz-ng libdrm libusb libwebp libxml \
+ libxslt openh264 opus snappy yasm || ${FALSE}
+
+do-configure:
+ # GN generator bootstrapping and generating ninja files
+ cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} CC=${CC} CXX=${CXX} LD=${CXX} \
+ READELF=${READELF} AR=${AR} NM=${NM} ${PYTHON_CMD} \
+ ./tools/gn/bootstrap/bootstrap.py ${GN_BOOTSTRAP_FLAGS}
+ cd ${WRKSRC} && ${SETENV} ${CONFIGURE_ENV} ./out/${BUILDTYPE}/gn gen out/${BUILDTYPE} \
+ --args='import("//electron/build/args/${BUILDTYPE:tl}.gn") ${GN_ARGS}'
+ # Setup nodejs dependency
+ ${MKDIR} ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin
+ ${LN} -sf ${LOCALBASE}/bin/node ${WRKSRC}/third_party/node/freebsd/node-freebsd-x64/bin/node
+ # Setup java dependency
+ ${MKDIR} ${WRKDIR}/bin
+ ${LN} -sf ${LOCALBASE}/openjdk8/bin/java ${WRKDIR}/bin/java
+
+# do-build:
+# cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ninja -C out/${BUILDTYPE} ${ALL_TARGET}
+
+post-build:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_TARGETS}
+
+post-build-DIST-on:
+ cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} \
+ ${MAKE_CMD} ${MAKE_ARGS} ${POST_BUILD_DIST_TARGETS}
+ cd ${WRKSRC}/out/${BUILDTYPE} && \
+ ${CP} chromedriver.zip chromedriver-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
+ ${CP} dist.zip electron-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
+ ${CP} mksnapshot.zip mksnapshot-v${ELECTRON_VER}-freebsd-${ARCH:S/amd64/x64/:S/i386/ia32/}.zip && \
+ ${SHA256} -r *-v${ELECTRON_VER}-freebsd-*.zip | ${SED} -e 's/ / */' > SHASUMS256.txt
+
+do-install:
+ ${MKDIR} ${STAGEDIR}${DATADIR}
+.for f in electron mksnapshot v8_context_snapshot_generator
+ ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
+.endfor
+.for f in libEGL.so libGLESv2.so
+ ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
+.endfor
+ ${MKDIR} ${STAGEDIR}${DATADIR}/swiftshader
+.for f in libEGL.so libGLESv2.so libvk_swiftshader.so
+ ${INSTALL_LIB} ${WRKSRC}/out/${BUILDTYPE}/swiftshader/${f} ${STAGEDIR}${DATADIR}/swiftshader
+.endfor
+.for f in LICENSE LICENSES.chromium.html icudtl.dat natives_blob.bin snapshot_blob.bin v8_context_snapshot.bin version
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
+.endfor
+.for f in chrome_100_percent.pak chrome_200_percent.pak resources.pak
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/${f} ${STAGEDIR}${DATADIR}
+.endfor
+ ${MKDIR} ${STAGEDIR}${DATADIR}/locales
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/locales/*.pak ${STAGEDIR}${DATADIR}/locales
+ ${MKDIR} ${STAGEDIR}${DATADIR}/resources
+.for f in default_app.asar
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/resources/${f} ${STAGEDIR}${DATADIR}/resources
+.endfor
+ cd ${WRKSRC}/out/${BUILDTYPE}/gen && ${COPYTREE_SHARE} node_headers ${STAGEDIR}${DATADIR}
+ ${RLN} ${STAGEDIR}${DATADIR}/electron ${STAGEDIR}${PREFIX}/bin/electron${PKGNAMESUFFIX}
+
+post-install-DIST-on:
+ ${MKDIR} ${STAGEDIR}${DATADIR}/releases
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/SHASUMS256.txt ${STAGEDIR}${DATADIR}/releases
+ ${INSTALL_DATA} ${WRKSRC}/out/${BUILDTYPE}/*-v${ELECTRON_VER}-freebsd-*.zip ${STAGEDIR}${DATADIR}/releases
+
+post-install-DRIVER-on:
+ ${INSTALL_PROGRAM} ${WRKSRC}/out/${BUILDTYPE}/chromedriver ${STAGEDIR}${DATADIR}
+
+do-test:
+ # Note 1: "npm install" will run before actual tests are executed
+ # Note 2: Xvfb or something similar is necessary for headless testing
+ cd ${WRKSRC}/electron && \
+ ${SETENV} ${TEST_ENV} ELECTRON_OUT_DIR=${BUILDTYPE} LOCAL_GIT_DIRECTORY=${LOCALBASE} \
+ npm run test -- --ci
+
+.include <bsd.port.post.mk>
diff --git a/devel/electron7/Makefile.version b/devel/electron7/Makefile.version
new file mode 100644
index 000000000000..beacbf980060
--- /dev/null
+++ b/devel/electron7/Makefile.version
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+ELECTRON_VER= 7.1.14
+ELECTRON_VER_MAJOR= ${ELECTRON_VER:C/\..*//}
diff --git a/devel/electron7/distinfo b/devel/electron7/distinfo
new file mode 100644
index 000000000000..72fc655bb3e8
--- /dev/null
+++ b/devel/electron7/distinfo
@@ -0,0 +1,17 @@
+TIMESTAMP = 1583473295
+SHA256 (electron/chromium-78.0.3904.130.tar.xz) = 6f9656a345e8cd4938520a70d1979672190f386ac710421be8d32cb542008fc2
+SIZE (electron/chromium-78.0.3904.130.tar.xz) = 1405077664
+SHA256 (electron/chromium-78.0.3904.108.tar.xz) = f9c53839f306d2973de27723360024f7904101d426b9e7e9cdb56e8bcc775b0e
+SIZE (electron/chromium-78.0.3904.108.tar.xz) = 742906260
+SHA256 (electron/ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9) = a45b953ebd15f4f13f1e0c675ccf59e9ed0352049497c4bea0111dbc2c9a5997
+SIZE (electron/ab7f28fee456b5af5fbd3fcb5bcc7c61420788c9) = 4593699
+SHA256 (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 6e331676d098a57c53c1250821dc47ed84c47f823901bf30c4704df90d8a34be
+SIZE (electron/a22de844e32a3f720d219e3911c3da3478039f89) = 17469927
+SHA256 (electron/electron-yarn-cache-7.1.14.tar.xz) = e644591cc785c3a9f3057e7b05028371881de3fb8a354c4cb85fa30f4cbd8ac1
+SIZE (electron/electron-yarn-cache-7.1.14.tar.xz) = 24834332
+SHA256 (electron/electron-electron-v7.1.14_GH0.tar.gz) = 19cfa14b74f8180731334dfb2efe5725f4d9f7d35b708051352ecbee9de499cd
+SIZE (electron/electron-electron-v7.1.14_GH0.tar.gz) = 5391932
+SHA256 (electron/nodejs-node-v12.8.1_GH0.tar.gz) = 11648d586f68ee5fc38e4cadf3974541aac4a67709fa028e9075aff42e28d9b9
+SIZE (electron/nodejs-node-v12.8.1_GH0.tar.gz) = 72104419
+SHA256 (electron/nodejs-nan-2ee313aaca52e2b478965ac50eb5082520380d1b_GH0.tar.gz) = e6d0727f2f33d6c0fdbee3182543cb23679551dc15318cc8a2489901eabe9915
+SIZE (electron/nodejs-nan-2ee313aaca52e2b478965ac50eb5082520380d1b_GH0.tar.gz) = 173099
diff --git a/devel/electron7/files/apply-electron-patches.sh b/devel/electron7/files/apply-electron-patches.sh
new file mode 100644
index 000000000000..17365d1f06b1
--- /dev/null
+++ b/devel/electron7/files/apply-electron-patches.sh
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+PATH=/bin:/usr/bin:/usr/local/bin
+
+PATCH_CMD="git apply"
+#PATCH_FLAGS="--numstat --check" # for debugging
+PATCH_FLAGS="--verbose --reject"
+
+WRKSRC=$1
+PATCH_CONF=${WRKSRC}/electron/patches/config.json
+
+PATCHD_REPOD_PAIRS=$(sed -e '1d; $d; /^$/d; s/[",]//g; s/: */:/' "${PATCH_CONF}")
+for prp in ${PATCHD_REPOD_PAIRS}; do
+ pd=$(echo "${prp}" | awk -F: '{print $1}' | sed -e 's/src/./')
+ rd=$(echo "${prp}" | awk -F: '{print $2}' | sed -e 's/src/./')
+ (cd "${WRKSRC}/${rd}" && \
+ while read -r p; do
+ ${PATCH_CMD} ${PATCH_FLAGS} "${WRKSRC}/${pd}/${p}"
+ done < "${WRKSRC}/${pd}/.patches")
+done
diff --git a/devel/electron7/files/package.json b/devel/electron7/files/package.json
new file mode 100644
index 000000000000..cd339c2b544f
--- /dev/null
+++ b/devel/electron7/files/package.json
@@ -0,0 +1,129 @@
+{
+ "name": "electron",
+ "version": "7.1.14",
+ "repository": "https://github.com/electron/electron",
+ "description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
+ "devDependencies": {
+ "@electron/docs-parser": "^0.4.2",
+ "@electron/typescript-definitions": "^8.6.4",
+ "@octokit/rest": "^16.3.2",
+ "@primer/octicons": "^9.1.1",
+ "@types/chai": "^4.1.7",
+ "@types/chai-as-promised": "^7.1.0",
+ "@types/express": "^4.16.1",
+ "@types/fs-extra": "^5.0.5",
+ "@types/mocha": "^5.2.6",
+ "@types/node": "^12.0.10",
+ "@types/semver": "^6.0.1",
+ "@types/split": "^1.0.0",
+ "@types/webpack": "^4.4.32",
+ "@types/webpack-env": "^1.13.9",
+ "@typescript-eslint/eslint-plugin": "^1.4.2",
+ "@typescript-eslint/parser": "^1.4.2",
+ "asar": "^1.0.0",
+ "check-for-leaks": "^1.2.1",
+ "colors": "^1.1.2",
+ "dotenv-safe": "^4.0.4",
+ "dugite": "^1.45.0",
+ "eslint": "^5.13.0",
+ "eslint-config-standard": "^12.0.0",
+ "eslint-plugin-import": "^2.17.2",
+ "eslint-plugin-mocha": "^5.2.0",
+ "eslint-plugin-node": "^8.0.1",
+ "eslint-plugin-standard": "^4.0.0",
+ "eslint-plugin-typescript": "^0.14.0",
+ "express": "^4.16.4",
+ "folder-hash": "^2.1.1",
+ "fs-extra": "^7.0.1",
+ "husky": "^2.2.0",
+ "klaw": "^3.0.0",
+ "lint": "^1.1.2",
+ "lint-staged": "^8.1.0",
+ "minimist": "^1.2.0",
+ "nugget": "^2.0.1",
+ "pre-flight": "^1.1.0",
+ "remark-cli": "^4.0.0",
+ "remark-preset-lint-markdown-style-guide": "^2.1.1",
+ "request": "^2.88.0",
+ "semver": "^5.6.0",
+ "shx": "^0.3.2",
+ "standard-markdown": "^5.0.0",
+ "sumchecker": "^2.0.2",
+ "tap-xunit": "^2.4.1",
+ "temp": "^0.8.3",
+ "timers-browserify": "1.4.2",
+ "ts-loader": "^6.0.2",
+ "ts-node": "^6.0.3",
+ "typescript": "^3.5.2",
+ "webpack": "^4.32.2",
+ "webpack-cli": "^3.3.2"
+ },
+ "private": true,
+ "scripts": {
+ "asar": "asar",
+ "generate-version-json": "node script/generate-version-json.js",
+ "lint": "node ./script/lint.js && npm run lint:clang-format && npm run lint:docs",
+ "lint:js": "node ./script/lint.js --js",
+ "lint:clang-format": "python script/run-clang-format.py -r -c atom/ chromium_src/ || (echo \"\\nCode not formatted correctly.\" && exit 1)",
+ "lint:cpp": "node ./script/lint.js --cc",
+ "lint:objc": "node ./script/lint.js --objc",
+ "lint:py": "node ./script/lint.js --py",
+ "lint:gn": "node ./script/lint.js --gn",
+ "lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-relative-links && npm run lint:check-trailing-whitespace",
+ "lint:docs-relative-links": "python ./script/check-relative-doc-links.py",
+ "lint:check-trailing-whitespace": "python ./script/check-trailing-whitespace.py",
+ "lint:js-in-markdown": "standard-markdown docs",
+ "create-api-json": "electron-docs-parser --dir=./",
+ "create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
+ "gn-typescript-definitions": "npm run create-typescript-definitions && shx cp electron.d.ts",
+ "pre-flight": "pre-flight",
+ "preinstall": "node -e 'process.exit(0)'",
+ "prepack": "check-for-leaks",
+ "repl": "node ./script/start.js --interactive",
+ "start": "node ./script/start.js",
+ "test": "node ./script/spec-runner.js",
+ "tsc": "tsc",
+ "webpack": "node build/webpack/run-compiler"
+ },
+ "license": "MIT",
+ "author": "Electron Community",
+ "keywords": [
+ "electron"
+ ],
+ "husky": {
+ "hooks": {
+ "pre-commit": "lint-staged",
+ "pre-push": "check-for-leaks"
+ }
+ },
+ "lint-staged": {
+ "*.{js,ts}": [
+ "node script/lint.js --js --fix --only --",
+ "git add"
+ ],
+ "*.{js,ts,d.ts}": [
+ "node script/gen-filenames.js",
+ "git add"
+ ],
+ "*.{cc,mm,c,h}": [
+ "python script/run-clang-format.py -r -c --fix",
+ "git add"
+ ],
+ "*.md": [
+ "remark -qf"
+ ],
+ "*.{gn,gni}": [
+ "python script/run-gn-format.py",
+ "git add"
+ ],
+ "*.py": [
+ "node script/lint.js --py --fix --only --",
+ "git add"
+ ],
+ "docs/api/**/*.md": [
+ "node script/gen-filenames.js",
+ "python script/check-trailing-whitespace.py --fix",
+ "git add filenames.auto.gni"
+ ]
+ }
+}
diff --git a/devel/electron7/files/patch-BUILD.gn b/devel/electron7/files/patch-BUILD.gn
new file mode 100644
index 000000000000..ace8ea6c33f9
--- /dev/null
+++ b/devel/electron7/files/patch-BUILD.gn
@@ -0,0 +1,95 @@
+--- BUILD.gn.orig 2019-12-12 12:38:54 UTC
++++ BUILD.gn
+@@ -404,7 +404,7 @@ group("gn_all") {
+ ]
+ }
+
+- if (is_linux || is_android) {
++ if ((is_linux && !is_bsd) || is_android) {
+ deps += [
+ "//third_party/breakpad:breakpad_unittests",
+ "//third_party/breakpad:core-2-minidump",
+@@ -445,8 +445,6 @@ group("gn_all") {
+ "//net:disk_cache_memory_test",
+ "//net:quic_client",
+ "//net:quic_server",
+- "//sandbox/linux:chrome_sandbox",
+- "//sandbox/linux:sandbox_linux_unittests",
+ "//testing:empty_main",
+ ]
+
+@@ -501,10 +499,6 @@ group("gn_all") {
+ "//chrome/test:load_library_perf_tests",
+ "//chrome/test:sync_performance_tests",
+ "//chrome/test/chromedriver:chromedriver",
+- "//courgette:courgette",
+- "//courgette:courgette_fuzz",
+- "//courgette:courgette_minimal_tool",
+- "//courgette:courgette_unittests",
+ "//media/cast:generate_barcode_video",
+ "//media/cast:generate_timecode_audio",
+ "//net:crash_cache",
+@@ -560,10 +554,6 @@ group("gn_all") {
+ "//mojo:mojo_perftests",
+ "//services/service_manager/public/cpp",
+ "//testing/gmock:gmock_main",
+- "//third_party/breakpad:dump_syms($host_toolchain)",
+- "//third_party/breakpad:microdump_stackwalk($host_toolchain)",
+- "//third_party/breakpad:minidump_dump($host_toolchain)",
+- "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
+ ]
+
+ if (!is_android) {
+@@ -637,7 +627,7 @@ group("gn_all") {
+ host_os == "win") {
+ deps += [ "//chrome/test/mini_installer:mini_installer_tests" ]
+ }
+- } else if (!is_android && !is_ios && !is_fuchsia) {
++ } else if (!is_android && !is_ios && !is_fuchsia && !is_bsd) {
+ deps += [ "//third_party/breakpad:symupload($host_toolchain)" ]
+ }
+
+@@ -776,7 +766,6 @@ group("gn_all") {
+ "//chrome/browser/vr:vr_common_perftests",
+ "//chrome/browser/vr:vr_common_unittests",
+ "//chrome/browser/vr:vr_pixeltests",
+- "//tools/perf/contrib/vr_benchmarks:vr_perf_tests",
+ ]
+ if (is_desktop_linux && use_ozone) {
+ deps += [ "//chrome/browser/vr/testapp:vr_testapp" ]
+@@ -896,7 +885,6 @@ if (is_chromeos) {
+ "//ppapi/examples/video_decode",
+ "//sandbox/linux:chrome_sandbox",
+ "//sandbox/linux:sandbox_linux_unittests",
+- "//third_party/breakpad:minidump_stackwalk($host_toolchain)",
+
+ # Blocked on https://github.com/catapult-project/catapult/issues/2297
+ #"//third_party/catapult/telemetry:bitmaptools",
+@@ -1065,7 +1053,7 @@ if (!is_ios) {
+ ]
+ }
+
+- if (!is_win && !is_android) {
++ if (!is_win && !is_android && !is_bsd) {
+ data_deps +=
+ [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
+ }
+@@ -1074,7 +1062,7 @@ if (!is_ios) {
+ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
+ }
+
+- if (is_linux) {
++ if (is_linux && !is_bsd) {
+ data_deps += [ "//third_party/breakpad:dump_syms($host_toolchain)" ]
+ }
+
+@@ -1216,9 +1204,6 @@ group("chromium_builder_perf") {
+
+ if (is_win) {
+ data_deps += [ "//chrome/installer/mini_installer:mini_installer" ]
+- } else {
+- data_deps +=
+- [ "//third_party/breakpad:minidump_stackwalk($host_toolchain)" ]
+ }
+ if (is_win || is_android) {
+ data_deps += [
diff --git a/devel/electron7/files/patch-apps_ui_views_app__window__frame__view.cc b/devel/electron7/files/patch-apps_ui_views_app__window__frame__view.cc
new file mode 100644
index 000000000000..21df7f2cc178
--- /dev/null
+++ b/devel/electron7/files/patch-apps_ui_views_app__window__frame__view.cc
@@ -0,0 +1,11 @@
+--- apps/ui/views/app_window_frame_view.cc.orig 2019-12-12 12:38:55 UTC
++++ apps/ui/views/app_window_frame_view.cc
+@@ -125,7 +125,7 @@ gfx::Rect AppWindowFrameView::GetBoundsForClientView()
+ gfx::Rect AppWindowFrameView::GetWindowBoundsForClientBounds(
+ const gfx::Rect& client_bounds) const {
+ gfx::Rect window_bounds = client_bounds;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Get the difference between the widget's client area bounds and window
+ // bounds, and grow |window_bounds| by that amount.
+ gfx::Insets native_frame_insets =
diff --git a/devel/electron7/files/patch-ash_display_mirror__window__controller.cc b/devel/electron7/files/patch-ash_display_mirror__window__controller.cc
new file mode 100644
index 000000000000..96e2248cf8d6
--- /dev/null
+++ b/devel/electron7/files/patch-ash_display_mirror__window__controller.cc
@@ -0,0 +1,14 @@
+--- ash/display/mirror_window_controller.cc.orig 2019-12-12 12:38:55 UTC
++++ ash/display/mirror_window_controller.cc
+@@ -274,7 +274,11 @@ void MirrorWindowController::UpdateWindow(
+ return info.id() == iter->first;
+ }) == display_info_list.end()) {
+ CloseAndDeleteHost(iter->second, true);
++#if defined(__llvm__)
++ mirroring_host_info_map_.erase(iter++);
++#else
+ iter = mirroring_host_info_map_.erase(iter);
++#endif
+ } else {
+ ++iter;
+ }
diff --git a/devel/electron7/files/patch-base_BUILD.gn b/devel/electron7/files/patch-base_BUILD.gn
new file mode 100644
index 000000000000..7da1e0702910
--- /dev/null
+++ b/devel/electron7/files/patch-base_BUILD.gn
@@ -0,0 +1,67 @@
+--- base/BUILD.gn.orig 2019-12-12 12:38:58 UTC
++++ base/BUILD.gn
+@@ -1266,7 +1266,7 @@ jumbo_component("base") {
+ # Needed for <atomic> if using newer C++ library than sysroot, except if
+ # building inside the cros_sdk environment - use host_toolchain as a
+ # more robust check for this.
+- if (!use_sysroot && (is_android || (is_linux && !is_chromecast)) &&
++ if (!use_sysroot && (is_android || (is_linux && !is_chromecast) && !is_clang) &&
+ host_toolchain != "//build/toolchain/cros:host") {
+ libs += [ "atomic" ]
+ }
+@@ -1292,7 +1292,7 @@ jumbo_component("base") {
+ "allocator/allocator_shim_override_glibc_weak_symbols.h",
+ ]
+ deps += [ "//base/allocator:tcmalloc" ]
+- } else if (is_linux && use_allocator == "none") {
++ } else if ((is_linux && !is_bsd) && use_allocator == "none") {
+ sources += [ "allocator/allocator_shim_default_dispatch_to_glibc.cc" ]
+ } else if (is_android && use_allocator == "none") {
+ sources += [
+@@ -1893,6 +1893,33 @@ jumbo_component("base") {
+ }
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "files/file_path_watcher_linux.cc",
++ "files/file_util_linux.cc",
++ "process/memory_linux.cc",
++ "process/process_handle_linux.cc",
++ "process/process_iterator_linux.cc",
++ "process/process_metrics_linux.cc",
++ "system/sys_info_linux.cc"
++ ]
++ sources += [
++ "files/file_path_watcher_kqueue.cc",
++ "files/file_path_watcher_kqueue.h",
++ "files/file_path_watcher_stub.cc",
++ "process/memory_stubs.cc",
++ "process/process_handle_freebsd.cc",
++ "process/process_iterator_freebsd.cc",
++ "process/process_metrics_freebsd.cc",
++ "system/sys_info_freebsd.cc",
++ ]
++ libs = [
++ "execinfo", # logging.cc
++ "kvm", # process_metrics_freebsd
++ "util" # process_metrics_freebsd
++ ]
++ }
++
+ # iOS
+ if (is_ios) {
+ set_sources_assignment_filter([])
+@@ -3041,6 +3068,12 @@ test("base_unittests") {
+ ]
+ set_sources_assignment_filter(sources_assignment_filter)
+ }
++
++ if (is_bsd) {
++ sources -= [
++ "debug/proc_maps_linux_unittest.cc",
++ ]
++ }
+
+ if (is_win) {
+ deps += [ "//base:scoped_handle_test_dll" ]
diff --git a/devel/electron7/files/patch-base_allocator_allocator__shim.cc b/devel/electron7/files/patch-base_allocator_allocator__shim.cc
new file mode 100644
index 000000000000..fbf962ab5979
--- /dev/null
+++ b/devel/electron7/files/patch-base_allocator_allocator__shim.cc
@@ -0,0 +1,11 @@
+--- base/allocator/allocator_shim.cc.orig 2019-12-12 12:38:58 UTC
++++ base/allocator/allocator_shim.cc
+@@ -71,7 +71,7 @@ inline const base::allocator::AllocatorDispatch* GetCh
+ // Unfortunately due to that bug NoBarrier_Load() is mistakenly fully
+ // barriered on Linux+Clang, and that causes visible perf regressons.
+ return reinterpret_cast<const base::allocator::AllocatorDispatch*>(
+-#if defined(OS_LINUX) && defined(__clang__)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && defined(__clang__)
+ *static_cast<const volatile base::subtle::AtomicWord*>(&g_chain_head)
+ #else
+ base::subtle::NoBarrier_Load(&g_chain_head)
diff --git a/devel/electron7/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc b/devel/electron7/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
new file mode 100644
index 000000000000..c9a46f3fa08b
--- /dev/null
+++ b/devel/electron7/files/patch-base_allocator_allocator__shim__default__dispatch__to__glibc.cc
@@ -0,0 +1,76 @@
+--- base/allocator/allocator_shim_default_dispatch_to_glibc.cc.orig 2019-12-12 12:38:58 UTC
++++ base/allocator/allocator_shim_default_dispatch_to_glibc.cc
+@@ -5,18 +5,28 @@
+ #include "base/allocator/allocator_shim.h"
+
+ #include <dlfcn.h>
+-#include <malloc.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <malloc_np.h>
+
+ // This translation unit defines a default dispatch for the allocator shim which
+ // routes allocations to libc functions.
+-// The code here is strongly inspired from tcmalloc's libc_override_glibc.h.
++// The code here is strongly inspired from tcmalloc's override_glibc.h.
+
+ extern "C" {
+-void* __libc_malloc(size_t size);
+-void* __libc_calloc(size_t n, size_t size);
+-void* __libc_realloc(void* address, size_t size);
+-void* __libc_memalign(size_t alignment, size_t size);
+-void __libc_free(void* ptr);
++void* __malloc(size_t size);
++void* __calloc(size_t n, size_t size);
++void* __realloc(void* address, size_t len);
++void* __memalign(size_t alignment, size_t size) {
++ void *ret;
++ if (__posix_memalign(&ret, alignment, size) != 0) {
++ return nullptr;
++ } else {
++ return ret;
++ }
++}
++int __posix_memalign(void **ptr, size_t alignment, size_t size);
++void __free(void* ptr);
+ } // extern "C"
+
+ namespace {
+@@ -24,32 +34,32 @@ namespace {
+ using base::allocator::AllocatorDispatch;
+
+ void* GlibcMalloc(const AllocatorDispatch*, size_t size, void* context) {
+- return __libc_malloc(size);
++ return __malloc(size);
+ }
+
+ void* GlibcCalloc(const AllocatorDispatch*,
+ size_t n,
+ size_t size,
+ void* context) {
+- return __libc_calloc(n, size);
++ return __calloc(n, size);
+ }
+
+ void* GlibcRealloc(const AllocatorDispatch*,
+ void* address,
+ size_t size,
+ void* context) {
+- return __libc_realloc(address, size);
++ return __realloc(address, size);
+ }
+
+ void* GlibcMemalign(const AllocatorDispatch*,
+ size_t alignment,
+ size_t size,
+ void* context) {
+- return __libc_memalign(alignment, size);
++ return __memalign(alignment, size);
+ }
+
+ void GlibcFree(const AllocatorDispatch*, void* address, void* context) {
+- __libc_free(address);
++ __free(address);
+ }
+
+ size_t GlibcGetSizeEstimate(const AllocatorDispatch*,
diff --git a/devel/electron7/files/patch-base_allocator_allocator__shim__override__libc__symbols.h b/devel/electron7/files/patch-base_allocator_allocator__shim__override__libc__symbols.h
new file mode 100644
index 000000000000..6aac722ab545
--- /dev/null
+++ b/devel/electron7/files/patch-base_allocator_allocator__shim__override__libc__symbols.h
@@ -0,0 +1,11 @@
+--- base/allocator/allocator_shim_override_libc_symbols.h.orig 2019-12-12 12:38:58 UTC
++++ base/allocator/allocator_shim_override_libc_symbols.h
+@@ -10,7 +10,7 @@
+ #endif
+ #define BASE_ALLOCATOR_ALLOCATOR_SHIM_OVERRIDE_LIBC_SYMBOLS_H_
+
+-#include <malloc.h>
++#include <stdlib.h>
+
+ #include "base/allocator/allocator_shim_internals.h"
+
diff --git a/devel/electron7/files/patch-base_allocator_allocator__shim__unittest.cc b/devel/electron7/files/patch-base_allocator_allocator__shim__unittest.cc
new file mode 100644
index 000000000000..922debaed2f8
--- /dev/null
+++ b/devel/electron7/files/patch-base_allocator_allocator__shim__unittest.cc
@@ -0,0 +1,36 @@
+--- base/allocator/allocator_shim_unittest.cc.orig 2019-12-12 12:38:58 UTC
++++ base/allocator/allocator_shim_unittest.cc
+@@ -348,7 +348,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
+ ASSERT_GE(aligned_allocs_intercepted_by_size[61], 1u);
+ #endif // !OS_WIN
+
+-#if !defined(OS_WIN) && !defined(OS_MACOSX)
++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ void* memalign_ptr = memalign(128, 53);
+ ASSERT_NE(nullptr, memalign_ptr);
+ ASSERT_EQ(0u, reinterpret_cast<uintptr_t>(memalign_ptr) % 128);
+@@ -361,7 +361,7 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
+ ASSERT_GE(aligned_allocs_intercepted_by_alignment[kPageSize], 1u);
+ // pvalloc rounds the size up to the next page.
+ ASSERT_GE(aligned_allocs_intercepted_by_size[kPageSize], 1u);
+-#endif // !OS_WIN && !OS_MACOSX
++#endif // !OS_WIN && !OS_MACOSX && !OS_BSD
+
+ char* realloc_ptr = static_cast<char*>(malloc(10));
+ strcpy(realloc_ptr, "foobar");
+@@ -377,13 +377,13 @@ TEST_F(AllocatorShimTest, InterceptLibcSymbols) {
+ free(zero_alloc_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(zero_alloc_ptr)], 1u);
+
+-#if !defined(OS_WIN) && !defined(OS_MACOSX)
++#if !defined(OS_WIN) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ free(memalign_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(memalign_ptr)], 1u);
+
+ free(pvalloc_ptr);
+ ASSERT_GE(frees_intercepted_by_addr[Hash(pvalloc_ptr)], 1u);
+-#endif // !OS_WIN && !OS_MACOSX
++#endif // !OS_WIN && !OS_MACOSX && !OS_BSD
+
+ #if !defined(OS_WIN)
+ free(posix_memalign_ptr);
diff --git a/devel/electron7/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h b/devel/electron7/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h
new file mode 100644
index 000000000000..a5d875eba33f
--- /dev/null
+++ b/devel/electron7/files/patch-base_allocator_partition__allocator_page__allocator__internals__posix.h
@@ -0,0 +1,11 @@
+--- base/allocator/partition_allocator/page_allocator_internals_posix.h.orig 2019-12-12 12:38:58 UTC
++++ base/allocator/partition_allocator/page_allocator_internals_posix.h
+@@ -19,7 +19,7 @@
+ #if defined(OS_ANDROID)
+ #include <sys/prctl.h>
+ #endif
+-#if defined(OS_LINUX)
++#if defined(OS_BSD) || defined(OS_LINUX)
+ #include <sys/resource.h>
+
+ #include <algorithm>
diff --git a/devel/electron7/files/patch-base_base__switches.cc b/devel/electron7/files/patch-base_base__switches.cc
new file mode 100644
index 000000000000..635b2a537404
--- /dev/null
+++ b/devel/electron7/files/patch-base_base__switches.cc
@@ -0,0 +1,20 @@
+--- base/base_switches.cc.orig 2019-12-12 12:38:58 UTC
++++ base/base_switches.cc
+@@ -117,7 +117,7 @@ const char kDisableHighResTimer[] = "disable-highres-t
+ const char kDisableUsbKeyboardDetect[] = "disable-usb-keyboard-detect";
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // The /dev/shm partition is too small in certain VM environments, causing
+ // Chrome to fail or crash (see http://crbug.com/715363). Use this flag to
+ // work-around this issue (a temporary directory will always be used to create
+@@ -138,7 +138,7 @@ const char kEnableCrashReporterForTesting[] =
+ const char kEnableReachedCodeProfiler[] = "enable-reached-code-profiler";
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Controls whether or not retired instruction counts are surfaced for threads
+ // in trace events on Linux.
+ //
diff --git a/devel/electron7/files/patch-base_base__switches.h b/devel/electron7/files/patch-base_base__switches.h
new file mode 100644
index 000000000000..4f517f709081
--- /dev/null
+++ b/devel/electron7/files/patch-base_base__switches.h
@@ -0,0 +1,20 @@
+--- base/base_switches.h.orig 2019-12-12 12:38:58 UTC
++++ base/base_switches.h
+@@ -38,7 +38,7 @@ extern const char kDisableHighResTimer[];
+ extern const char kDisableUsbKeyboardDetect[];
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ extern const char kDisableDevShmUsage[];
+ #endif
+
+@@ -51,7 +51,7 @@ extern const char kEnableReachedCodeProfiler[];
+ extern const char kOrderfileMemoryOptimization[];
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ extern const char kEnableThreadInstructionCount[];
+ #endif
+
diff --git a/devel/electron7/files/patch-base_cpu.cc b/devel/electron7/files/patch-base_cpu.cc
new file mode 100644
index 000000000000..305d0cddb866
--- /dev/null
+++ b/devel/electron7/files/patch-base_cpu.cc
@@ -0,0 +1,38 @@
+--- base/cpu.cc.orig 2019-12-12 12:38:58 UTC
++++ base/cpu.cc
+@@ -14,7 +14,7 @@
+
+ #include "base/stl_util.h"
+
+-#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
++#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD))
+ #include "base/files/file_util.h"
+ #endif
+
+@@ -135,7 +135,7 @@ uint64_t xgetbv(uint32_t xcr) {
+
+ #endif // ARCH_CPU_X86_FAMILY
+
+-#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
++#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD))
+ std::string* CpuInfoBrand() {
+ static std::string* brand = []() {
+ // This function finds the value from /proc/cpuinfo under the key "model
+@@ -165,7 +165,7 @@ std::string* CpuInfoBrand() {
+ return brand;
+ }
+ #endif // defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) ||
+- // defined(OS_LINUX))
++ // defined(OS_LINUX) || defined(OS_BSD))
+
+ } // namespace
+
+@@ -287,7 +287,7 @@ void CPU::Initialize() {
+ }
+ }
+ #elif defined(ARCH_CPU_ARM_FAMILY)
+-#if (defined(OS_ANDROID) || defined(OS_LINUX))
++#if (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD))
+ cpu_brand_ = *CpuInfoBrand();
+ #elif defined(OS_WIN)
+ // Windows makes high-resolution thread timing information available in
diff --git a/devel/electron7/files/patch-base_debug_debugger__posix.cc b/devel/electron7/files/patch-base_debug_debugger__posix.cc
new file mode 100644
index 000000000000..b0046e50c906
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_debugger__posix.cc
@@ -0,0 +1,56 @@
+--- base/debug/debugger_posix.cc.orig 2019-12-12 12:38:58 UTC
++++ base/debug/debugger_posix.cc
+@@ -90,7 +90,7 @@ bool BeingDebugged() {
+ KERN_PROC,
+ KERN_PROC_PID,
+ getpid()
+-#if defined(OS_OPENBSD)
++#if defined(OS_BSD)
+ , sizeof(struct kinfo_proc),
+ 0
+ #endif
+@@ -98,33 +98,35 @@ bool BeingDebugged() {
+
+ // Caution: struct kinfo_proc is marked __APPLE_API_UNSTABLE. The source and
+ // binary interfaces may change.
+- struct kinfo_proc info;
+- size_t info_size = sizeof(info);
++ struct kinfo_proc *info;
++ size_t info_size;
+
+-#if defined(OS_OPENBSD)
+ if (sysctl(mib, base::size(mib), NULL, &info_size, NULL, 0) < 0)
+ return -1;
+
++ info = (struct kinfo_proc *)malloc(info_size);
+ mib[5] = (info_size / sizeof(struct kinfo_proc));
+-#endif
+
+- int sysctl_result = sysctl(mib, base::size(mib), &info, &info_size, NULL, 0);
++ int sysctl_result = sysctl(mib, base::size(mib), info, &info_size, NULL, 0);
+ DCHECK_EQ(sysctl_result, 0);
+ if (sysctl_result != 0) {
+ is_set = true;
+ being_debugged = false;
+- return being_debugged;
++ goto out;
+ }
+
+ // This process is being debugged if the P_TRACED flag is set.
+ is_set = true;
+ #if defined(OS_FREEBSD)
+- being_debugged = (info.ki_flag & P_TRACED) != 0;
++ being_debugged = (info->ki_flag & P_TRACED) != 0;
+ #elif defined(OS_BSD)
+- being_debugged = (info.p_flag & P_TRACED) != 0;
++ being_debugged = (info->p_flag & P_TRACED) != 0;
+ #else
+- being_debugged = (info.kp_proc.p_flag & P_TRACED) != 0;
++ being_debugged = (info->kp_proc.p_flag & P_TRACED) != 0;
+ #endif
++
++out:
++ free(info);
+ return being_debugged;
+ }
+
diff --git a/devel/electron7/files/patch-base_debug_elf__reader.cc b/devel/electron7/files/patch-base_debug_elf__reader.cc
new file mode 100644
index 000000000000..a1b48851c3fe
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_elf__reader.cc
@@ -0,0 +1,18 @@
+--- base/debug/elf_reader.cc.orig 2019-12-12 12:38:58 UTC
++++ base/debug/elf_reader.cc
+@@ -83,6 +83,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
+ reinterpret_cast<const Nhdr*>(elf_base + header.p_vaddr);
+ bool found = false;
+ while (current_note < section_end) {
++#if !defined(OS_BSD)
+ if (current_note->n_type == NT_GNU_BUILD_ID) {
+ const char* note_name =
+ reinterpret_cast<const char*>(current_note) + sizeof(Nhdr);
+@@ -92,6 +93,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base,
+ break;
+ }
+ }
++#endif
+
+ current_note = reinterpret_cast<const Nhdr*>(
+ reinterpret_cast<const char*>(current_note) + sizeof(Nhdr) +
diff --git a/devel/electron7/files/patch-base_debug_proc__maps__linux.cc b/devel/electron7/files/patch-base_debug_proc__maps__linux.cc
new file mode 100644
index 000000000000..f24eec2dcde6
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_proc__maps__linux.cc
@@ -0,0 +1,11 @@
+--- base/debug/proc_maps_linux.cc.orig 2019-12-12 12:38:58 UTC
++++ base/debug/proc_maps_linux.cc
+@@ -12,7 +12,7 @@
+ #include "base/strings/string_split.h"
+ #include "build/build_config.h"
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_BSD) || defined(OS_ANDROID)
+ #include <inttypes.h>
+ #endif
+
diff --git a/devel/electron7/files/patch-base_debug_stack__trace.cc b/devel/electron7/files/patch-base_debug_stack__trace.cc
new file mode 100644
index 000000000000..7a20a4a2ddfe
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_stack__trace.cc
@@ -0,0 +1,11 @@
+--- base/debug/stack_trace.cc.orig 2019-12-12 12:38:58 UTC
++++ base/debug/stack_trace.cc
+@@ -14,7 +14,7 @@
+
+ #if BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ #include <pthread.h>
+ #include "base/process/process_handle.h"
+ #include "base/threading/platform_thread.h"
diff --git a/devel/electron7/files/patch-base_debug_stack__trace.h b/devel/electron7/files/patch-base_debug_stack__trace.h
new file mode 100644
index 000000000000..20ed00e051eb
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_stack__trace.h
@@ -0,0 +1,10 @@
+--- base/debug/stack_trace.h.orig 2019-12-12 12:38:58 UTC
++++ base/debug/stack_trace.h
+@@ -19,6 +19,7 @@
+ #if !defined(OS_NACL)
+ #include <signal.h>
+ #endif
++#include <sys/stdint.h>
+ #include <unistd.h>
+ #endif
+
diff --git a/devel/electron7/files/patch-base_debug_stack__trace__posix.cc b/devel/electron7/files/patch-base_debug_stack__trace__posix.cc
new file mode 100644
index 000000000000..44ab3dd9143c
--- /dev/null
+++ b/devel/electron7/files/patch-base_debug_stack__trace__posix.cc
@@ -0,0 +1,31 @@
+--- base/debug/stack_trace_posix.cc.orig 2019-12-12 12:38:58 UTC
++++ base/debug/stack_trace_posix.cc
+@@ -35,7 +35,7 @@
+ #include <AvailabilityMacros.h>
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/debug/proc_maps_linux.h"
+ #endif
+
+@@ -657,6 +657,11 @@ class SandboxSymbolizeHelper {
+ // for the modules that are loaded in the current process.
+ // Returns true on success.
+ bool CacheMemoryRegions() {
++#if defined(OS_BSD)
++ // TODO (rene) avoid link error, implement something?
++ NOTIMPLEMENTED();
++ return false;
++#else
+ // Reads /proc/self/maps.
+ std::string contents;
+ if (!ReadProcMaps(&contents)) {
+@@ -674,6 +679,7 @@ class SandboxSymbolizeHelper {
+
+ is_initialized_ = true;
+ return true;
++#endif
+ }
+
+ // Opens all object files and caches their file descriptors.
diff --git a/devel/electron7/files/patch-base_files_file__path__unittest.cc b/devel/electron7/files/patch-base_files_file__path__unittest.cc
new file mode 100644
index 000000000000..4b6958a54e3a
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__path__unittest.cc
@@ -0,0 +1,11 @@
+--- base/files/file_path_unittest.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_path_unittest.cc
+@@ -1139,7 +1139,7 @@ TEST_F(FilePathTest, FromUTF8Unsafe_And_AsUTF8Unsafe)
+ "\xEF\xBC\xA1\xEF\xBC\xA2\xEF\xBC\xA3.txt" },
+ };
+
+-#if !defined(SYSTEM_NATIVE_UTF8) && defined(OS_LINUX)
++#if !defined(SYSTEM_NATIVE_UTF8) && (defined(OS_LINUX) || defined(OS_BSD))
+ ScopedLocale locale("en_US.UTF-8");
+ #endif
+
diff --git a/devel/electron7/files/patch-base_files_file__path__watcher.cc b/devel/electron7/files/patch-base_files_file__path__watcher.cc
new file mode 100644
index 000000000000..2c442d175aeb
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__path__watcher.cc
@@ -0,0 +1,11 @@
+--- base/files/file_path_watcher.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_path_watcher.cc
+@@ -20,7 +20,7 @@ FilePathWatcher::~FilePathWatcher() {
+ // static
+ bool FilePathWatcher::RecursiveWatchAvailable() {
+ #if (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_WIN) || \
+- defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
++ defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ return true;
+ #else
+ // FSEvents isn't available on iOS.
diff --git a/devel/electron7/files/patch-base_files_file__path__watcher__kqueue.h b/devel/electron7/files/patch-base_files_file__path__watcher__kqueue.h
new file mode 100644
index 000000000000..78060fe54644
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__path__watcher__kqueue.h
@@ -0,0 +1,13 @@
+--- base/files/file_path_watcher_kqueue.h.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_path_watcher_kqueue.h
+@@ -5,6 +5,10 @@
+ #ifndef BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+ #define BASE_FILES_FILE_PATH_WATCHER_KQUEUE_H_
+
++#ifdef __FreeBSD__
++#include <sys/stdint.h>
++#include <sys/types.h>
++#endif
+ #include <sys/event.h>
+
+ #include <memory>
diff --git a/devel/electron7/files/patch-base_files_file__path__watcher__stub.cc b/devel/electron7/files/patch-base_files_file__path__watcher__stub.cc
new file mode 100644
index 000000000000..658aee57f7a7
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__path__watcher__stub.cc
@@ -0,0 +1,51 @@
+--- base/files/file_path_watcher_stub.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_path_watcher_stub.cc
+@@ -1,14 +1,15 @@
+-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
++// Copyright 2014 The Chromium Authors. All rights reserved.
+ // Use of this source code is governed by a BSD-style license that can be
+ // found in the LICENSE file.
+
+-// This file exists for Unix systems which don't have the inotify headers, and
+-// thus cannot build file_watcher_inotify.cc
+
+-#include "base/files/file_path_watcher.h"
++#include <memory>
+
++#include "base/files/file_path_watcher.h"
++#include "base/files/file_path_watcher_kqueue.h"
+ #include "base/macros.h"
+ #include "base/memory/ptr_util.h"
++#include "build/build_config.h"
+
+ namespace base {
+
+@@ -22,12 +23,26 @@ class FilePathWatcherImpl : public FilePathWatcher::Pl
+ bool Watch(const FilePath& path,
+ bool recursive,
+ const FilePathWatcher::Callback& callback) override {
+- return false;
++ DCHECK(!impl_.get());
++ if (recursive) {
++ if (!FilePathWatcher::RecursiveWatchAvailable())
++ return false;
++ } else {
++ impl_ = std::make_unique<FilePathWatcherKQueue>();
++ }
++ DCHECK(impl_.get());
++ return impl_->Watch(path, recursive, callback);
+ }
+
+- void Cancel() override {}
++ void Cancel() override {
++ if (impl_.get())
++ impl_->Cancel();
++ set_cancelled();
++ }
+
+ private:
++ std::unique_ptr<PlatformDelegate> impl_;
++
+ DISALLOW_COPY_AND_ASSIGN(FilePathWatcherImpl);
+ };
+
diff --git a/devel/electron7/files/patch-base_files_file__path__watcher__unittest.cc b/devel/electron7/files/patch-base_files_file__path__watcher__unittest.cc
new file mode 100644
index 000000000000..45c49c15af43
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__path__watcher__unittest.cc
@@ -0,0 +1,11 @@
+--- base/files/file_path_watcher_unittest.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_path_watcher_unittest.cc
+@@ -435,7 +435,7 @@ TEST_F(FilePathWatcherTest, WatchDirectory) {
+ VLOG(1) << "Waiting for file1 creation";
+ ASSERT_TRUE(WaitForEvents());
+
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+ // Mac implementation does not detect files modified in a directory.
+ ASSERT_TRUE(WriteFile(file1, "content v2"));
+ VLOG(1) << "Waiting for file1 modification";
diff --git a/devel/electron7/files/patch-base_files_file__util.h b/devel/electron7/files/patch-base_files_file__util.h
new file mode 100644
index 000000000000..1107907e3a50
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__util.h
@@ -0,0 +1,11 @@
+--- base/files/file_util.h.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_util.h
+@@ -497,7 +497,7 @@ BASE_EXPORT bool VerifyPathControlledByAdmin(const bas
+ // the directory |path|, in the number of FilePath::CharType, or -1 on failure.
+ BASE_EXPORT int GetMaximumPathComponentLength(const base::FilePath& path);
+
+-#if defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ // Broad categories of file systems as returned by statfs() on Linux.
+ enum FileSystemType {
+ FILE_SYSTEM_UNKNOWN, // statfs failed.
diff --git a/devel/electron7/files/patch-base_files_file__util__posix.cc b/devel/electron7/files/patch-base_files_file__util__posix.cc
new file mode 100644
index 000000000000..ae41eeea8c88
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_file__util__posix.cc
@@ -0,0 +1,11 @@
+--- base/files/file_util_posix.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/file_util_posix.cc
+@@ -426,7 +426,7 @@ bool CreatePipe(ScopedFD* read_fd, ScopedFD* write_fd,
+ }
+
+ bool CreateLocalNonBlockingPipe(int fds[2]) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ return pipe2(fds, O_CLOEXEC | O_NONBLOCK) == 0;
+ #else
+ int raw_fds[2];
diff --git a/devel/electron7/files/patch-base_files_scoped__file.cc b/devel/electron7/files/patch-base_files_scoped__file.cc
new file mode 100644
index 000000000000..e474c17469c3
--- /dev/null
+++ b/devel/electron7/files/patch-base_files_scoped__file.cc
@@ -0,0 +1,11 @@
+--- base/files/scoped_file.cc.orig 2019-12-12 12:38:58 UTC
++++ base/files/scoped_file.cc
+@@ -30,7 +30,7 @@ void ScopedFDCloseTraits::Free(int fd) {
+ // a single open directory would bypass the entire security model.
+ int ret = IGNORE_EINTR(close(fd));
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || \
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_FUCHSIA) || defined(OS_BSD) || \
+ defined(OS_ANDROID)
+ // NB: Some file descriptors can return errors from close() e.g. network
+ // filesystems such as NFS and Linux input devices. On Linux, macOS, and
diff --git a/devel/electron7/files/patch-base_i18n_icu__util.cc b/devel/electron7/files/patch-base_i18n_icu__util.cc
new file mode 100644
index 000000000000..36554bf60033
--- /dev/null
+++ b/devel/electron7/files/patch-base_i18n_icu__util.cc
@@ -0,0 +1,20 @@
+--- base/i18n/icu_util.cc.orig 2019-12-12 12:38:58 UTC
++++ base/i18n/icu_util.cc
+@@ -20,7 +20,7 @@
+ #include "build/build_config.h"
+ #include "third_party/icu/source/common/unicode/putil.h"
+ #include "third_party/icu/source/common/unicode/udata.h"
+-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID)
++#if (defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)) || defined(OS_ANDROID)
+ #include "third_party/icu/source/i18n/unicode/timezone.h"
+ #endif
+
+@@ -285,7 +285,7 @@ bool InitializeICU() {
+ // TODO(jungshik): Some callers do not care about tz at all. If necessary,
+ // add a boolean argument to this function to init'd the default tz only
+ // when requested.
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ if (result)
+ std::unique_ptr<icu::TimeZone> zone(icu::TimeZone::createDefault());
+ #endif
diff --git a/devel/electron7/files/patch-base_linux__util.cc b/devel/electron7/files/patch-base_linux__util.cc
new file mode 100644
index 000000000000..cf60bbe90d8c
--- /dev/null
+++ b/devel/electron7/files/patch-base_linux__util.cc
@@ -0,0 +1,18 @@
+--- base/linux_util.cc.orig 2019-12-12 12:38:58 UTC
++++ base/linux_util.cc
+@@ -90,12 +90,14 @@ char g_linux_distro[kDistroSize] =
+ "CrOS";
+ #elif defined(OS_ANDROID)
+ "Android";
++#elif defined(OS_BSD)
++ "BSD";
+ #else // if defined(OS_LINUX)
+ "Unknown";
+ #endif
+
+ std::string GetLinuxDistro() {
+-#if defined(OS_CHROMEOS) || defined(OS_ANDROID)
++#if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_BSD)
+ return g_linux_distro;
+ #elif defined(OS_LINUX)
+ LinuxDistroHelper* distro_state_singleton = LinuxDistroHelper::GetInstance();
diff --git a/devel/electron7/files/patch-base_logging__unittest.cc b/devel/electron7/files/patch-base_logging__unittest.cc
new file mode 100644
index 000000000000..eddafb8be9a1
--- /dev/null
+++ b/devel/electron7/files/patch-base_logging__unittest.cc
@@ -0,0 +1,11 @@
+--- base/logging_unittest.cc.orig 2019-12-12 12:38:58 UTC
++++ base/logging_unittest.cc
+@@ -590,7 +590,7 @@ void CheckCrashTestSighandler(int, siginfo_t* info, vo
+ // need the arch-specific boilerplate below, which is inspired by breakpad.
+ // At the same time, on OSX, ucontext.h is deprecated but si_addr works fine.
+ uintptr_t crash_addr = 0;
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ crash_addr = reinterpret_cast<uintptr_t>(info->si_addr);
+ #else // OS_POSIX && !OS_MACOSX
+ ucontext_t* context = reinterpret_cast<ucontext_t*>(context_ptr);
diff --git a/devel/electron7/files/patch-base_memory_platform__shared__memory__region.h b/devel/electron7/files/patch-base_memory_platform__shared__memory__region.h
new file mode 100644
index 000000000000..8423436755c4
--- /dev/null
+++ b/devel/electron7/files/patch-base_memory_platform__shared__memory__region.h
@@ -0,0 +1,29 @@
+--- base/memory/platform_shared_memory_region.h.orig 2019-12-12 12:38:59 UTC
++++ base/memory/platform_shared_memory_region.h
+@@ -28,7 +28,7 @@
+ #include "base/files/scoped_file.h"
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ namespace content {
+ class SandboxIPCHandler;
+ }
+@@ -122,7 +122,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion {
+ kMaxValue = GET_SHMEM_TEMP_DIR_FAILURE
+ };
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Structure to limit access to executable region creation.
+ struct ExecutableRegion {
+ private:
+@@ -276,7 +276,7 @@ class BASE_EXPORT PlatformSharedMemoryRegion {
+ CheckPlatformHandlePermissionsCorrespondToMode);
+ static PlatformSharedMemoryRegion Create(Mode mode,
+ size_t size
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ ,
+ bool executable = false
+ #endif
diff --git a/devel/electron7/files/patch-base_memory_platform__shared__memory__region__posix.cc b/devel/electron7/files/patch-base_memory_platform__shared__memory__region__posix.cc
new file mode 100644
index 000000000000..b203930fa652
--- /dev/null
+++ b/devel/electron7/files/patch-base_memory_platform__shared__memory__region__posix.cc
@@ -0,0 +1,38 @@
+--- base/memory/platform_shared_memory_region_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/memory/platform_shared_memory_region_posix.cc
+@@ -76,7 +76,7 @@ FDPair ScopedFDPair::get() const {
+ return {fd.get(), readonly_fd.get()};
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // static
+ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion::CreateFD(size_t size) {
+ PlatformSharedMemoryRegion region =
+@@ -85,7 +85,7 @@ ScopedFD PlatformSharedMemoryRegion::ExecutableRegion:
+ return region.PassPlatformHandle().fd;
+ return ScopedFD();
+ }
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ // static
+ PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Take(
+@@ -224,7 +224,7 @@ bool PlatformSharedMemoryRegion::MapAtInternal(off_t o
+ // static
+ PlatformSharedMemoryRegion PlatformSharedMemoryRegion::Create(Mode mode,
+ size_t size
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ ,
+ bool executable
+ #endif
+@@ -255,7 +255,7 @@ PlatformSharedMemoryRegion PlatformSharedMemoryRegion:
+ // flag.
+ FilePath directory;
+ if (!GetShmemTempDir(
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ executable,
+ #else
+ false /* executable */,
diff --git a/devel/electron7/files/patch-base_memory_protected__memory__posix.cc b/devel/electron7/files/patch-base_memory_protected__memory__posix.cc
new file mode 100644
index 000000000000..98657482ccd8
--- /dev/null
+++ b/devel/electron7/files/patch-base_memory_protected__memory__posix.cc
@@ -0,0 +1,31 @@
+--- base/memory/protected_memory_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/memory/protected_memory_posix.cc
+@@ -8,9 +8,9 @@
+ #include <sys/mman.h>
+ #include <unistd.h>
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include <sys/resource.h>
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_MACOSX) && !defined(OS_IOS)
+ #include <mach/mach.h>
+@@ -44,7 +44,7 @@ bool AutoWritableMemory::SetMemoryReadOnly(void* start
+ return SetMemory(start, end, PROT_READ);
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ void AssertMemoryIsReadOnly(const void* ptr) {
+ #if DCHECK_IS_ON()
+ const uintptr_t page_mask = ~(base::GetPageSize() - 1);
+@@ -74,6 +74,6 @@ void AssertMemoryIsReadOnly(const void* ptr) {
+ DCHECK_EQ(region_info.protection, VM_PROT_READ);
+ #endif // DCHECK_IS_ON()
+ }
+-#endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS))
++#endif // defined(OS_LINUX) || (defined(OS_MACOSX) && !defined(OS_IOS)) || defined(OS_BSD)
+
+ } // namespace base
diff --git a/devel/electron7/files/patch-base_native__library__posix.cc b/devel/electron7/files/patch-base_native__library__posix.cc
new file mode 100644
index 000000000000..8fd0f6f1b026
--- /dev/null
+++ b/devel/electron7/files/patch-base_native__library__posix.cc
@@ -0,0 +1,11 @@
+--- base/native_library_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/native_library_posix.cc
+@@ -29,7 +29,7 @@ NativeLibrary LoadNativeLibraryWithOptions(const FileP
+ // http://crbug.com/17943, http://crbug.com/17557, http://crbug.com/36892,
+ // and http://crbug.com/40794.
+ int flags = RTLD_LAZY;
+-#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND)
++#if defined(OS_ANDROID) || !defined(RTLD_DEEPBIND) || defined(OS_BSD)
+ // Certain platforms don't define RTLD_DEEPBIND. Android dlopen() requires
+ // further investigation, as it might vary across versions. Crash here to
+ // warn developers that they're trying to rely on uncertain behavior.
diff --git a/devel/electron7/files/patch-base_native__library__unittest.cc b/devel/electron7/files/patch-base_native__library__unittest.cc
new file mode 100644
index 000000000000..96c08fe82e29
--- /dev/null
+++ b/devel/electron7/files/patch-base_native__library__unittest.cc
@@ -0,0 +1,11 @@
+--- base/native_library_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/native_library_unittest.cc
+@@ -120,7 +120,7 @@ TEST(NativeLibraryTest, LoadLibrary) {
+ // Android dlopen() requires further investigation, as it might vary across
+ // versions with respect to symbol resolution scope.
+ // TSan and MSan error out on RTLD_DEEPBIND, https://crbug.com/705255
+-#if !defined(OS_ANDROID) && !defined(THREAD_SANITIZER) && \
++#if !defined(OS_ANDROID) && !defined(OS_BSD) && !defined(THREAD_SANITIZER) && \
+ !defined(MEMORY_SANITIZER)
+
+ // Verifies that the |prefer_own_symbols| option satisfies its guarantee that
diff --git a/devel/electron7/files/patch-base_numerics_safe__math__shared__impl.h b/devel/electron7/files/patch-base_numerics_safe__math__shared__impl.h
new file mode 100644
index 000000000000..652624923dd6
--- /dev/null
+++ b/devel/electron7/files/patch-base_numerics_safe__math__shared__impl.h
@@ -0,0 +1,12 @@
+--- base/numerics/safe_math_shared_impl.h.orig 2019-12-12 12:38:59 UTC
++++ base/numerics/safe_math_shared_impl.h
+@@ -23,8 +23,7 @@
+ // Where available use builtin math overflow support on Clang and GCC.
+ #elif !defined(__native_client__) && \
+ ((defined(__clang__) && \
+- ((__clang_major__ > 3) || \
+- (__clang_major__ == 3 && __clang_minor__ >= 4))) || \
++ (__clang_major__ > 6)) || \
+ (defined(__GNUC__) && __GNUC__ >= 5))
+ #include "base/numerics/safe_math_clang_gcc_impl.h"
+ #define BASE_HAS_OPTIMIZED_SAFE_MATH (1)
diff --git a/devel/electron7/files/patch-base_posix_can__lower__nice__to.cc b/devel/electron7/files/patch-base_posix_can__lower__nice__to.cc
new file mode 100644
index 000000000000..74f3db3bf710
--- /dev/null
+++ b/devel/electron7/files/patch-base_posix_can__lower__nice__to.cc
@@ -0,0 +1,20 @@
+--- base/posix/can_lower_nice_to.cc.orig 2019-12-12 12:38:59 UTC
++++ base/posix/can_lower_nice_to.cc
+@@ -31,6 +31,9 @@ bool CanLowerNiceTo(int nice_value) {
+ if (geteuid() == 0)
+ return true;
+
++#if defined(OS_BSD)
++ return false;
++#else
+ // 2. Skip checking the CAP_SYS_NICE permission because it would require
+ // libcap.so.
+
+@@ -54,6 +57,7 @@ bool CanLowerNiceTo(int nice_value) {
+ // And lowering niceness to |nice_value| is allowed if it is greater than or
+ // equal to the limit:
+ return nice_value >= lowest_nice_allowed;
++#endif
+ }
+
+ } // namespace internal
diff --git a/devel/electron7/files/patch-base_posix_unix__domain__socket.cc b/devel/electron7/files/patch-base_posix_unix__domain__socket.cc
new file mode 100644
index 000000000000..58d72a4930bf
--- /dev/null
+++ b/devel/electron7/files/patch-base_posix_unix__domain__socket.cc
@@ -0,0 +1,49 @@
+--- base/posix/unix_domain_socket.cc.orig 2019-12-12 12:38:59 UTC
++++ base/posix/unix_domain_socket.cc
+@@ -5,7 +5,10 @@
+ #include "base/posix/unix_domain_socket.h"
+
+ #include <errno.h>
++#include <sys/param.h>
+ #include <sys/socket.h>
++#include <sys/types.h>
++#include <sys/ucred.h>
+ #if !defined(OS_NACL_NONSFI)
+ #include <sys/un.h>
+ #endif
+@@ -28,6 +31,14 @@ namespace base {
+
+ const size_t UnixDomainSocket::kMaxFileDescriptors = 16;
+
++#ifndef SCM_CREDENTIALS
++# define SCM_CREDENTIALS 0x9001
++#endif
++
++#ifndef SO_PASSCRED
++# define SO_PASSCRED 0x9002
++#endif
++
+ #if !defined(OS_NACL_NONSFI)
+ bool CreateSocketPair(ScopedFD* one, ScopedFD* two) {
+ int raw_socks[2];
+@@ -150,7 +161,7 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
+ #if !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
+ // The PNaCl toolchain for Non-SFI binary build and macOS do not support
+ // ucred. macOS supports xucred, but this structure is insufficient.
+- + CMSG_SPACE(sizeof(struct ucred))
++ + CMSG_SPACE(sizeof(struct cmsgcred))
+ #endif // OS_NACL_NONSFI or OS_MACOSX
+ ;
+ char control_buffer[kControlBufferSize];
+@@ -180,9 +191,9 @@ ssize_t UnixDomainSocket::RecvMsgWithFlags(int fd,
+ // SCM_CREDENTIALS.
+ if (cmsg->cmsg_level == SOL_SOCKET &&
+ cmsg->cmsg_type == SCM_CREDENTIALS) {
+- DCHECK_EQ(payload_len, sizeof(struct ucred));
++ DCHECK_EQ(payload_len, sizeof(struct cmsgcred));
+ DCHECK_EQ(pid, -1);
+- pid = reinterpret_cast<struct ucred*>(CMSG_DATA(cmsg))->pid;
++ pid = getpid();
+ }
+ #endif // !defined(OS_NACL_NONSFI) && !defined(OS_MACOSX)
+ }
diff --git a/devel/electron7/files/patch-base_posix_unix__domain__socket__unittest.cc b/devel/electron7/files/patch-base_posix_unix__domain__socket__unittest.cc
new file mode 100644
index 000000000000..2d83f7b43fbf
--- /dev/null
+++ b/devel/electron7/files/patch-base_posix_unix__domain__socket__unittest.cc
@@ -0,0 +1,12 @@
+--- base/posix/unix_domain_socket_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/posix/unix_domain_socket_unittest.cc
+@@ -8,6 +8,9 @@
+ #include <stdint.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#if defined(OS_BSD)
++#include <signal.h>
++#endif
+ #include <unistd.h>
+
+ #include "base/bind.h"
diff --git a/devel/electron7/files/patch-base_process_internal__linux.cc b/devel/electron7/files/patch-base_process_internal__linux.cc
new file mode 100644
index 000000000000..70ed99e68b10
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_internal__linux.cc
@@ -0,0 +1,16 @@
+--- base/process/internal_linux.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/internal_linux.cc
+@@ -60,10 +60,13 @@ bool ReadProcFile(const FilePath& file, std::string* b
+ // Synchronously reading files in /proc is safe.
+ ThreadRestrictions::ScopedAllowIO allow_io;
+
++#if !defined(OS_BSD)
+ if (!ReadFileToString(file, buffer)) {
+ DLOG(WARNING) << "Failed to read " << file.MaybeAsASCII();
+ return false;
+ }
++#endif
++
+ return !buffer->empty();
+ }
+
diff --git a/devel/electron7/files/patch-base_process_internal__linux.h b/devel/electron7/files/patch-base_process_internal__linux.h
new file mode 100644
index 000000000000..ebbb7cfed0e4
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_internal__linux.h
@@ -0,0 +1,11 @@
+--- base/process/internal_linux.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/internal_linux.h
+@@ -14,6 +14,8 @@
+
+ #include "base/files/file_path.h"
+
++#include <unistd.h> /* pid_t */
++
+ namespace base {
+
+ class Time;
diff --git a/devel/electron7/files/patch-base_process_kill.h b/devel/electron7/files/patch-base_process_kill.h
new file mode 100644
index 000000000000..a40eaf78358c
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_kill.h
@@ -0,0 +1,16 @@
+--- base/process/kill.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/kill.h
+@@ -111,11 +111,11 @@ BASE_EXPORT TerminationStatus GetTerminationStatus(Pro
+ BASE_EXPORT TerminationStatus GetKnownDeadTerminationStatus(
+ ProcessHandle handle, int* exit_code);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Spawns a thread to wait asynchronously for the child |process| to exit
+ // and then reaps it.
+ BASE_EXPORT void EnsureProcessGetsReaped(Process process);
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ #endif // defined(OS_POSIX)
+
+ // Registers |process| to be asynchronously monitored for termination, forcibly
diff --git a/devel/electron7/files/patch-base_process_kill__posix.cc b/devel/electron7/files/patch-base_process_kill__posix.cc
new file mode 100644
index 000000000000..3f23896a31ed
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_kill__posix.cc
@@ -0,0 +1,20 @@
+--- base/process/kill_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/kill_posix.cc
+@@ -168,7 +168,7 @@ void EnsureProcessTerminated(Process process) {
+ 0, new BackgroundReaper(std::move(process), TimeDelta::FromSeconds(2)));
+ }
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ void EnsureProcessGetsReaped(Process process) {
+ DCHECK(!process.is_current());
+
+@@ -179,7 +179,7 @@ void EnsureProcessGetsReaped(Process process) {
+ PlatformThread::CreateNonJoinable(
+ 0, new BackgroundReaper(std::move(process), TimeDelta()));
+ }
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ #endif // !defined(OS_MACOSX)
+ #endif // !defined(OS_NACL_NONSFI)
diff --git a/devel/electron7/files/patch-base_process_launch.cc b/devel/electron7/files/patch-base_process_launch.cc
new file mode 100644
index 000000000000..5d2612677510
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_launch.cc
@@ -0,0 +1,11 @@
+--- base/process/launch.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/launch.cc
+@@ -15,7 +15,7 @@ LaunchOptions::~LaunchOptions() = default;
+
+ LaunchOptions LaunchOptionsForTest() {
+ LaunchOptions options;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // To prevent accidental privilege sharing to an untrusted child, processes
+ // are started with PR_SET_NO_NEW_PRIVS. Do not set that here, since this
+ // new child will be used for testing only.
diff --git a/devel/electron7/files/patch-base_process_launch.h b/devel/electron7/files/patch-base_process_launch.h
new file mode 100644
index 000000000000..5820538410e1
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_launch.h
@@ -0,0 +1,20 @@
+--- base/process/launch.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/launch.h
+@@ -181,7 +181,7 @@ struct BASE_EXPORT LaunchOptions {
+ bool clear_environment = false;
+ #endif // OS_WIN || OS_POSIX || OS_FUCHSIA
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // If non-zero, start the process using clone(), using flags as provided.
+ // Unlike in clone, clone_flags may not contain a custom termination signal
+ // that is sent to the parent when the child dies. The termination signal will
+@@ -194,7 +194,7 @@ struct BASE_EXPORT LaunchOptions {
+
+ // Sets parent process death signal to SIGKILL.
+ bool kill_on_parent_death = false;
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_MACOSX) && !defined(OS_IOS)
+ // Mach ports that will be accessible to the child process. These are not
diff --git a/devel/electron7/files/patch-base_process_launch__posix.cc b/devel/electron7/files/patch-base_process_launch__posix.cc
new file mode 100644
index 000000000000..83fbcd8b3b04
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_launch__posix.cc
@@ -0,0 +1,10 @@
+--- base/process/launch_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/launch_posix.cc
+@@ -65,6 +65,7 @@
+ #error "macOS should use launch_mac.cc"
+ #endif
+
++#pragma weak environ
+ extern char** environ;
+
+ namespace base {
diff --git a/devel/electron7/files/patch-base_process_memory.cc b/devel/electron7/files/patch-base_process_memory.cc
new file mode 100644
index 000000000000..16233a9e8e30
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_memory.cc
@@ -0,0 +1,20 @@
+--- base/process/memory.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/memory.cc
+@@ -10,7 +10,7 @@
+ namespace base {
+
+ // Defined in memory_win.cc for Windows.
+-#if !defined(OS_WIN)
++#if !defined(OS_WIN) && !defined(OS_BSD)
+
+ namespace {
+
+@@ -31,7 +31,7 @@ void TerminateBecauseOutOfMemory(size_t size) {
+ #endif
+
+ // Defined in memory_mac.mm for Mac.
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+
+ bool UncheckedCalloc(size_t num_items, size_t size, void** result) {
+ const size_t alloc_size = num_items * size;
diff --git a/devel/electron7/files/patch-base_process_memory.h b/devel/electron7/files/patch-base_process_memory.h
new file mode 100644
index 000000000000..31ec96bed7ed
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_memory.h
@@ -0,0 +1,11 @@
+--- base/process/memory.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/memory.h
+@@ -24,7 +24,7 @@ BASE_EXPORT void EnableTerminationOnOutOfMemory();
+ // Crash reporting classifies such crashes as OOM.
+ BASE_EXPORT void TerminateBecauseOutOfMemory(size_t size);
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ BASE_EXPORT extern size_t g_oom_size;
+
+ // The maximum allowed value for the OOM score.
diff --git a/devel/electron7/files/patch-base_process_memory__unittest.cc b/devel/electron7/files/patch-base_process_memory__unittest.cc
new file mode 100644
index 000000000000..fae63fb49bf7
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_memory__unittest.cc
@@ -0,0 +1,18 @@
+--- base/process/memory_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/memory_unittest.cc
+@@ -104,7 +104,7 @@ TEST(MemoryTest, AllocatorShimWorking) {
+ // OpenBSD does not support these tests. Don't test these on ASan/TSan/MSan
+ // configurations: only test the real allocator.
+ // Windows only supports these tests with the allocator shim in place.
+-#if !defined(OS_OPENBSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \
++#if !defined(OS_BSD) && BUILDFLAG(USE_ALLOCATOR_SHIM) && \
+ !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
+
+ namespace {
+@@ -527,5 +527,5 @@ TEST_F(OutOfMemoryHandledTest, UncheckedCalloc) {
+ EXPECT_FALSE(base::UncheckedCalloc(1, test_size_, &value_));
+ EXPECT_TRUE(value_ == nullptr);
+ }
+-#endif // !defined(OS_OPENBSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
++#endif // !defined(OS_BSD) && BUILDFLAG(ENABLE_WIN_ALLOCATOR_SHIM_TESTS) &&
+ // !defined(MEMORY_TOOL_REPLACES_ALLOCATOR)
diff --git a/devel/electron7/files/patch-base_process_process__handle.cc b/devel/electron7/files/patch-base_process_process__handle.cc
new file mode 100644
index 000000000000..c4575276fab2
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__handle.cc
@@ -0,0 +1,11 @@
+--- base/process/process_handle.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_handle.cc
+@@ -28,7 +28,7 @@ UniqueProcId GetUniqueIdForProcess() {
+ : UniqueProcId(GetCurrentProcId());
+ }
+
+-#if defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+
+ void InitUniqueIdForProcessInPidNamespace(ProcessId pid_outside_of_namespace) {
+ DCHECK(pid_outside_of_namespace != kNullProcessId);
diff --git a/devel/electron7/files/patch-base_process_process__handle.h b/devel/electron7/files/patch-base_process_process__handle.h
new file mode 100644
index 000000000000..638951f20779
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__handle.h
@@ -0,0 +1,11 @@
+--- base/process/process_handle.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_handle.h
+@@ -103,7 +103,7 @@ BASE_EXPORT ProcessId GetCurrentProcId();
+ // processes may be reused.
+ BASE_EXPORT UniqueProcId GetUniqueIdForProcess();
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // When a process is started in a different PID namespace from the browser
+ // process, this function must be called with the process's PID in the browser's
+ // PID namespace in order to initialize its unique ID. Not thread safe.
diff --git a/devel/electron7/files/patch-base_process_process__handle__freebsd.cc b/devel/electron7/files/patch-base_process_process__handle__freebsd.cc
new file mode 100644
index 000000000000..9f9ae3afd626
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__handle__freebsd.cc
@@ -0,0 +1,17 @@
+--- base/process/process_handle_freebsd.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_handle_freebsd.cc
+@@ -16,10 +16,13 @@ namespace base {
+
+ ProcessId GetParentProcessId(ProcessHandle process) {
+ struct kinfo_proc info;
+- size_t length;
++ size_t length = sizeof(struct kinfo_proc);
+ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, process };
+
+ if (sysctl(mib, base::size(mib), &info, &length, NULL, 0) < 0)
++ return -1;
++
++ if (length < sizeof(struct kinfo_proc))
+ return -1;
+
+ return info.ki_ppid;
diff --git a/devel/electron7/files/patch-base_process_process__iterator__freebsd.cc b/devel/electron7/files/patch-base_process_process__iterator__freebsd.cc
new file mode 100644
index 000000000000..42a706175d6e
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__iterator__freebsd.cc
@@ -0,0 +1,44 @@
+--- base/process/process_iterator_freebsd.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_iterator_freebsd.cc
+@@ -10,6 +10,10 @@
+ #include <sys/sysctl.h>
+ #include <unistd.h>
+
++/* getuid() */
++#include <unistd.h>
++#include <sys/types.h>
++
+ #include "base/logging.h"
+ #include "base/stl_util.h"
+ #include "base/strings/string_split.h"
+@@ -40,7 +44,7 @@ ProcessIterator::ProcessIterator(const ProcessFilter*
+ num_of_kinfo_proc += 16;
+ kinfo_procs_.resize(num_of_kinfo_proc);
+ len = num_of_kinfo_proc * sizeof(struct kinfo_proc);
+- if (sysctl(mib, base::size(mib), &kinfo_procs_[0], &len, NULL, 0) < 0) {
++ if (sysctl(mib, base::size(mib), kinfo_procs_.data(), &len, NULL, 0) < 0) {
+ // If we get a mem error, it just means we need a bigger buffer, so
+ // loop around again. Anything else is a real error and give up.
+ if (errno != ENOMEM) {
+@@ -72,18 +76,13 @@ bool ProcessIterator::CheckForNextProcess() {
+ for (; index_of_kinfo_proc_ < kinfo_procs_.size(); ++index_of_kinfo_proc_) {
+ size_t length;
+ struct kinfo_proc kinfo = kinfo_procs_[index_of_kinfo_proc_];
+- int mib[] = { CTL_KERN, KERN_PROC_ARGS, kinfo.ki_pid };
++ int mib[] = { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, kinfo.ki_pid };
+
+ if ((kinfo.ki_pid > 0) && (kinfo.ki_stat == SZOMB))
+ continue;
+
+- length = 0;
+- if (sysctl(mib, base::size(mib), NULL, &length, NULL, 0) < 0) {
+- LOG(ERROR) << "failed to figure out the buffer size for a command line";
+- continue;
+- }
+-
+- data.resize(length);
++ data.resize(ARG_MAX);
++ length = ARG_MAX;
+
+ if (sysctl(mib, base::size(mib), &data[0], &length, NULL, 0) < 0) {
+ LOG(ERROR) << "failed to fetch a commandline";
diff --git a/devel/electron7/files/patch-base_process_process__linux.cc b/devel/electron7/files/patch-base_process_process__linux.cc
new file mode 100644
index 000000000000..c021feafba53
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__linux.cc
@@ -0,0 +1,18 @@
+--- base/process/process_linux.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_linux.cc
+@@ -88,6 +88,7 @@ Time Process::CreationTime() const {
+ return Time(boot_time + start_offset);
+ }
+
++#if !defined(OS_BSD)
+ // static
+ bool Process::CanBackgroundProcesses() {
+ #if defined(OS_CHROMEOS)
+@@ -139,6 +140,7 @@ bool Process::SetProcessBackgrounded(bool background)
+ DPCHECK(result == 0);
+ return result == 0;
+ }
++#endif // !defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ bool IsProcessBackgroundedCGroup(const StringPiece& cgroup_contents) {
diff --git a/devel/electron7/files/patch-base_process_process__metrics.cc b/devel/electron7/files/patch-base_process_process__metrics.cc
new file mode 100644
index 000000000000..7c4300cb8b76
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__metrics.cc
@@ -0,0 +1,38 @@
+--- base/process/process_metrics.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_metrics.cc
+@@ -57,7 +57,7 @@ SystemMetrics SystemMetrics::Sample() {
+ SystemMetrics system_metrics;
+
+ system_metrics.committed_memory_ = GetSystemCommitCharge();
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ GetSystemMemoryInfo(&system_metrics.memory_info_);
+ GetVmStatInfo(&system_metrics.vmstat_info_);
+ GetSystemDiskInfo(&system_metrics.disk_info_);
+@@ -75,7 +75,7 @@ std::unique_ptr<Value> SystemMetrics::ToValue() const
+ std::unique_ptr<DictionaryValue> res(new DictionaryValue());
+
+ res->SetIntKey("committed_memory", static_cast<int>(committed_memory_));
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ std::unique_ptr<DictionaryValue> meminfo = memory_info_.ToValue();
+ std::unique_ptr<DictionaryValue> vmstat = vmstat_info_.ToValue();
+ meminfo->MergeDictionary(vmstat.get());
+@@ -126,7 +126,7 @@ double ProcessMetrics::GetPlatformIndependentCPUUsage(
+ }
+ #endif
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ int ProcessMetrics::CalculateIdleWakeupsPerSecond(
+ uint64_t absolute_idle_wakeups) {
+ return CalculateEventsPerSecond(absolute_idle_wakeups,
+@@ -138,7 +138,7 @@ int ProcessMetrics::GetIdleWakeupsPerSecond() {
+ NOTIMPLEMENTED(); // http://crbug.com/120488
+ return 0;
+ }
+-#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+
+ #if defined(OS_MACOSX)
+ int ProcessMetrics::CalculatePackageIdleWakeupsPerSecond(
diff --git a/devel/electron7/files/patch-base_process_process__metrics.h b/devel/electron7/files/patch-base_process_process__metrics.h
new file mode 100644
index 000000000000..ed6b4dcfba2c
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__metrics.h
@@ -0,0 +1,131 @@
+--- base/process/process_metrics.h.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_metrics.h
+@@ -41,7 +41,7 @@ namespace base {
+ // Full declaration is in process_metrics_iocounters.h.
+ struct IoCounters;
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ // Minor and major page fault counts since the process creation.
+ // Both counts are process-wide, and exclude child processes.
+ //
+@@ -51,7 +51,7 @@ struct PageFaultCounts {
+ int64_t minor;
+ int64_t major;
+ };
+-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+
+ // Convert a POSIX timeval to microseconds.
+ BASE_EXPORT int64_t TimeValToMicroseconds(const struct timeval& tv);
+@@ -92,7 +92,7 @@ class BASE_EXPORT ProcessMetrics {
+ // convenience wrapper for CreateProcessMetrics().
+ static std::unique_ptr<ProcessMetrics> CreateCurrentProcessMetrics();
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ // Resident Set Size is a Linux/Android specific memory concept. Do not
+ // attempt to extend this to other platforms.
+ BASE_EXPORT size_t GetResidentSetSize() const;
+@@ -172,14 +172,14 @@ class BASE_EXPORT ProcessMetrics {
+ int GetOpenFdSoftLimit() const;
+ #endif // defined(OS_POSIX)
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ // Bytes of swap as reported by /proc/[pid]/status.
+ uint64_t GetVmSwapBytes() const;
+
+ // Minor and major page fault count as reported by /proc/[pid]/stat.
+ // Returns true for success.
+ bool GetPageFaultCounts(PageFaultCounts* counts) const;
+-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+
+ // Returns total memory usage of malloc.
+ size_t GetMallocUsage();
+@@ -191,7 +191,7 @@ class BASE_EXPORT ProcessMetrics {
+ ProcessMetrics(ProcessHandle process, PortProvider* port_provider);
+ #endif // !defined(OS_MACOSX) || defined(OS_IOS)
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ int CalculateIdleWakeupsPerSecond(uint64_t absolute_idle_wakeups);
+ #endif
+ #if defined(OS_MACOSX)
+@@ -220,7 +220,7 @@ class BASE_EXPORT ProcessMetrics {
+ // Number of bytes transferred to/from disk in bytes.
+ uint64_t last_cumulative_disk_usage_ = 0;
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ // Same thing for idle wakeups.
+ TimeTicks last_idle_wakeups_time_;
+ uint64_t last_absolute_idle_wakeups_;
+@@ -271,7 +271,7 @@ BASE_EXPORT size_t GetHandleLimit();
+ BASE_EXPORT void IncreaseFdLimitTo(unsigned int max_descriptors);
+ #endif // defined(OS_POSIX)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA)
+ // Data about system-wide memory consumption. Values are in KB. Available on
+ // Windows, Mac, Linux, Android and Chrome OS.
+@@ -305,7 +305,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ int avail_phys = 0;
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ // This provides an estimate of available memory as described here:
+ // https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=34e431b0ae398fc54ea69ff85ec700722c9da773
+ // NOTE: this is ONLY valid in kernels 3.14 and up. Its value will always
+@@ -319,7 +319,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ int swap_free = 0;
+ #endif
+
+-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || \
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) || \
+ defined(OS_FUCHSIA)
+ int buffers = 0;
+ int cached = 0;
+@@ -329,7 +329,7 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ int inactive_file = 0;
+ int dirty = 0;
+ int reclaimable = 0;
+-#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) ||
++#endif // defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD) ||
+ // defined(OS_FUCHSIA)
+
+ #if defined(OS_CHROMEOS)
+@@ -355,10 +355,10 @@ struct BASE_EXPORT SystemMemoryInfoKB {
+ // Exposed for memory debugging widget.
+ BASE_EXPORT bool GetSystemMemoryInfo(SystemMemoryInfoKB* meminfo);
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ // defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_FUCHSIA)
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ // Parse the data found in /proc/<pid>/stat and return the sum of the
+ // CPU-related ticks. Returns -1 on parse error.
+ // Exposed for testing.
+@@ -431,7 +431,7 @@ BASE_EXPORT bool GetSystemDiskInfo(SystemDiskInfo* dis
+ // Returns the amount of time spent in user space since boot across all CPUs.
+ BASE_EXPORT TimeDelta GetUserCpuTimeSinceBoot();
+
+-#endif // defined(OS_LINUX) || defined(OS_ANDROID)
++#endif // defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ // Data from files in directory /sys/block/zram0 about ZRAM usage.
+@@ -526,7 +526,7 @@ class BASE_EXPORT SystemMetrics {
+ FRIEND_TEST_ALL_PREFIXES(SystemMetricsTest, SystemMetrics);
+
+ size_t committed_memory_;
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ SystemMemoryInfoKB memory_info_;
+ VmStatInfo vmstat_info_;
+ SystemDiskInfo disk_info_;
diff --git a/devel/electron7/files/patch-base_process_process__metrics__freebsd.cc b/devel/electron7/files/patch-base_process_process__metrics__freebsd.cc
new file mode 100644
index 000000000000..e091385afce2
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__metrics__freebsd.cc
@@ -0,0 +1,259 @@
+--- base/process/process_metrics_freebsd.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_metrics_freebsd.cc
+@@ -5,6 +5,7 @@
+ #include "base/process/process_metrics.h"
+
+ #include <stddef.h>
++#include <sys/types.h>
+ #include <sys/sysctl.h>
+ #include <sys/user.h>
+ #include <unistd.h>
+@@ -14,11 +15,29 @@
+ #include "base/process/process_metrics_iocounters.h"
+ #include "base/stl_util.h"
+
++#include <unistd.h> /* getpagesize() */
++#include <fcntl.h> /* O_RDONLY */
++#include <kvm.h>
++#include <libutil.h>
++
+ namespace base {
++namespace {
+
++int GetPageShift() {
++ int pagesize = getpagesize();
++ int pageshift = 0;
++
++ while (pagesize > 1) {
++ pageshift++;
++ pagesize >>= 1;
++ }
++
++ return pageshift;
++}
++}
++
+ ProcessMetrics::ProcessMetrics(ProcessHandle process)
+- : process_(process),
+- last_cpu_(0) {}
++ : process_(process) {}
+
+ // static
+ std::unique_ptr<ProcessMetrics> ProcessMetrics::CreateProcessMetrics(
+@@ -69,4 +88,216 @@ size_t GetSystemCommitCharge() {
+ return mem_total - (mem_free*pagesize) - (mem_inactive*pagesize);
+ }
+
++int GetNumberOfThreads(ProcessHandle process) {
++ // Taken from FreeBSD top (usr.bin/top/machine.c)
++
++ kvm_t* kd = kvm_open(NULL, "/dev/null", NULL, O_RDONLY, "kvm_open");
++ if (kd == NULL)
++ return 0;
++
++ struct kinfo_proc* pbase;
++ int nproc;
++ pbase = kvm_getprocs(kd, KERN_PROC_PID, process, &nproc);
++ if (pbase == NULL)
++ return 0;
++
++ if (kvm_close(kd) == -1)
++ return 0;
++
++ return nproc;
++}
++
++bool GetSystemMemoryInfo(SystemMemoryInfoKB *meminfo) {
++ unsigned int mem_total, mem_free, swap_total, swap_used;
++ size_t length;
++ int pagesizeKB;
++
++ pagesizeKB = getpagesize() / 1024;
++
++ length = sizeof(mem_total);
++ if (sysctlbyname("vm.stats.vm.v_page_count", &mem_total,
++ &length, NULL, 0) != 0 || length != sizeof(mem_total))
++ return false;
++
++ length = sizeof(mem_free);
++ if (sysctlbyname("vm.stats.vm.v_free_count", &mem_free, &length, NULL, 0)
++ != 0 || length != sizeof(mem_free))
++ return false;
++
++ length = sizeof(swap_total);
++ if (sysctlbyname("vm.swap_size", &swap_total, &length, NULL, 0)
++ != 0 || length != sizeof(swap_total))
++ return false;
++
++ length = sizeof(swap_used);
++ if (sysctlbyname("vm.swap_anon_use", &swap_used, &length, NULL, 0)
++ != 0 || length != sizeof(swap_used))
++ return false;
++
++ meminfo->total = mem_total * pagesizeKB;
++ meminfo->free = mem_free * pagesizeKB;
++ meminfo->swap_total = swap_total * pagesizeKB;
++ meminfo->swap_free = (swap_total - swap_used) * pagesizeKB;
++
++ return true;
++}
++
++int ProcessMetrics::GetOpenFdCount() const {
++ struct kinfo_file * kif;
++ int cnt;
++
++ if ((kif = kinfo_getfile(process_, &cnt)) == NULL)
++ return -1;
++
++ free(kif);
++
++ return cnt;
++}
++
++int ProcessMetrics::GetOpenFdSoftLimit() const {
++ size_t length;
++ int total_count = 0;
++ int mib[] = { CTL_KERN, KERN_MAXFILESPERPROC };
++
++ length = sizeof(total_count);
++
++ if (sysctl(mib, base::size(mib), &total_count, &length, NULL, 0) < 0) {
++ total_count = -1;
++ }
++
++ return total_count;
++}
++
++size_t ProcessMetrics::GetResidentSetSize() const {
++ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open");
++
++ if (kd == nullptr)
++ return 0;
++
++ struct kinfo_proc *pp;
++ int nproc;
++
++ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) {
++ kvm_close(kd);
++ return 0;
++ }
++
++ size_t rss;
++
++ if (nproc > 0) {
++ rss = pp->ki_rssize << GetPageShift();
++ } else {
++ rss = 0;
++ }
++
++ kvm_close(kd);
++ return rss;
++}
++
++uint64_t ProcessMetrics::GetVmSwapBytes() const {
++ kvm_t *kd = kvm_open(nullptr, "/dev/null", nullptr, O_RDONLY, "kvm_open");
++
++ if (kd == nullptr)
++ return 0;
++
++ struct kinfo_proc *pp;
++ int nproc;
++
++ if ((pp = kvm_getprocs(kd, KERN_PROC_PID, process_, &nproc)) == nullptr) {
++ kvm_close(kd);
++ return 0;
++ }
++
++ size_t swrss;
++
++ if (nproc > 0) {
++ swrss = pp->ki_swrss > pp->ki_rssize
++ ? (pp->ki_swrss - pp->ki_rssize) << GetPageShift()
++ : 0;
++ } else {
++ swrss = 0;
++ }
++
++ kvm_close(kd);
++ return swrss;
++}
++
++int ProcessMetrics::GetIdleWakeupsPerSecond() {
++ NOTIMPLEMENTED();
++ return 0;
++}
++
++bool GetSystemDiskInfo(SystemDiskInfo* diskinfo) {
++ NOTIMPLEMENTED();
++ return false;
++}
++
++bool GetVmStatInfo(VmStatInfo* vmstat) {
++ NOTIMPLEMENTED();
++ return false;
++}
++
++SystemDiskInfo::SystemDiskInfo() {
++ reads = 0;
++ reads_merged = 0;
++ sectors_read = 0;
++ read_time = 0;
++ writes = 0;
++ writes_merged = 0;
++ sectors_written = 0;
++ write_time = 0;
++ io = 0;
++ io_time = 0;
++ weighted_io_time = 0;
++}
++
++SystemDiskInfo::SystemDiskInfo(const SystemDiskInfo& other) = default;
++
++std::unique_ptr<Value> SystemDiskInfo::ToValue() const {
++ auto res = std::make_unique<DictionaryValue>();
++
++ // Write out uint64_t variables as doubles.
++ // Note: this may discard some precision, but for JS there's no other option.
++ res->SetDouble("reads", static_cast<double>(reads));
++ res->SetDouble("reads_merged", static_cast<double>(reads_merged));
++ res->SetDouble("sectors_read", static_cast<double>(sectors_read));
++ res->SetDouble("read_time", static_cast<double>(read_time));
++ res->SetDouble("writes", static_cast<double>(writes));
++ res->SetDouble("writes_merged", static_cast<double>(writes_merged));
++ res->SetDouble("sectors_written", static_cast<double>(sectors_written));
++ res->SetDouble("write_time", static_cast<double>(write_time));
++ res->SetDouble("io", static_cast<double>(io));
++ res->SetDouble("io_time", static_cast<double>(io_time));
++ res->SetDouble("weighted_io_time", static_cast<double>(weighted_io_time));
++
++ return std::move(res);
++}
++
++std::unique_ptr<DictionaryValue> SystemMemoryInfoKB::ToValue() const {
++ auto res = std::make_unique<DictionaryValue>();
++ res->SetIntKey("total", total);
++ res->SetIntKey("free", free);
++ res->SetIntKey("available", available);
++ res->SetIntKey("buffers", buffers);
++ res->SetIntKey("cached", cached);
++ res->SetIntKey("active_anon", active_anon);
++ res->SetIntKey("inactive_anon", inactive_anon);
++ res->SetIntKey("active_file", active_file);
++ res->SetIntKey("inactive_file", inactive_file);
++ res->SetIntKey("swap_total", swap_total);
++ res->SetIntKey("swap_free", swap_free);
++ res->SetIntKey("swap_used", swap_total - swap_free);
++ res->SetIntKey("dirty", dirty);
++ res->SetIntKey("reclaimable", reclaimable);
++
++ return res;
++}
++
++std::unique_ptr<DictionaryValue> VmStatInfo::ToValue() const {
++ auto res = std::make_unique<DictionaryValue>();
++ res->SetIntKey("pswpin", pswpin);
++ res->SetIntKey("pswpout", pswpout);
++ res->SetIntKey("pgmajfault", pgmajfault);
++ return res;
++}
+ } // namespace base
diff --git a/devel/electron7/files/patch-base_process_process__metrics__posix.cc b/devel/electron7/files/patch-base_process_process__metrics__posix.cc
new file mode 100644
index 000000000000..8e01ca8dca75
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__metrics__posix.cc
@@ -0,0 +1,20 @@
+--- base/process/process_metrics_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_metrics_posix.cc
+@@ -20,6 +20,8 @@
+
+ #if defined(OS_MACOSX)
+ #include <malloc/malloc.h>
++#elif defined(OS_FREEBSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -117,7 +119,7 @@ size_t ProcessMetrics::GetMallocUsage() {
+ #else
+ return minfo.hblkhd + minfo.arena;
+ #endif
+-#elif defined(OS_FUCHSIA)
++#elif defined(OS_FUCHSIA) || defined(OS_BSD)
+ // TODO(fuchsia): Not currently exposed. https://crbug.com/735087.
+ return 0;
+ #endif
diff --git a/devel/electron7/files/patch-base_process_process__unittest.cc b/devel/electron7/files/patch-base_process_process__unittest.cc
new file mode 100644
index 000000000000..9550ce5b6d1a
--- /dev/null
+++ b/devel/electron7/files/patch-base_process_process__unittest.cc
@@ -0,0 +1,11 @@
+--- base/process/process_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/process/process_unittest.cc
+@@ -148,7 +148,7 @@ TEST_F(ProcessTest, CreationTimeOtherProcess) {
+ // was spawned and a time recorded after it was spawned. However, since the
+ // base::Time and process creation clocks don't match, tolerate some error.
+ constexpr base::TimeDelta kTolerance =
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // On Linux, process creation time is relative to boot time which has a
+ // 1-second resolution. Tolerate 1 second for the imprecise boot time and
+ // 100 ms for the imprecise clock.
diff --git a/devel/electron7/files/patch-base_profiler_stack__sampling__profiler__unittest.cc b/devel/electron7/files/patch-base_profiler_stack__sampling__profiler__unittest.cc
new file mode 100644
index 000000000000..b8f3d1497a5f
--- /dev/null
+++ b/devel/electron7/files/patch-base_profiler_stack__sampling__profiler__unittest.cc
@@ -0,0 +1,11 @@
+--- base/profiler/stack_sampling_profiler_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/profiler/stack_sampling_profiler_unittest.cc
+@@ -41,7 +41,7 @@
+ #include <intrin.h>
+ #include <malloc.h>
+ #include <windows.h>
+-#else
++#elif !defined(OS_BSD)
+ #include <alloca.h>
+ #endif
+
diff --git a/devel/electron7/files/patch-base_sampling__heap__profiler_sampling__heap__profiler.cc b/devel/electron7/files/patch-base_sampling__heap__profiler_sampling__heap__profiler.cc
new file mode 100644
index 000000000000..b210f2506a40
--- /dev/null
+++ b/devel/electron7/files/patch-base_sampling__heap__profiler_sampling__heap__profiler.cc
@@ -0,0 +1,24 @@
+--- base/sampling_heap_profiler/sampling_heap_profiler.cc.orig 2019-12-12 12:38:59 UTC
++++ base/sampling_heap_profiler/sampling_heap_profiler.cc
+@@ -29,6 +29,10 @@
+ #include <sys/prctl.h>
+ #endif
+
++#if defined(OS_BSD)
++#include <pthread_np.h>
++#endif
++
+ #if defined(OS_ANDROID) && BUILDFLAG(CAN_UNWIND_WITH_CFI_TABLE) && \
+ defined(OFFICIAL_BUILD)
+ #include "base/trace_event/cfi_backtrace_android.h"
+@@ -64,6 +68,10 @@ const char* GetAndLeakThreadName() {
+ #elif defined(OS_MACOSX)
+ int err = pthread_getname_np(pthread_self(), name, kBufferLen);
+ if (err == 0 && *name != '\0')
++ return strdup(name);
++#elif defined(OS_BSD) && __FreeBSD__ >= 12
++ pthread_get_name_np(pthread_self(), name, kBufferLen);
++ if (*name != '\0')
+ return strdup(name);
+ #endif // defined(OS_LINUX) || defined(OS_ANDROID)
+
diff --git a/devel/electron7/files/patch-base_security__unittest.cc b/devel/electron7/files/patch-base_security__unittest.cc
new file mode 100644
index 000000000000..ec5eb1b2d413
--- /dev/null
+++ b/devel/electron7/files/patch-base_security__unittest.cc
@@ -0,0 +1,11 @@
+--- base/security_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/security_unittest.cc
+@@ -60,7 +60,7 @@ NOINLINE Type HideValueFromCompiler(volatile Type valu
+ // FAILS_ is too clunky.
+ void OverflowTestsSoftExpectTrue(bool overflow_detected) {
+ if (!overflow_detected) {
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_NACL)
+ // Sadly, on Linux, Android, and OSX we don't have a good story yet. Don't
+ // fail the test, but report.
+ printf("Platform has overflow: %s\n",
diff --git a/devel/electron7/files/patch-base_strings_safe__sprintf__unittest.cc b/devel/electron7/files/patch-base_strings_safe__sprintf__unittest.cc
new file mode 100644
index 000000000000..9253e826377b
--- /dev/null
+++ b/devel/electron7/files/patch-base_strings_safe__sprintf__unittest.cc
@@ -0,0 +1,18 @@
+--- base/strings/safe_sprintf_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/strings/safe_sprintf_unittest.cc
+@@ -730,6 +730,7 @@ TEST(SafeSPrintfTest, EmbeddedNul) {
+ }
+
+ TEST(SafeSPrintfTest, EmitNULL) {
++/* Avoid compiler error: http://pastebin.com/1edWUE84
+ char buf[40];
+ #if defined(__GNUC__)
+ #pragma GCC diagnostic push
+@@ -741,6 +742,7 @@ TEST(SafeSPrintfTest, EmitNULL) {
+ EXPECT_EQ("0x0", std::string(buf));
+ EXPECT_EQ(6, SafeSPrintf(buf, "%s", NULL));
+ EXPECT_EQ("<NULL>", std::string(buf));
++*/
+ #if defined(__GCC__)
+ #pragma GCC diagnostic pop
+ #endif
diff --git a/devel/electron7/files/patch-base_syslog__logging.cc b/devel/electron7/files/patch-base_syslog__logging.cc
new file mode 100644
index 000000000000..0dd0be8ef3a4
--- /dev/null
+++ b/devel/electron7/files/patch-base_syslog__logging.cc
@@ -0,0 +1,20 @@
+--- base/syslog_logging.cc.orig 2019-12-12 12:38:59 UTC
++++ base/syslog_logging.cc
+@@ -14,7 +14,7 @@
+ #include "base/debug/stack_trace.h"
+ #include "base/strings/string_util.h"
+ #include "base/win/win_util.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ // <syslog.h> defines LOG_INFO, LOG_WARNING macros that could conflict with
+ // base::LOG_INFO, base::LOG_WARNING.
+ #include <syslog.h>
+@@ -113,7 +113,7 @@ EventLogMessage::~EventLogMessage() {
+
+ if (user_sid != nullptr)
+ ::LocalFree(user_sid);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ const char kEventSource[] = "chrome";
+ openlog(kEventSource, LOG_NOWAIT | LOG_PID, LOG_USER);
+ // We can't use the defined names for the logging severity from syslog.h
diff --git a/devel/electron7/files/patch-base_system_sys__info.h b/devel/electron7/files/patch-base_system_sys__info.h
new file mode 100644
index 000000000000..e32ab2f83ad6
--- /dev/null
+++ b/devel/electron7/files/patch-base_system_sys__info.h
@@ -0,0 +1,11 @@
+--- base/system/sys_info.h.orig 2019-12-12 12:38:59 UTC
++++ base/system/sys_info.h
+@@ -192,7 +192,7 @@ class BASE_EXPORT SysInfo {
+ static bool IsLowEndDeviceImpl();
+ static HardwareInfo GetHardwareInfoSync();
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_AIX) || defined(OS_BSD)
+ static int64_t AmountOfAvailablePhysicalMemory(
+ const SystemMemoryInfoKB& meminfo);
+ #endif
diff --git a/devel/electron7/files/patch-base_system_sys__info__freebsd.cc b/devel/electron7/files/patch-base_system_sys__info__freebsd.cc
new file mode 100644
index 000000000000..23141b8da3b8
--- /dev/null
+++ b/devel/electron7/files/patch-base_system_sys__info__freebsd.cc
@@ -0,0 +1,59 @@
+--- base/system/sys_info_freebsd.cc.orig 2019-12-12 12:38:59 UTC
++++ base/system/sys_info_freebsd.cc
+@@ -13,26 +13,46 @@
+ namespace base {
+
+ int64_t SysInfo::AmountOfPhysicalMemoryImpl() {
+- int pages, page_size;
++ int pages, page_size, r = 0;
+ size_t size = sizeof(pages);
+- sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
+- sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
+- if (pages == -1 || page_size == -1) {
++ if(r == 0)
++ r = sysctlbyname("vm.stats.vm.v_page_count", &pages, &size, NULL, 0);
++ if(r == 0)
++ r =sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++ if(r == -1) {
+ NOTREACHED();
+ return 0;
+ }
+ return static_cast<int64_t>(pages) * page_size;
+ }
+
+-// static
+-uint64_t SysInfo::MaxSharedMemorySize() {
+- size_t limit;
+- size_t size = sizeof(limit);
+- if (sysctlbyname("kern.ipc.shmmax", &limit, &size, NULL, 0) < 0) {
++int64_t SysInfo::AmountOfAvailablePhysicalMemoryImpl() {
++ int page_size, r = 0;
++ unsigned pgfree, pginact, pgcache;
++ size_t size = sizeof(page_size);
++ size_t szpg = sizeof(pgfree);
++ if(r == 0)
++ r = sysctlbyname("vm.stats.vm.v_page_size", &page_size, &size, NULL, 0);
++ if(r == 0)
++ r = sysctlbyname("vm.stats.vm.v_free_count", &pgfree, &szpg, NULL, 0);
++ if(r == 0)
++ r = sysctlbyname("vm.stats.vm.v_inactive_count", &pginact, &szpg, NULL, 0);
++ if(r == 0)
++ r = sysctlbyname("vm.stats.vm.v_cache_count", &pgcache, &szpg, NULL, 0);
++ if(r == -1) {
+ NOTREACHED();
+ return 0;
+ }
+- return static_cast<uint64_t>(limit);
++ return static_cast<int64_t>((pgfree + pginact + pgcache) * page_size);
+ }
+
++// static
++std::string SysInfo::CPUModelName() {
++ int mib[] = { CTL_HW, HW_MODEL };
++ char name[256];
++ size_t size = base::size(name);
++ if (sysctl(mib, base::size(mib), &name, &size, NULL, 0) == 0)
++ return name;
++ return std::string();
++}
+ } // namespace base
diff --git a/devel/electron7/files/patch-base_system_sys__info__posix.cc b/devel/electron7/files/patch-base_system_sys__info__posix.cc
new file mode 100644
index 000000000000..e04f71d00e24
--- /dev/null
+++ b/devel/electron7/files/patch-base_system_sys__info__posix.cc
@@ -0,0 +1,11 @@
+--- base/system/sys_info_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/system/sys_info_posix.cc
+@@ -220,6 +220,8 @@ std::string SysInfo::OperatingSystemArchitecture() {
+ arch = "x86";
+ } else if (arch == "amd64") {
+ arch = "x86_64";
++ } else if (arch == "arm64") {
++ arch = "aarch64";
+ } else if (std::string(info.sysname) == "AIX") {
+ arch = "ppc64";
+ }
diff --git a/devel/electron7/files/patch-base_task_thread__pool_environment__config__unittest.cc b/devel/electron7/files/patch-base_task_thread__pool_environment__config__unittest.cc
new file mode 100644
index 000000000000..25fc8953b299
--- /dev/null
+++ b/devel/electron7/files/patch-base_task_thread__pool_environment__config__unittest.cc
@@ -0,0 +1,11 @@
+--- base/task/thread_pool/environment_config_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/task/thread_pool/environment_config_unittest.cc
+@@ -14,7 +14,7 @@ namespace internal {
+ TEST(ThreadPoolEnvironmentConfig, CanUseBackgroundPriorityForWorker) {
+ #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_IOS)
+ EXPECT_TRUE(CanUseBackgroundPriorityForWorkerThread());
+-#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || \
++#elif defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS) || defined(OS_NACL)
+ EXPECT_FALSE(CanUseBackgroundPriorityForWorkerThread());
+ #else
diff --git a/devel/electron7/files/patch-base_test_fontconfig__util__linux.cc b/devel/electron7/files/patch-base_test_fontconfig__util__linux.cc
new file mode 100644
index 000000000000..1fccc0ad2475
--- /dev/null
+++ b/devel/electron7/files/patch-base_test_fontconfig__util__linux.cc
@@ -0,0 +1,408 @@
+--- base/test/fontconfig_util_linux.cc.orig 2019-12-12 12:38:59 UTC
++++ base/test/fontconfig_util_linux.cc
+@@ -6,24 +6,397 @@
+
+ #include <fontconfig/fontconfig.h>
+
+-#include <memory>
+-
+ #include "base/base_paths.h"
+ #include "base/environment.h"
+ #include "base/files/file_path.h"
++#include "base/files/file_util.h"
+ #include "base/logging.h"
++#include "base/macros.h"
+ #include "base/path_service.h"
++#include "base/strings/string_util.h"
+
+ namespace base {
+
++namespace {
++
++const char kFontsConfTemplate[] = R"(<?xml version="1.0"?>
++<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
++<fontconfig>
++
++ <!-- Cache location. -->
++ <cachedir>$1</cachedir>
++
++ <!-- GCS-synced fonts. -->
++ <dir>$2</dir>
++
++ <!-- Default properties. -->
++ <match target="font">
++ <edit name="embeddedbitmap" mode="append_last">
++ <bool>false</bool>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Times</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>sans</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>DejaVu Sans</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>sans serif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ </match>
++
++ <!-- Some layout tests specify Helvetica as a family and we need to make sure
++ that we don't fallback to Tinos for them -->
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Helvetica</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>sans-serif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>serif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>mono</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Cousine</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>monospace</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Cousine</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Courier</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Cousine</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>cursive</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Comic Sans MS</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>fantasy</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Impact</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Monaco</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Arial</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Courier New</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Cousine</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Georgia</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Gelasio</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Times New Roman</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test qual="any" name="family">
++ <string>Verdana</string>
++ </test>
++ <!-- NOT metrically compatible! -->
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ </match>
++
++ <!-- TODO(thomasanderson): Move these configs to be test-specific. -->
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>NonAntiAliasedSans</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="antialias" mode="assign">
++ <bool>false</bool>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>SlightHintedGeorgia</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Gelasio</string>
++ </edit>
++ <edit name="hintstyle" mode="assign">
++ <const>hintslight</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>NonHintedSans</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <!-- These deliberately contradict each other. The 'hinting' preference
++ should take priority -->
++ <edit name="hintstyle" mode="assign">
++ <const>hintfull</const>
++ </edit>
++ <edit name="hinting" mode="assign">
++ <bool>false</bool>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>AutohintedSerif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="autohint" mode="assign">
++ <bool>true</bool>
++ </edit>
++ <edit name="hintstyle" mode="assign">
++ <const>hintmedium</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>HintedSerif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="autohint" mode="assign">
++ <bool>false</bool>
++ </edit>
++ <edit name="hintstyle" mode="assign">
++ <const>hintmedium</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>FullAndAutoHintedSerif</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="autohint" mode="assign">
++ <bool>true</bool>
++ </edit>
++ <edit name="hintstyle" mode="assign">
++ <const>hintfull</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>SubpixelEnabledArial</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="rgba" mode="assign">
++ <const>rgb</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>SubpixelDisabledArial</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Arimo</string>
++ </edit>
++ <edit name="rgba" mode="assign">
++ <const>none</const>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <!-- FontConfig doesn't currently provide a well-defined way to turn on
++ subpixel positioning. This is just an arbitrary pattern to use after
++ turning subpixel positioning on globally to ensure that we don't have
++ issues with our style getting cached for other tests. -->
++ <test name="family" compare="eq">
++ <string>SubpixelPositioning</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <!-- See comments above -->
++ <test name="family" compare="eq">
++ <string>SubpixelPositioningAhem</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>ahem</string>
++ </edit>
++ </match>
++
++ <match target="pattern">
++ <test name="family" compare="eq">
++ <string>SlightHintedTimesNewRoman</string>
++ </test>
++ <edit name="family" mode="assign">
++ <string>Tinos</string>
++ </edit>
++ <edit name="hintstyle" mode="assign">
++ <const>hintslight</const>
++ </edit>
++ </match>
++
++ <!-- When we encounter a character that the current font doesn't
++ support, gfx::GetFallbackFontForChar() returns the first font
++ that does have a glyph for the character. The list of fonts is
++ sorted by a pattern that includes the current locale, but doesn't
++ include a font family (which means that the fallback font depends
++ on the locale but not on the current font).
++
++ DejaVu Sans is commonly the only font that supports some
++ characters, such as "⇧", and even when other candidates are
++ available, DejaVu Sans is commonly first among them, because of
++ the way Fontconfig is ordinarily configured. For example, the
++ configuration in the Fonconfig source lists DejaVu Sans under the
++ sans-serif generic family, and appends sans-serif to patterns
++ that don't already include a generic family (such as the pattern
++ in gfx::GetFallbackFontForChar()).
++
++ To get the same fallback font in the layout tests, we could
++ duplicate this configuration here, or more directly, simply
++ append DejaVu Sans to all patterns. -->
++ <match target="pattern">
++ <edit name="family" mode="append_last">
++ <string>DejaVu Sans</string>
++ </edit>
++ </match>
++
++</fontconfig>
++)";
++
++} // namespace
++
+ void SetUpFontconfig() {
+- FilePath dir_module;
+- CHECK(PathService::Get(DIR_MODULE, &dir_module));
++ std::unique_ptr<Environment> env = Environment::Create();
++ if (!env->HasVar("FONTCONFIG_FILE")) {
++ // fonts.conf must be generated on-the-fly since it contains absolute paths
++ // which may be different if
++ // 1. The user moves/renames their build directory (or any parent dirs).
++ // 2. The build directory is mapped on a swarming bot at a location
++ // different from the one the buildbot used.
++ FilePath dir_module;
++ PathService::Get(DIR_MODULE, &dir_module);
++ FilePath font_cache = dir_module.Append("fontconfig_caches");
++ FilePath test_fonts = dir_module.Append("test_fonts");
++ std::string fonts_conf = ReplaceStringPlaceholders(
++ kFontsConfTemplate, {font_cache.value(), test_fonts.value()}, nullptr);
+
+- std::unique_ptr<Environment> env(Environment::Create());
+- // TODO(thomasanderson): This still stat()'s the real /etc/fonts/fonts.conf.
+- // Prevent fontconfig from doing this.
+- CHECK(env->SetVar("FONTCONFIG_SYSROOT", dir_module.value().c_str()));
++ // Write the data to a different file and then atomically rename it to
++ // fonts.conf. This avoids the file being in a bad state when different
++ // parallel tests call this function at the same time.
++ FilePath fonts_conf_file_temp;
++ if(!CreateTemporaryFileInDir(dir_module, &fonts_conf_file_temp))
++ CHECK(CreateTemporaryFile(&fonts_conf_file_temp));
++ CHECK(
++ WriteFile(fonts_conf_file_temp, fonts_conf.c_str(), fonts_conf.size()));
++ FilePath fonts_conf_file = dir_module.Append("fonts.conf");
++ if (ReplaceFile(fonts_conf_file_temp, fonts_conf_file, nullptr))
++ env->SetVar("FONTCONFIG_FILE", fonts_conf_file.value());
++ else
++ env->SetVar("FONTCONFIG_FILE", fonts_conf_file_temp.value());
++ }
+ }
+
+ } // namespace base
diff --git a/devel/electron7/files/patch-base_test_generate__fontconfig__caches.cc b/devel/electron7/files/patch-base_test_generate__fontconfig__caches.cc
new file mode 100644
index 000000000000..164224117f84
--- /dev/null
+++ b/devel/electron7/files/patch-base_test_generate__fontconfig__caches.cc
@@ -0,0 +1,25 @@
+--- base/test/generate_fontconfig_caches.cc.orig 2019-12-12 12:38:59 UTC
++++ base/test/generate_fontconfig_caches.cc
+@@ -52,14 +52,21 @@ int main() {
+
+ // Delete directory before generating fontconfig caches. This will notify
+ // future fontconfig_caches changes.
+- CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true));
+
++ CHECK(base::DeleteFile(fontconfig_caches, /*recursive=*/true));
+ base::SetUpFontconfig();
+ FcInit();
+ FcFini();
+
+ // Check existence of intended fontconfig cache file.
++#if defined(OS_BSD)
++ // Our version of fontconfig is too old to respect .uuid files in font directories,
++ // so we check for the CACHEDIR.TAG file instead
+ CHECK(base::PathExists(
++ fontconfig_caches.Append("CACHEDIR.TAG")));
++#else
++ CHECK(base::PathExists(
+ fontconfig_caches.Append(base::StrCat({uuid, "-le64.cache-7"}))));
++#endif
+ return 0;
+ }
diff --git a/devel/electron7/files/patch-base_test_launcher_test__launcher.cc b/devel/electron7/files/patch-base_test_launcher_test__launcher.cc
new file mode 100644
index 000000000000..2b6329da75a1
--- /dev/null
+++ b/devel/electron7/files/patch-base_test_launcher_test__launcher.cc
@@ -0,0 +1,10 @@
+--- base/test/launcher/test_launcher.cc.orig 2019-12-12 12:38:59 UTC
++++ base/test/launcher/test_launcher.cc
+@@ -54,6 +54,7 @@
+ #include "testing/gtest/include/gtest/gtest.h"
+
+ #if defined(OS_POSIX)
++#include <signal.h>
+ #include <fcntl.h>
+
+ #include "base/files/file_descriptor_watcher_posix.h"
diff --git a/devel/electron7/files/patch-base_test_test__file__util__linux.cc b/devel/electron7/files/patch-base_test_test__file__util__linux.cc
new file mode 100644
index 000000000000..ec7077dfd16d
--- /dev/null
+++ b/devel/electron7/files/patch-base_test_test__file__util__linux.cc
@@ -0,0 +1,13 @@
+--- base/test/test_file_util_linux.cc.orig 2019-12-12 12:38:59 UTC
++++ base/test/test_file_util_linux.cc
+@@ -51,8 +51,10 @@ bool EvictFileFromSystemCache(const FilePath& file) {
+ return false;
+ if (fdatasync(fd.get()) != 0)
+ return false;
++#if !defined(OS_BSD)
+ if (posix_fadvise(fd.get(), 0, 0, POSIX_FADV_DONTNEED) != 0)
+ return false;
++#endif
+ return true;
+ }
+
diff --git a/devel/electron7/files/patch-base_test_test__file__util__posix.cc b/devel/electron7/files/patch-base_test_test__file__util__posix.cc
new file mode 100644
index 000000000000..3e278261b9d2
--- /dev/null
+++ b/devel/electron7/files/patch-base_test_test__file__util__posix.cc
@@ -0,0 +1,11 @@
+--- base/test/test_file_util_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/test/test_file_util_posix.cc
+@@ -85,7 +85,7 @@ void SyncPageCacheToDisk() {
+ sync();
+ }
+
+-#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if !defined(OS_LINUX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ bool EvictFileFromSystemCache(const FilePath& file) {
+ // There doesn't seem to be a POSIX way to cool the disk cache.
+ NOTIMPLEMENTED();
diff --git a/devel/electron7/files/patch-base_third__party_libevent_BUILD.gn b/devel/electron7/files/patch-base_third__party_libevent_BUILD.gn
new file mode 100644
index 000000000000..2c6a362ed19d
--- /dev/null
+++ b/devel/electron7/files/patch-base_third__party_libevent_BUILD.gn
@@ -0,0 +1,24 @@
+--- base/third_party/libevent/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ base/third_party/libevent/BUILD.gn
+@@ -43,13 +43,20 @@ static_library("libevent") {
+ "mac/event-config.h",
+ ]
+ include_dirs = [ "mac" ]
+- } else if (is_linux) {
++ } else if (is_linux && !is_bsd) {
+ sources += [
+ "epoll.c",
+ "linux/config.h",
+ "linux/event-config.h",
+ ]
+ include_dirs = [ "linux" ]
++ } else if (is_bsd) {
++ sources += [
++ "kqueue.c",
++ "freebsd/config.h",
++ "freebsd/event-config.h",
++ ]
++ include_dirs = [ "freebsd" ]
+ } else if (is_android) {
+ sources += [
+ "android/config.h",
diff --git a/devel/electron7/files/patch-base_threading_platform__thread.h b/devel/electron7/files/patch-base_threading_platform__thread.h
new file mode 100644
index 000000000000..70970f918ea1
--- /dev/null
+++ b/devel/electron7/files/patch-base_threading_platform__thread.h
@@ -0,0 +1,11 @@
+--- base/threading/platform_thread.h.orig 2019-12-12 12:38:59 UTC
++++ base/threading/platform_thread.h
+@@ -221,7 +221,7 @@ class BASE_EXPORT PlatformThread {
+
+ static ThreadPriority GetCurrentThreadPriority();
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Toggles a specific thread's priority at runtime. This can be used to
+ // change the priority of a thread in a different process and will fail
+ // if the calling process does not have proper permissions. The
diff --git a/devel/electron7/files/patch-base_threading_platform__thread__linux.cc b/devel/electron7/files/patch-base_threading_platform__thread__linux.cc
new file mode 100644
index 000000000000..644345925489
--- /dev/null
+++ b/devel/electron7/files/patch-base_threading_platform__thread__linux.cc
@@ -0,0 +1,30 @@
+--- base/threading/platform_thread_linux.cc.orig 2019-12-12 12:38:59 UTC
++++ base/threading/platform_thread_linux.cc
+@@ -18,7 +18,9 @@
+
+ #if !defined(OS_NACL) && !defined(OS_AIX)
+ #include <pthread.h>
++#if !defined(OS_BSD)
+ #include <sys/prctl.h>
++#endif
+ #include <sys/resource.h>
+ #include <sys/time.h>
+ #include <sys/types.h>
+@@ -99,7 +101,7 @@ const ThreadPriorityToNiceValuePair kThreadPriorityToN
+
+ Optional<bool> CanIncreaseCurrentThreadPriorityForPlatform(
+ ThreadPriority priority) {
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+ // A non-zero soft-limit on RLIMIT_RTPRIO is required to be allowed to invoke
+ // pthread_setschedparam in SetCurrentThreadPriorityForPlatform().
+ struct rlimit rlim;
+@@ -141,7 +143,7 @@ Optional<ThreadPriority> GetCurrentThreadPriorityForPl
+ void PlatformThread::SetName(const std::string& name) {
+ ThreadIdNameManager::GetInstance()->SetName(name);
+
+-#if !defined(OS_NACL) && !defined(OS_AIX)
++#if !defined(OS_NACL) && !defined(OS_AIX) && !defined(OS_BSD)
+ // On linux we can get the thread names to show up in the debugger by setting
+ // the process name for the LWP. We don't want to do this for the main
+ // thread because that would rename the process, causing tools like killall
diff --git a/devel/electron7/files/patch-base_threading_platform__thread__posix.cc b/devel/electron7/files/patch-base_threading_platform__thread__posix.cc
new file mode 100644
index 000000000000..0f861a580d83
--- /dev/null
+++ b/devel/electron7/files/patch-base_threading_platform__thread__posix.cc
@@ -0,0 +1,11 @@
+--- base/threading/platform_thread_posix.cc.orig 2019-12-12 12:38:59 UTC
++++ base/threading/platform_thread_posix.cc
+@@ -66,7 +66,7 @@ void* ThreadFunc(void* params) {
+ if (!thread_params->joinable)
+ base::ThreadRestrictions::SetSingletonAllowed(false);
+
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+ // Threads on linux/android may inherit their priority from the thread
+ // where they were created. This explicitly sets the priority of all new
+ // threads.
diff --git a/devel/electron7/files/patch-base_threading_thread__local__storage__unittest.cc b/devel/electron7/files/patch-base_threading_thread__local__storage__unittest.cc
new file mode 100644
index 000000000000..f2843e3e9e91
--- /dev/null
+++ b/devel/electron7/files/patch-base_threading_thread__local__storage__unittest.cc
@@ -0,0 +1,11 @@
+--- base/threading/thread_local_storage_unittest.cc.orig 2019-12-12 12:38:59 UTC
++++ base/threading/thread_local_storage_unittest.cc
+@@ -86,7 +86,7 @@ class ThreadLocalStorageRunner : public DelegateSimple
+ void ThreadLocalStorageCleanup(void *value) {
+ int *ptr = reinterpret_cast<int*>(value);
+ // Destructors should never be called with a NULL.
+- ASSERT_NE(reinterpret_cast<int*>(NULL), ptr);
++ ASSERT_NE(static_cast<int*>(NULL), ptr);
+ if (*ptr == kFinalTlsValue)
+ return; // We've been called enough times.
+ ASSERT_LT(kFinalTlsValue, *ptr);
diff --git a/devel/electron7/files/patch-base_threading_thread__task__runner__handle.cc b/devel/electron7/files/patch-base_threading_thread__task__runner__handle.cc
new file mode 100644
index 000000000000..0b9f22e5cf23
--- /dev/null
+++ b/devel/electron7/files/patch-base_threading_thread__task__runner__handle.cc
@@ -0,0 +1,26 @@
+--- base/threading/thread_task_runner_handle.cc.orig 2019-12-12 12:38:59 UTC
++++ base/threading/thread_task_runner_handle.cc
+@@ -8,6 +8,7 @@
+ #include <utility>
+
+ #include "base/bind.h"
++#include "base/callback_helpers.h"
+ #include "base/lazy_instance.h"
+ #include "base/logging.h"
+ #include "base/run_loop.h"
+@@ -37,6 +38,7 @@ bool ThreadTaskRunnerHandle::IsSet() {
+ return !!thread_task_runner_tls.Pointer()->Get();
+ }
+
++#if defined(OS_BSD)
+ // static
+ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideForTesting(
+ scoped_refptr<SingleThreadTaskRunner> overriding_task_runner) {
+@@ -81,6 +83,7 @@ ScopedClosureRunner ThreadTaskRunnerHandle::OverrideFo
+ base::Unretained(ttrh->task_runner_.get()),
+ std::move(no_running_during_override)));
+ }
++#endif
+
+ ThreadTaskRunnerHandle::ThreadTaskRunnerHandle(
+ scoped_refptr<SingleThreadTaskRunner> task_runner)
diff --git a/devel/electron7/files/patch-base_trace__event_malloc__dump__provider.cc b/devel/electron7/files/patch-base_trace__event_malloc__dump__provider.cc
new file mode 100644
index 000000000000..51fa45f5ef79
--- /dev/null
+++ b/devel/electron7/files/patch-base_trace__event_malloc__dump__provider.cc
@@ -0,0 +1,21 @@
+--- base/trace_event/malloc_dump_provider.cc.orig 2019-12-12 12:38:59 UTC
++++ base/trace_event/malloc_dump_provider.cc
+@@ -17,6 +17,8 @@
+
+ #if defined(OS_MACOSX)
+ #include <malloc/malloc.h>
++#elif defined(OS_BSD)
++#include <stdlib.h>
+ #else
+ #include <malloc.h>
+ #endif
+@@ -132,6 +134,9 @@ bool MallocDumpProvider::OnMemoryDump(const MemoryDump
+ }
+ #elif defined(OS_FUCHSIA)
+ // TODO(fuchsia): Port, see https://crbug.com/706592.
++#elif defined(OS_BSD)
++ total_virtual_size = 0;
++ allocated_objects_size = 0;
+ #else
+ struct mallinfo info = mallinfo();
+ DCHECK_GE(info.arena + info.hblkhd, info.uordblks);
diff --git a/devel/electron7/files/patch-base_trace__event_process__memory__dump.cc b/devel/electron7/files/patch-base_trace__event_process__memory__dump.cc
new file mode 100644
index 000000000000..3a1c41fe1ffa
--- /dev/null
+++ b/devel/electron7/files/patch-base_trace__event_process__memory__dump.cc
@@ -0,0 +1,11 @@
+--- base/trace_event/process_memory_dump.cc.orig 2019-12-12 12:38:59 UTC
++++ base/trace_event/process_memory_dump.cc
+@@ -94,7 +94,7 @@ size_t ProcessMemoryDump::CountResidentBytes(void* sta
+ #if defined(OS_WIN)
+ std::unique_ptr<PSAPI_WORKING_SET_EX_INFORMATION[]> vec(
+ new PSAPI_WORKING_SET_EX_INFORMATION[max_vec_size]);
+-#elif defined(OS_MACOSX)
++#elif defined(OS_MACOSX) || defined(OS_BSD)
+ std::unique_ptr<char[]> vec(new char[max_vec_size]);
+ #elif defined(OS_POSIX) || defined(OS_FUCHSIA)
+ std::unique_ptr<unsigned char[]> vec(new unsigned char[max_vec_size]);
diff --git a/devel/electron7/files/patch-base_trace__event_process__memory__dump.h b/devel/electron7/files/patch-base_trace__event_process__memory__dump.h
new file mode 100644
index 000000000000..86286cf98f33
--- /dev/null
+++ b/devel/electron7/files/patch-base_trace__event_process__memory__dump.h
@@ -0,0 +1,11 @@
+--- base/trace_event/process_memory_dump.h.orig 2019-12-12 12:38:59 UTC
++++ base/trace_event/process_memory_dump.h
+@@ -22,7 +22,7 @@
+
+ // Define COUNT_RESIDENT_BYTES_SUPPORTED if platform supports counting of the
+ // resident memory.
+-#if !defined(OS_NACL)
++#if !defined(OS_NACL) && !defined(OS_BSD)
+ #define COUNT_RESIDENT_BYTES_SUPPORTED
+ #endif
+
diff --git a/devel/electron7/files/patch-build_config_BUILD.gn b/devel/electron7/files/patch-build_config_BUILD.gn
new file mode 100644
index 000000000000..11c36af56013
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_BUILD.gn
@@ -0,0 +1,30 @@
+--- build/config/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ build/config/BUILD.gn
+@@ -149,7 +149,7 @@ config("debug") {
+ # builds, and we have to tell it to turn it off.
+ defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
+ }
+- } else if (is_linux && current_cpu == "x64" && enable_iterator_debugging) {
++ } else if ((is_linux || is_bsd) && current_cpu == "x64" && enable_iterator_debugging) {
+ # Enable libstdc++ debugging facilities to help catch problems early, see
+ # http://crbug.com/65151 .
+ # TODO(phajdan.jr): Should we enable this for all of POSIX?
+@@ -247,9 +247,7 @@ config("default_libs") {
+ ]
+ } else if (is_linux) {
+ libs = [
+- "dl",
+ "pthread",
+- "rt",
+ ]
+ }
+ }
+@@ -337,7 +335,7 @@ config("executable_config") {
+ "//build/config/ios:ios_dynamic_flags",
+ "//build/config/ios:ios_executable_flags",
+ ]
+- } else if (is_linux || is_android || current_os == "aix") {
++ } else if (is_linux || is_bsd || is_android || current_os == "aix") {
+ configs += [ "//build/config/gcc:executable_config" ]
+ if (is_chromecast) {
+ configs += [ "//build/config/chromecast:executable_config" ]
diff --git a/devel/electron7/files/patch-build_config_BUILDCONFIG.gn b/devel/electron7/files/patch-build_config_BUILDCONFIG.gn
new file mode 100644
index 000000000000..0cea3001b7a1
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_BUILDCONFIG.gn
@@ -0,0 +1,48 @@
+--- build/config/BUILDCONFIG.gn.orig 2019-12-16 13:32:58 UTC
++++ build/config/BUILDCONFIG.gn
+@@ -134,10 +134,10 @@ declare_args() {
+ is_official_build = false
+
+ # Whether we're a traditional desktop unix.
+- is_desktop_linux = current_os == "linux"
++ is_desktop_linux = current_os == "linux" || current_os == "freebsd"
+
+ # Set to true when compiling with the Clang compiler.
+- is_clang = current_os != "linux" ||
++ is_clang = current_os != "linux" || current_os == "freebsd" ||
+ (current_cpu != "s390x" && current_cpu != "s390" &&
+ current_cpu != "ppc64" && current_cpu != "ppc" &&
+ current_cpu != "mips" && current_cpu != "mips64")
+@@ -189,8 +189,8 @@ if (host_toolchain == "") {
+ # TODO(dpranke): Add some sort of assert here that verifies that
+ # no toolchain omitted host_toolchain from its toolchain_args().
+
+- if (host_os == "linux") {
+- if (target_os != "linux") {
++ if (host_os == "linux" || host_os == "freebsd") {
++ if (target_os != "linux" && target_os != "freebsd") {
+ host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
+ } else if (is_clang) {
+ host_toolchain = "//build/toolchain/linux:clang_$host_cpu"
+@@ -227,7 +227,7 @@ if (target_os == "android") {
+ assert(host_os == "linux" || host_os == "mac",
+ "Android builds are only supported on Linux and Mac hosts.")
+ _default_toolchain = "//build/toolchain/android:android_clang_$target_cpu"
+-} else if (target_os == "chromeos" || target_os == "linux") {
++} else if (target_os == "chromeos" || target_os == "linux" || target_os == "freebsd") {
+ # See comments in build/toolchain/cros/BUILD.gn about board compiles.
+ if (is_clang) {
+ _default_toolchain = "//build/toolchain/linux:clang_$target_cpu"
+@@ -291,10 +291,11 @@ is_android = current_os == "android"
+ is_chromeos = current_os == "chromeos"
+ is_fuchsia = current_os == "fuchsia"
+ is_ios = current_os == "ios"
+-is_linux = current_os == "chromeos" || current_os == "linux"
++is_linux = current_os == "chromeos" || current_os == "linux" || current_os == "freebsd"
+ is_mac = current_os == "mac"
+ is_nacl = current_os == "nacl"
+ is_win = current_os == "win" || current_os == "winuwp"
++is_bsd = current_os == "freebsd"
+
+ is_posix = !is_win && !is_fuchsia
+
diff --git a/devel/electron7/files/patch-build_config_compiler_BUILD.gn b/devel/electron7/files/patch-build_config_compiler_BUILD.gn
new file mode 100644
index 000000000000..fa9eb6b79c6b
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_compiler_BUILD.gn
@@ -0,0 +1,92 @@
+--- build/config/compiler/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ build/config/compiler/BUILD.gn
+@@ -57,7 +57,7 @@ declare_args() {
+ # only two architectures that are currently checked in). Turn this off when
+ # you are using a custom toolchain and need to control -B in cflags.
+ linux_use_bundled_binutils =
+- linux_use_bundled_binutils_override && is_linux &&
++ linux_use_bundled_binutils_override && (is_linux && !is_bsd) &&
+ (current_cpu == "x64" || current_cpu == "x86")
+ binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+ root_build_dir)
+@@ -288,7 +288,7 @@ config("compiler") {
+
+ # Linker warnings.
+ if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
+- !is_mac && !is_ios && current_os != "aix") {
++ !is_mac && !is_ios && current_os != "aix" && !is_bsd) {
+ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+ ldflags += [ "-Wl,--fatal-warnings" ]
+ }
+@@ -383,7 +383,7 @@ config("compiler") {
+
+ # Compiler instrumentation can introduce dependencies in DSOs to symbols in
+ # the executable they are loaded into, so they are unresolved at link-time.
+- if (!using_sanitizer) {
++ if (!using_sanitizer && !is_bsd) {
+ ldflags += [
+ "-Wl,-z,defs",
+ "-Wl,--as-needed",
+@@ -483,7 +483,7 @@ config("compiler") {
+ }
+ }
+
+- if (is_clang && !is_nacl && !use_xcode_clang) {
++ if (is_clang && !is_nacl && !use_xcode_clang && !is_bsd) {
+ cflags += [ "-fcrash-diagnostics-dir=" +
+ rebase_path("//tools/clang/crashreports", root_build_dir) ]
+
+@@ -753,7 +753,7 @@ config("compiler_cpu_abi") {
+ cflags += [ "-mtune=$arm_tune" ]
+ }
+ } else if (current_cpu == "arm64") {
+- if (is_clang && !is_android && !is_nacl && !is_fuchsia) {
++ if (is_clang && !is_android && !is_nacl && !is_fuchsia && !is_bsd) {
+ cflags += [ "--target=aarch64-linux-gnu" ]
+ ldflags += [ "--target=aarch64-linux-gnu" ]
+ }
+@@ -1104,7 +1104,7 @@ config("compiler_deterministic") {
+ "-Xclang",
+ ".",
+ ]
+- if (!is_win) {
++ if (!is_win && !is_bsd) {
+ # We don't use clang -cc1as on Windows (yet? https://crbug.com/762167)
+ asmflags = [ "-Wa,-fdebug-compilation-dir,." ]
+ }
+@@ -1493,7 +1493,7 @@ config("default_warnings") {
+ cflags += [ "-Wno-nonportable-include-path" ]
+ }
+
+- if (current_toolchain == host_toolchain || !use_xcode_clang) {
++ if ((current_toolchain == host_toolchain || !use_xcode_clang) && !is_bsd) {
+ # Flags NaCl (Clang 3.7) and Xcode 9.2 (Clang clang-900.0.39.2) do not
+ # recognize.
+ cflags += [
+@@ -1722,7 +1722,7 @@ config("thin_archive") {
+ # Mac and iOS use the mac-specific "libtool" command, not ar, which doesn't
+ # have a "thin archive" mode (it does accept -T, but it means truncating
+ # archive names to 16 characters, which is not what we want).
+- if ((is_posix && !is_nacl && !is_mac && !is_ios) || is_fuchsia) {
++ if ((is_posix && !is_nacl && !is_mac && !is_ios && !is_bsd) || is_fuchsia) {
+ arflags = [ "-T" ]
+ } else if (is_win && use_lld) {
+ arflags = [ "/llvmlibthin" ]
+@@ -2292,7 +2292,7 @@ config("symbols") {
+ # flag, so we can use use -g1 for pnacl and nacl-clang compiles.
+ # gcc nacl is is_nacl && !is_clang, pnacl and nacl-clang are && is_clang.
+ if (!is_nacl || is_clang) {
+- cflags += [ "-g2" ]
++ cflags += [ "-g0" ]
+ }
+
+ if (use_debug_fission && !is_nacl && !is_android) {
+@@ -2313,7 +2313,7 @@ config("symbols") {
+ # DWARF info may be corrupt; offsets in a range list entry are in different
+ # sections" there. Maybe just a bug in nacl_switch_32.S.
+ if (!is_mac && !is_ios && !is_nacl && current_cpu != "x86" &&
+- (use_gold || use_lld)) {
++ (use_gold || use_lld) && !is_bsd) {
+ if (is_clang) {
+ # This flag enables the GNU-format pubnames and pubtypes sections,
+ # which lld needs in order to generate a correct GDB index.
diff --git a/devel/electron7/files/patch-build_config_compiler_compiler.gni b/devel/electron7/files/patch-build_config_compiler_compiler.gni
new file mode 100644
index 000000000000..3fb0469c7965
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_compiler_compiler.gni
@@ -0,0 +1,11 @@
+--- build/config/compiler/compiler.gni.orig 2019-12-12 12:38:59 UTC
++++ build/config/compiler/compiler.gni
+@@ -188,7 +188,7 @@ declare_args() {
+ declare_args() {
+ # Whether to use the gold linker from binutils instead of lld or bfd.
+ use_gold =
+- !use_lld && !(is_chromecast && is_linux &&
++ !is_bsd && !use_lld && !(is_chromecast && is_linux &&
+ (current_cpu == "arm" || current_cpu == "mipsel")) &&
+ ((is_linux && (current_cpu == "x64" || current_cpu == "x86" ||
+ current_cpu == "arm" || current_cpu == "arm64" ||
diff --git a/devel/electron7/files/patch-build_config_features.gni b/devel/electron7/files/patch-build_config_features.gni
new file mode 100644
index 000000000000..b779ba793ff5
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_features.gni
@@ -0,0 +1,11 @@
+--- build/config/features.gni.orig 2019-12-12 12:38:59 UTC
++++ build/config/features.gni
+@@ -26,7 +26,7 @@ declare_args() {
+ proprietary_codecs = is_chrome_branded || is_chromecast
+
+ # libudev usage. This currently only affects the content layer.
+- use_udev = is_linux && !is_chromecast
++ use_udev = is_linux && !is_chromecast && !is_bsd
+
+ use_dbus = is_linux && !is_chromecast
+
diff --git a/devel/electron7/files/patch-build_config_freetype_freetype.gni b/devel/electron7/files/patch-build_config_freetype_freetype.gni
new file mode 100644
index 000000000000..b91138e3185b
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_freetype_freetype.gni
@@ -0,0 +1,9 @@
+--- build/config/freetype/freetype.gni.orig 2019-12-12 12:38:59 UTC
++++ build/config/freetype/freetype.gni
+@@ -10,5 +10,5 @@ declare_args() {
+ # than version 2.7.1 and have color bitmap support compiled in. WARNING:
+ # System FreeType configurations other than as described WILL INTRODUCE TEXT
+ # RENDERING AND SECURITY REGRESSIONS.
+- use_system_freetype = false
++ use_system_freetype = true
+ }
diff --git a/devel/electron7/files/patch-build_config_linux_BUILD.gn b/devel/electron7/files/patch-build_config_linux_BUILD.gn
new file mode 100644
index 000000000000..c8fa33f48557
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_linux_BUILD.gn
@@ -0,0 +1,11 @@
+--- build/config/linux/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ build/config/linux/BUILD.gn
+@@ -28,7 +28,7 @@ config("runtime_library") {
+ }
+
+ if ((!is_chromeos || default_toolchain != "//build/toolchain/cros:target") &&
+- (!use_custom_libcxx || current_cpu == "mipsel")) {
++ (!use_custom_libcxx || current_cpu == "mipsel") && !is_bsd) {
+ libs = [ "atomic" ]
+ }
+ }
diff --git a/devel/electron7/files/patch-build_config_linux_pkg-config.py b/devel/electron7/files/patch-build_config_linux_pkg-config.py
new file mode 100644
index 000000000000..c3cff115c73d
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_linux_pkg-config.py
@@ -0,0 +1,26 @@
+--- build/config/linux/pkg-config.py.orig 2019-12-12 12:38:59 UTC
++++ build/config/linux/pkg-config.py
+@@ -59,8 +59,12 @@ def SetConfigPath(options):
+ print("You must specify an architecture via -a if using a sysroot.")
+ sys.exit(1)
+
+- libdir = sysroot + '/usr/' + options.system_libdir + '/pkgconfig'
+- libdir += ':' + sysroot + '/usr/share/pkgconfig'
++ if "linux" in sys.platform:
++ libdir = sysroot + '/libdata/' + options.system_libdir + '/pkgconfig'
++ libdir += ':' + sysroot + '/usr/share/pkgconfig'
++ elif "bsd" in sys.platform:
++ libdir = sysroot + '/libdata/pkgconfig'
++ libdir += ':' + '/usr/libdata/pkgconfig'
+ os.environ['PKG_CONFIG_LIBDIR'] = libdir
+ return libdir
+
+@@ -109,7 +113,7 @@ def main():
+ # If this is run on non-Linux platforms, just return nothing and indicate
+ # success. This allows us to "kind of emulate" a Linux build from other
+ # platforms.
+- if "linux" not in sys.platform:
++ if "bsd" not in sys.platform:
+ print("[[],[],[],[],[]]")
+ return 0
+
diff --git a/devel/electron7/files/patch-build_config_sysroot.gni b/devel/electron7/files/patch-build_config_sysroot.gni
new file mode 100644
index 000000000000..9d0cc2cc00e8
--- /dev/null
+++ b/devel/electron7/files/patch-build_config_sysroot.gni
@@ -0,0 +1,15 @@
+--- build/config/sysroot.gni.orig 2019-12-12 12:38:59 UTC
++++ build/config/sysroot.gni
+@@ -15,9 +15,10 @@ declare_args() {
+ # The absolute path to directory containing linux sysroot images
+ target_sysroot_dir = "//build/linux"
+
+- use_sysroot = current_cpu == "x86" || current_cpu == "x64" ||
++ use_sysroot = !is_bsd && (
++ current_cpu == "x86" || current_cpu == "x64" ||
+ current_cpu == "arm" || current_cpu == "arm64" ||
+- current_cpu == "mipsel" || current_cpu == "mips64el"
++ current_cpu == "mipsel" || current_cpu == "mips64el")
+ }
+
+ if (current_os == target_os && current_cpu == target_cpu &&
diff --git a/devel/electron7/files/patch-build_detect__host__arch.py b/devel/electron7/files/patch-build_detect__host__arch.py
new file mode 100644
index 000000000000..a0ab500a5c14
--- /dev/null
+++ b/devel/electron7/files/patch-build_detect__host__arch.py
@@ -0,0 +1,11 @@
+--- build/detect_host_arch.py.orig 2019-12-12 12:38:59 UTC
++++ build/detect_host_arch.py
+@@ -21,6 +21,8 @@ def HostArch():
+ host_arch = 'ia32'
+ elif host_arch in ['x86_64', 'amd64']:
+ host_arch = 'x64'
++ elif host_arch.startswith('arm64'):
++ host_arch = 'arm64'
+ elif host_arch.startswith('arm'):
+ host_arch = 'arm'
+ elif host_arch.startswith('aarch64'):
diff --git a/devel/electron7/files/patch-build_gn__run__binary.py b/devel/electron7/files/patch-build_gn__run__binary.py
new file mode 100644
index 000000000000..1b9db04d2bd1
--- /dev/null
+++ b/devel/electron7/files/patch-build_gn__run__binary.py
@@ -0,0 +1,11 @@
+--- build/gn_run_binary.py.orig 2019-12-12 12:38:59 UTC
++++ build/gn_run_binary.py
+@@ -24,7 +24,7 @@ if not os.path.isabs(path):
+ # The rest of the arguments are passed directly to the executable.
+ args = [path] + sys.argv[2:]
+
+-ret = subprocess.call(args)
++ret = subprocess.call(args, env={"CHROME_EXE_PATH":"${WRKSRC}/out/Release/chrome"})
+ if ret != 0:
+ if ret <= -100:
+ # Windows error codes such as 0xC0000005 and 0xC0000409 are much easier to
diff --git a/devel/electron7/files/patch-build_linux_chrome.map b/devel/electron7/files/patch-build_linux_chrome.map
new file mode 100644
index 000000000000..ca4ed2e750d0
--- /dev/null
+++ b/devel/electron7/files/patch-build_linux_chrome.map
@@ -0,0 +1,29 @@
+--- build/linux/chrome.map.orig 2019-12-12 12:38:59 UTC
++++ build/linux/chrome.map
+@@ -1,4 +1,7 @@
+ {
++local:
++ *;
++
+ global:
+ __bss_start;
+ __data_start;
+@@ -20,6 +23,10 @@ global:
+ # Program entry point.
+ _start;
+
++ # FreeBSD specific variables.
++ __progname;
++ environ;
++
+ # Memory allocation symbols. We want chrome and any libraries to
+ # share the same heap, so it is correct to export these symbols.
+ calloc;
+@@ -81,7 +88,4 @@ global:
+ localtime64;
+ localtime64_r;
+ localtime_r;
+-
+-local:
+- *;
+ };
diff --git a/devel/electron7/files/patch-build_linux_libpci_BUILD.gn b/devel/electron7/files/patch-build_linux_libpci_BUILD.gn
new file mode 100644
index 000000000000..be5d024232e1
--- /dev/null
+++ b/devel/electron7/files/patch-build_linux_libpci_BUILD.gn
@@ -0,0 +1,53 @@
+--- build/linux/libpci/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ build/linux/libpci/BUILD.gn
+@@ -3,20 +3,36 @@
+ # found in the LICENSE file.
+
+ import("//tools/generate_library_loader/generate_library_loader.gni")
++import("//build/config/linux/pkg_config.gni")
+
+-# This generates a target named "libpci".
+-generate_library_loader("libpci") {
+- name = "LibPciLoader"
+- output_h = "libpci.h"
+- output_cc = "libpci_loader.cc"
+- header = "<pci/pci.h>"
++declare_args() {
++ use_system_libpci = is_bsd
++}
+
+- functions = [
+- "pci_alloc",
+- "pci_init",
+- "pci_cleanup",
+- "pci_scan_bus",
+- "pci_fill_info",
+- "pci_lookup_name",
+- ]
++if (use_system_libpci) {
++ pkg_config("system_libpci") {
++ packages = [ "libpci" ]
++ }
++
++ source_set("libpci") {
++ public_configs = [ ":system_libpci" ]
++ }
++
++} else {
++ # This generates a target named "libpci".
++ generate_library_loader("libpci") {
++ name = "LibPciLoader"
++ output_h = "libpci.h"
++ output_cc = "libpci_loader.cc"
++ header = "<pci/pci.h>"
++
++ functions = [
++ "pci_alloc",
++ "pci_init",
++ "pci_cleanup",
++ "pci_scan_bus",
++ "pci_fill_info",
++ "pci_lookup_name",
++ ]
++ }
+ }
diff --git a/devel/electron7/files/patch-build_linux_unbundle_libusb.gn b/devel/electron7/files/patch-build_linux_unbundle_libusb.gn
new file mode 100644
index 000000000000..46cef00fa011
--- /dev/null
+++ b/devel/electron7/files/patch-build_linux_unbundle_libusb.gn
@@ -0,0 +1,27 @@
+--- build/linux/unbundle/libusb.gn.orig 2019-12-16 13:33:53 UTC
++++ build/linux/unbundle/libusb.gn
+@@ -0,0 +1,24 @@
++# Copyright 2016 The Chromium Authors. All rights reserved.
++# Use of this source code is governed by a BSD-style license that can be
++# found in the LICENSE file.
++
++import("//build/config/linux/pkg_config.gni")
++import("//build/shim_headers.gni")
++
++pkg_config("system_libusb") {
++ packages = [ "libusb-1.0" ]
++}
++
++shim_headers("libusb_shim") {
++ root_path = "src/libusb"
++ headers = [
++ "libusb.h",
++ ]
++}
++
++source_set("libusb") {
++ deps = [
++ ":libusb_shim",
++ ]
++ public_configs = [ ":system_libusb" ]
++}
diff --git a/devel/electron7/files/patch-build_linux_unbundle_replace__gn__files.py b/devel/electron7/files/patch-build_linux_unbundle_replace__gn__files.py
new file mode 100644
index 000000000000..7243b19ecb39
--- /dev/null
+++ b/devel/electron7/files/patch-build_linux_unbundle_replace__gn__files.py
@@ -0,0 +1,10 @@
+--- build/linux/unbundle/replace_gn_files.py.orig 2019-12-12 12:38:59 UTC
++++ build/linux/unbundle/replace_gn_files.py
+@@ -27,6 +27,7 @@ REPLACEMENTS = {
+ 'libevent': 'base/third_party/libevent/BUILD.gn',
+ 'libjpeg': 'third_party/libjpeg.gni',
+ 'libpng': 'third_party/libpng/BUILD.gn',
++ 'libusb': 'third_party/libusb/BUILD.gn',
+ 'libvpx': 'third_party/libvpx/BUILD.gn',
+ 'libwebp': 'third_party/libwebp/BUILD.gn',
+ 'libxml': 'third_party/libxml/BUILD.gn',
diff --git a/devel/electron7/files/patch-build_toolchain_gcc__toolchain.gni b/devel/electron7/files/patch-build_toolchain_gcc__toolchain.gni
new file mode 100644
index 000000000000..5c6da09e8207
--- /dev/null
+++ b/devel/electron7/files/patch-build_toolchain_gcc__toolchain.gni
@@ -0,0 +1,45 @@
+--- build/toolchain/gcc_toolchain.gni.orig 2019-12-12 12:38:59 UTC
++++ build/toolchain/gcc_toolchain.gni
+@@ -36,6 +36,11 @@ if (is_linux && target_os == "android") {
+ enable_resource_whitelist_generation = false
+ }
+
++declare_args() {
++ extra_cxxflags = ""
++ extra_ldflags = ""
++}
++
+ # This template defines a toolchain for something that works like gcc
+ # (including clang).
+ #
+@@ -589,13 +594,23 @@ template("clang_toolchain") {
+ }
+
+ gcc_toolchain(target_name) {
+- prefix = rebase_path("$clang_base_path/bin", root_build_dir)
+- cc = "$prefix/clang"
+- cxx = "$prefix/clang++"
+- ld = cxx
+- readelf = "${toolprefix}readelf"
+- ar = "${prefix}/llvm-ar"
+- nm = "${toolprefix}nm"
++ if (is_bsd) {
++ prefix = "/usr/local/bin"
++ cc = "cc"
++ cxx = "c++"
++ ld = cxx
++ readelf = "readelf"
++ ar = "${prefix}/ar"
++ nm = "${toolprefix}nm"
++ } else {
++ prefix = rebase_path("$clang_base_path/bin", root_build_dir)
++ cc = "$prefix/clang"
++ cxx = "$prefix/clang++"
++ ld = cxx
++ readelf = "${toolprefix}readelf"
++ ar = "${prefix}/llvm-ar"
++ nm = "${toolprefix}nm"
++ }
+
+ forward_variables_from(invoker,
+ [
diff --git a/devel/electron7/files/patch-build_toolchain_get__concurrent__links.py b/devel/electron7/files/patch-build_toolchain_get__concurrent__links.py
new file mode 100644
index 000000000000..f91e57e044c8
--- /dev/null
+++ b/devel/electron7/files/patch-build_toolchain_get__concurrent__links.py
@@ -0,0 +1,17 @@
+--- build/toolchain/get_concurrent_links.py.orig 2019-12-12 12:38:59 UTC
++++ build/toolchain/get_concurrent_links.py
+@@ -48,6 +48,14 @@ def _GetTotalMemoryInBytes():
+ return int(subprocess.check_output(['sysctl', '-n', 'hw.memsize']))
+ except Exception:
+ return 0
++ elif sys.platform.startswith('freebsd'):
++ try:
++ avail_bytes = int(subprocess.check_output(['sysctl', '-n', 'hw.physmem']))
++ # With -fuse-lld it doesn't take a lot of ram, feel free to change that
++ # 1 * ... to needed amount
++ return max(1, avail_bytes / (1 * (2 ** 30))) # total / 4GB
++ except Exception:
++ return 1
+ # TODO(scottmg): Implement this for other platforms.
+ return 0
+
diff --git a/devel/electron7/files/patch-build_toolchain_linux_BUILD.gn b/devel/electron7/files/patch-build_toolchain_linux_BUILD.gn
new file mode 100644
index 000000000000..4184009bb3ad
--- /dev/null
+++ b/devel/electron7/files/patch-build_toolchain_linux_BUILD.gn
@@ -0,0 +1,10 @@
+--- build/toolchain/linux/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ build/toolchain/linux/BUILD.gn
+@@ -22,7 +22,6 @@ clang_toolchain("clang_arm") {
+ }
+
+ clang_toolchain("clang_arm64") {
+- toolprefix = "aarch64-linux-gnu-"
+ toolchain_args = {
+ current_cpu = "arm64"
+ current_os = "linux"
diff --git a/devel/electron7/files/patch-cc_BUILD.gn b/devel/electron7/files/patch-cc_BUILD.gn
new file mode 100644
index 000000000000..5bebee90b145
--- /dev/null
+++ b/devel/electron7/files/patch-cc_BUILD.gn
@@ -0,0 +1,21 @@
+--- cc/BUILD.gn.orig 2019-12-12 12:38:59 UTC
++++ cc/BUILD.gn
+@@ -572,7 +572,7 @@ cc_test_static_library("test_support") {
+ if (enable_vulkan) {
+ deps += [ "//gpu/vulkan/init" ]
+ }
+- if (!is_android) {
++ if (!is_android && !is_bsd) {
+ data_deps = [
+ "//third_party/mesa_headers",
+ ]
+@@ -776,9 +776,6 @@ cc_test("cc_unittests") {
+ "//ui/gfx/geometry",
+ "//ui/gl",
+ "//ui/gl:test_support",
+- ]
+- data_deps = [
+- "//third_party/mesa_headers",
+ ]
+
+ if (enable_vulkan) {
diff --git a/devel/electron7/files/patch-cc_layers_scrollbar__layer__impl__base.cc b/devel/electron7/files/patch-cc_layers_scrollbar__layer__impl__base.cc
new file mode 100644
index 000000000000..9e8589171b52
--- /dev/null
+++ b/devel/electron7/files/patch-cc_layers_scrollbar__layer__impl__base.cc
@@ -0,0 +1,13 @@
+--- cc/layers/scrollbar_layer_impl_base.cc.orig 2019-12-12 12:38:59 UTC
++++ cc/layers/scrollbar_layer_impl_base.cc
+@@ -218,8 +218,8 @@ gfx::Rect ScrollbarLayerImplBase::ComputeThumbQuadRect
+ int thumb_offset = TrackStart();
+ if (maximum > 0) {
+ float ratio = clamped_current_pos / maximum;
+- float max_offset = track_length - thumb_length;
+- thumb_offset += static_cast<int>(ratio * max_offset);
++ float _max_offset = track_length - thumb_length;
++ thumb_offset += static_cast<int>(ratio * _max_offset);
+ }
+
+ float thumb_thickness_adjustment =
diff --git a/devel/electron7/files/patch-cc_trees_property__tree.cc b/devel/electron7/files/patch-cc_trees_property__tree.cc
new file mode 100644
index 000000000000..78f2a4bb7c60
--- /dev/null
+++ b/devel/electron7/files/patch-cc_trees_property__tree.cc
@@ -0,0 +1,20 @@
+--- cc/trees/property_tree.cc.orig 2019-12-12 12:39:00 UTC
++++ cc/trees/property_tree.cc
+@@ -1278,13 +1278,13 @@ gfx::ScrollOffset ScrollTree::MaxScrollOffset(int scro
+
+ gfx::Size clip_layer_bounds = container_bounds(scroll_node->id);
+
+- gfx::ScrollOffset max_offset(
++ gfx::ScrollOffset _max_offset(
+ scaled_scroll_bounds.width() - clip_layer_bounds.width(),
+ scaled_scroll_bounds.height() - clip_layer_bounds.height());
+
+- max_offset.Scale(1 / scale_factor);
+- max_offset.SetToMax(gfx::ScrollOffset());
+- return max_offset;
++ _max_offset.Scale(1 / scale_factor);
++ _max_offset.SetToMax(gfx::ScrollOffset());
++ return _max_offset;
+ }
+
+ gfx::SizeF ScrollTree::scroll_bounds(int scroll_node_id) const {
diff --git a/devel/electron7/files/patch-chrome_app_chrome__command__ids.h b/devel/electron7/files/patch-chrome_app_chrome__command__ids.h
new file mode 100644
index 000000000000..4a839d5e2cfc
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_chrome__command__ids.h
@@ -0,0 +1,11 @@
+--- chrome/app/chrome_command_ids.h.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/chrome_command_ids.h
+@@ -63,7 +63,7 @@
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_2 34049
+ #define IDC_VISIT_DESKTOP_OF_LRU_USER_3 34050
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #define IDC_USE_SYSTEM_TITLE_BAR 34051
+ #define IDC_RESTORE_WINDOW 34052
+ #endif
diff --git a/devel/electron7/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc b/devel/electron7/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc
new file mode 100644
index 000000000000..bedc3ec93f94
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_chrome__content__browser__overlay__manifest.cc
@@ -0,0 +1,20 @@
+--- chrome/app/chrome_content_browser_overlay_manifest.cc.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/chrome_content_browser_overlay_manifest.cc
+@@ -69,7 +69,7 @@
+ #include "chrome/services/app_service/public/cpp/manifest.h"
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ #include "chrome/browser/performance_manager/webui_graph_dump.mojom.h" // nogncheck
+ #include "chrome/browser/ui/webui/discards/discards.mojom.h"
+@@ -205,7 +205,7 @@ const service_manager::Manifest& GetChromeContentBrows
+ #else
+ app_management::mojom::PageHandlerFactory,
+ #endif
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ mojom::DiscardsDetailsProvider,
+ performance_manager::mojom::WebUIGraphDump,
diff --git a/devel/electron7/files/patch-chrome_app_chrome__main.cc b/devel/electron7/files/patch-chrome_app_chrome__main.cc
new file mode 100644
index 000000000000..ff56044b016d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_chrome__main.cc
@@ -0,0 +1,16 @@
+--- chrome/app/chrome_main.cc.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/chrome_main.cc
+@@ -101,11 +101,11 @@ int ChromeMain(int argc, const char** argv) {
+ MainThreadStackSamplingProfiler scoped_sampling_profiler;
+
+ // Chrome-specific process modes.
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ if (command_line->HasSwitch(switches::kHeadless)) {
+ return headless::HeadlessShellMain(params);
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+
+ int rv = content::ContentMain(params);
+
diff --git a/devel/electron7/files/patch-chrome_app_chrome__main__delegate.cc b/devel/electron7/files/patch-chrome_app_chrome__main__delegate.cc
new file mode 100644
index 000000000000..0c05a2b85d05
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_chrome__main__delegate.cc
@@ -0,0 +1,144 @@
+--- chrome/app/chrome_main_delegate.cc.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/chrome_main_delegate.cc
+@@ -99,7 +99,7 @@
+ #include "chrome/app/shutdown_signal_handlers_posix.h"
+ #endif
+
+-#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX)
++#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) && !defined(OS_BSD)
+ #include "components/nacl/common/nacl_paths.h"
+ #include "components/nacl/zygote/nacl_fork_delegate_linux.h"
+ #endif
+@@ -137,7 +137,7 @@
+ #include "v8/include/v8.h"
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/environment.h"
+ #endif
+
+@@ -240,7 +240,7 @@ bool UseHooks() {
+
+ #endif // defined(OS_WIN)
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) && !defined(OS_BSD)
+ void AdjustLinuxOOMScore(const std::string& process_type) {
+ // Browsers and zygotes should still be killable, but killed last.
+ const int kZygoteScore = 0;
+@@ -299,13 +299,13 @@ void AdjustLinuxOOMScore(const std::string& process_ty
+ if (score > -1)
+ base::AdjustOOMScore(base::GetCurrentProcId(), score);
+ }
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) && !defined(OS_BSD)
+
+ // Returns true if this subprocess type needs the ResourceBundle initialized
+ // and resources loaded.
+ bool SubprocessNeedsResourceBundle(const std::string& process_type) {
+ return
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // The zygote process opens the resources for the renderers.
+ process_type == service_manager::switches::kZygoteProcess ||
+ #endif
+@@ -344,7 +344,7 @@ bool HandleVersionSwitches(const base::CommandLine& co
+ return false;
+ }
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // Show the man page if --help or -h is on the command line.
+ void HandleHelpSwitches(const base::CommandLine& command_line) {
+ if (command_line.HasSwitch(switches::kHelp) ||
+@@ -354,7 +354,7 @@ void HandleHelpSwitches(const base::CommandLine& comma
+ PLOG(FATAL) << "execlp failed";
+ }
+ }
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ #if !defined(OS_MACOSX) && !defined(OS_ANDROID)
+ void SIGTERMProfilingShutdown(int signal) {
+@@ -408,7 +408,7 @@ void InitializeUserDataDir(base::CommandLine* command_
+ std::string process_type =
+ command_line->GetSwitchValueASCII(switches::kProcessType);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // On Linux, Chrome does not support running multiple copies under different
+ // DISPLAYs, so the profile directory can be specified in the environment to
+ // support the virtual desktop use-case.
+@@ -420,7 +420,7 @@ void InitializeUserDataDir(base::CommandLine* command_
+ user_data_dir = base::FilePath::FromUTF8Unsafe(user_data_dir_string);
+ }
+ }
+-#endif // OS_LINUX
++#endif // OS_LINUX || OS_BSD
+ #if defined(OS_MACOSX)
+ policy::path_parser::CheckUserDataDirPolicy(&user_data_dir);
+ #endif // OS_MAC
+@@ -477,7 +477,7 @@ void InitLogging(const std::string& process_type) {
+ void RecordMainStartupMetrics(base::TimeTicks exe_entry_point_ticks) {
+ if (!exe_entry_point_ticks.is_null())
+ startup_metric_utils::RecordExeMainEntryPointTicks(exe_entry_point_ticks);
+-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ // Record the startup process creation time on supported platforms.
+ startup_metric_utils::RecordStartupProcessCreationTime(
+ base::Process::Current().CreationTime());
+@@ -654,7 +654,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
+ *exit_code = 0;
+ return true; // Got a --version switch; exit with a success error code.
+ }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // This will directly exit if the user asked for help.
+ HandleHelpSwitches(command_line);
+ #endif
+@@ -678,7 +678,7 @@ bool ChromeMainDelegate::BasicStartupComplete(int* exi
+ #if defined(OS_CHROMEOS)
+ chromeos::RegisterPathProvider();
+ #endif
+-#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX)
++#if BUILDFLAG(ENABLE_NACL) && defined(OS_LINUX) && !defined(OS_BSD)
+ nacl::RegisterPathProvider();
+ #endif
+
+@@ -872,7 +872,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
+ #if defined(OS_WIN)
+ child_process_logging::Init();
+ #endif
+-#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX))
++#if defined(ARCH_CPU_ARM_FAMILY) && (defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_BSD))
+ // Create an instance of the CPU class to parse /proc/cpuinfo and cache
+ // cpu_brand info.
+ base::CPU cpu_info;
+@@ -996,7 +996,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
+ InitializePDF();
+ #endif
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ // Zygote needs to call InitCrashReporter() in RunZygote().
+ if (process_type != service_manager::switches::kZygoteProcess) {
+ #if defined(OS_ANDROID)
+@@ -1011,7 +1011,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
+ breakpad::InitCrashReporter(process_type);
+ #endif // defined(OS_ANDROID)
+ }
+-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
++#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+
+ // After all the platform Breakpads have been initialized, store the command
+ // line for crash reporting.
+@@ -1021,7 +1021,7 @@ void ChromeMainDelegate::PreSandboxStartup() {
+ void ChromeMainDelegate::SandboxInitialized(const std::string& process_type) {
+ // Note: If you are adding a new process type below, be sure to adjust the
+ // AdjustLinuxOOMScore function too.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) && !defined(OS_BSD)
+ AdjustLinuxOOMScore(process_type);
+ #endif
+ #if defined(OS_WIN)
diff --git a/devel/electron7/files/patch-chrome_app_chromium__strings.grd b/devel/electron7/files/patch-chrome_app_chromium__strings.grd
new file mode 100644
index 000000000000..a55db99e25d2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_chromium__strings.grd
@@ -0,0 +1,29 @@
+--- chrome/app/chromium_strings.grd.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/chromium_strings.grd
+@@ -694,7 +694,7 @@ Signing in anyway will merge Chromium information like
+ </if>
+
+ <!-- about:browser-switch strings -->
+- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
++ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
+ <message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
+ Your system administrator has configured Chromium to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
+ </message>
+@@ -825,7 +825,7 @@ Signing in anyway will merge Chromium information like
+ </message>
+
+ <!-- ProcessSingleton -->
+- <if expr="is_linux or is_macosx">
++ <if expr="is_linux or is_macosx or is_posix">
+ <message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
+ The profile appears to be in use by another Chromium process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.
+ </message>
+@@ -1069,7 +1069,7 @@ Signing in anyway will merge Chromium information like
+ </message>
+
+ <!-- Plugin Placeholders -->
+- <if expr="is_linux">
++ <if expr="is_posix">
+ <message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted.">
+ Restart Chromium to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>
+ </message>
diff --git a/devel/electron7/files/patch-chrome_app_generated__resources.grd b/devel/electron7/files/patch-chrome_app_generated__resources.grd
new file mode 100644
index 000000000000..2e023ae28803
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_generated__resources.grd
@@ -0,0 +1,29 @@
+--- chrome/app/generated_resources.grd.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/generated_resources.grd
+@@ -4885,7 +4885,7 @@ Keep your key file in a safe place. You will need it t
+ </if>
+
+ <!-- chrome://browser-switch strings -->
+- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
++ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
+ <message name="IDS_ABOUT_BROWSER_SWITCH_TITLE" desc="about:browser-switch page title">
+ Legacy Browser Support
+ </message>
+@@ -6520,7 +6520,7 @@ the Bookmarks menu.">
+ Google Pay
+ </message>
+
+- <if expr="is_linux and not chromeos">
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_SHOW_WINDOW_DECORATIONS" desc="The label of a radio button in the options dialog for using the system title bar and borders.">
+ Use system title bar and borders
+ </message>
+@@ -7401,7 +7401,7 @@ Please help our engineers fix this problem. Tell us wh
+ Set as default
+ </message>
+
+- <if expr="is_linux and not chromeos">
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_MINIMIZE_WINDOW_MENU" desc="The Linux browser window menu item text for minimizing the window.">
+ Minimize
+ </message>
diff --git a/devel/electron7/files/patch-chrome_app_google__chrome__strings.grd b/devel/electron7/files/patch-chrome_app_google__chrome__strings.grd
new file mode 100644
index 000000000000..256daa8d776a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_google__chrome__strings.grd
@@ -0,0 +1,29 @@
+--- chrome/app/google_chrome_strings.grd.orig 2019-12-12 12:39:04 UTC
++++ chrome/app/google_chrome_strings.grd
+@@ -706,7 +706,7 @@ Signing in anyway will merge Chrome information like b
+ </if>
+
+ <!-- about:browser-switch strings -->
+- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
++ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
+ <message name="IDS_ABOUT_BROWSER_SWITCH_DESCRIPTION_UNKNOWN_BROWSER" desc="Description shown while waiting for an alternative browser to open, when the browser name is not auto-detected">
+ Your system administrator has configured Google Chrome to open an alternative browser to access <ph name="TARGET_URL_HOSTNAME">$1<ex>example.com</ex></ph>.
+ </message>
+@@ -837,7 +837,7 @@ Signing in anyway will merge Chrome information like b
+ </message>
+
+ <!-- ProcessSingleton -->
+- <if expr="is_linux or is_macosx">
++ <if expr="is_linux or is_macosx or is_posix">
+ <message name="IDS_PROFILE_IN_USE_POSIX" desc="Message shown when the browser cannot start because the profile is in use on a different host.">
+ The profile appears to be in use by another Google Chrome process (<ph name="PROCESS_ID">$1<ex>12345</ex></ph>) on another computer (<ph name="HOST_NAME">$2<ex>example.com</ex></ph>). Chrome has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chrome.
+ </message>
+@@ -1088,7 +1088,7 @@ Signing in anyway will merge Chrome information like b
+ </message>
+
+ <!-- Plugin Placeholders -->
+- <if expr="is_linux">
++ <if expr="is_posix">
+ <message name="IDS_PLUGIN_RESTART_REQUIRED" desc="The placeholder text for a plugin that can't be loaded until the browser is restarted.">
+ Restart Chrome to enable <ph name="PLUGIN_NAME">$1<ex>Flash</ex></ph>
+ </message>
diff --git a/devel/electron7/files/patch-chrome_app_settings__strings.grdp b/devel/electron7/files/patch-chrome_app_settings__strings.grdp
new file mode 100644
index 000000000000..2c84d31bd8a6
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_settings__strings.grdp
@@ -0,0 +1,20 @@
+--- chrome/app/settings_strings.grdp.orig 2019-12-12 12:39:06 UTC
++++ chrome/app/settings_strings.grdp
+@@ -757,7 +757,7 @@
+ Themes
+ </message>
+ </if>
+- <if expr="is_linux and not chromeos">
++ <if expr="is_posix and not chromeos">
+ <message name="IDS_SETTINGS_SYSTEM_THEME" desc="Text of the label describing the system (GTK+) browser theme on Linux">
+ GTK+
+ </message>
+@@ -771,7 +771,7 @@
+ Use Classic
+ </message>
+ </if>
+- <if expr="not is_linux or chromeos">
++ <if expr="not is_posix or chromeos">
+ <message name="IDS_SETTINGS_RESET_TO_DEFAULT_THEME" desc="Name of the control which resets the browser theme back to the default theme.">
+ Reset to default
+ </message>
diff --git a/devel/electron7/files/patch-chrome_app_shutdown__signal__handlers__posix.cc b/devel/electron7/files/patch-chrome_app_shutdown__signal__handlers__posix.cc
new file mode 100644
index 000000000000..1a06edd9aeb5
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_shutdown__signal__handlers__posix.cc
@@ -0,0 +1,21 @@
+--- chrome/app/shutdown_signal_handlers_posix.cc.orig 2019-12-12 12:39:06 UTC
++++ chrome/app/shutdown_signal_handlers_posix.cc
+@@ -186,12 +186,18 @@ void InstallShutdownSignalHandlers(
+ g_pipe_pid = getpid();
+ g_shutdown_pipe_read_fd = pipefd[0];
+ g_shutdown_pipe_write_fd = pipefd[1];
++#if defined(OS_BSD)
++ // PTHREAD_STACK_MIN causes chromium to crash under FreeBSD,
++ // we request the default pthread stack size by specifying 0 here.
++ const size_t kShutdownDetectorThreadStackSize = 0;
++#else
+ #if !defined(ADDRESS_SANITIZER)
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 2;
+ #else
+ // ASan instrumentation bloats the stack frames, so we need to increase the
+ // stack size to avoid hitting the guard page.
+ const size_t kShutdownDetectorThreadStackSize = PTHREAD_STACK_MIN * 4;
++#endif
+ #endif
+ ShutdownDetector* detector = new ShutdownDetector(
+ g_shutdown_pipe_read_fd, std::move(shutdown_callback), task_runner);
diff --git a/devel/electron7/files/patch-chrome_app_theme_chrome__unscaled__resources.grd b/devel/electron7/files/patch-chrome_app_theme_chrome__unscaled__resources.grd
new file mode 100644
index 000000000000..ca75c7a3b577
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_theme_chrome__unscaled__resources.grd
@@ -0,0 +1,20 @@
+--- chrome/app/theme/chrome_unscaled_resources.grd.orig 2019-12-12 12:39:06 UTC
++++ chrome/app/theme/chrome_unscaled_resources.grd
+@@ -18,7 +18,7 @@
+ <include name="IDR_PRODUCT_LOGO_64" file="google_chrome/product_logo_64.png" type="BINDATA" />
+ <include name="IDR_PRODUCT_LOGO_128" file="google_chrome/product_logo_128.png" type="BINDATA" />
+ <include name="IDR_PRODUCT_LOGO_256" file="google_chrome/product_logo_256.png" type="BINDATA" />
+- <if expr="is_linux">
++ <if expr="is_posix">
+ <include name="IDR_PRODUCT_LOGO_128_BETA" file="google_chrome/product_logo_128_beta.png" type="BINDATA" />
+ <include name="IDR_PRODUCT_LOGO_128_DEV" file="google_chrome/product_logo_128_dev.png" type="BINDATA" />
+ </if>
+@@ -109,7 +109,7 @@
+ <include name="IDR_PROFILE_AVATAR_2X_25" file="default_200_percent/common/profile_avatar_sun_cloud.png" type="BINDATA" />
+ <include name="IDR_PROFILE_AVATAR_2X_26" file="default_200_percent/common/profile_avatar_placeholder.png" type="BINDATA" />
+ </if>
+- <if expr="is_linux and enable_app_list">
++ <if expr="is_posix and enable_app_list">
+ <!-- App Launcher icons for desktop icon. -->
+ <if expr="_google_chrome">
+ <then>
diff --git a/devel/electron7/files/patch-chrome_app_theme_theme__resources.grd b/devel/electron7/files/patch-chrome_app_theme_theme__resources.grd
new file mode 100644
index 000000000000..c10ff84a82ca
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_app_theme_theme__resources.grd
@@ -0,0 +1,11 @@
+--- chrome/app/theme/theme_resources.grd.orig 2019-12-12 12:39:07 UTC
++++ chrome/app/theme/theme_resources.grd
+@@ -25,7 +25,7 @@
+ <!-- KEEP THESE IN ALPHABETICAL ORDER! DO NOT ADD TO RANDOM PLACES JUST
+ BECAUSE YOUR RESOURCES ARE FUNCTIONALLY RELATED OR FALL UNDER THE
+ SAME CONDITIONALS. -->
+- <if expr="is_linux or is_win or chromeos">
++ <if expr="is_posix or is_win or chromeos">
+ <structure type="chrome_scaled_image" name="IDR_ACCESSIBILITY_CAPTIONS_PREVIEW_BACKGROUND" file="common/captions-preview-bg.png" />
+ </if>
+ <if expr="toolkit_views and not is_macosx">
diff --git a/devel/electron7/files/patch-chrome_browser_about__flags.cc b/devel/electron7/files/patch-chrome_browser_about__flags.cc
new file mode 100644
index 000000000000..eb35ee59782a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_about__flags.cc
@@ -0,0 +1,285 @@
+--- chrome/browser/about_flags.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/about_flags.cc
+@@ -162,7 +162,7 @@
+ #include "ui/gl/gl_switches.h"
+ #include "ui/native_theme/native_theme_features.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/allocator/buildflags.h"
+ #endif
+
+@@ -716,7 +716,7 @@ const FeatureEntry::FeatureVariation
+ nullptr}};
+ #endif // OS_ANDROID
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ const FeatureEntry::FeatureParam
+ kAutofillSaveCreditCardUsesImprovedMessagingStoreCard[] = {
+ {autofill::features::
+@@ -763,7 +763,7 @@ const FeatureEntry::FeatureVariation
+ kAutofillSaveCreditCardUsesImprovedMessagingConfirmAndSaveCard),
+ nullptr},
+ };
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ const FeatureEntry::Choice kMemlogModeChoices[] = {
+ {flags_ui::kGenericExperimentChoiceDisabled, "", ""},
+@@ -816,7 +816,7 @@ const FeatureEntry::Choice kMemlogSamplingRateChoices[
+ heap_profiling::kMemlogSamplingRate5MB},
+ };
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ const FeatureEntry::FeatureParam kOmniboxDocumentProviderServerScoring[] = {
+ {"DocumentUseServerScore", "true"},
+ {"DocumentUseClientScore", "false"},
+@@ -854,7 +854,7 @@ const FeatureEntry::FeatureVariation kOmniboxDocumentP
+ base::size(kOmniboxDocumentProviderClientScoring), nullptr},
+ {"server and client scores", kOmniboxDocumentProviderServerAndClientScoring,
+ base::size(kOmniboxDocumentProviderServerAndClientScoring), nullptr}};
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+
+ const FeatureEntry::FeatureParam kOmniboxOnFocusSuggestionsParamNTPOmnibox[] = {
+ {"ZeroSuggestVariant:7:*", ZeroSuggestProvider::kRemoteNoUrlVariant}};
+@@ -932,7 +932,7 @@ const FeatureEntry::FeatureVariation kOmniboxMaxURLMat
+ {"6 matches", kOmniboxMaxURLMatches6, base::size(kOmniboxMaxURLMatches6),
+ nullptr}};
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || \
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ const FeatureEntry::FeatureParam kTranslateBubbleUIButton[] = {
+ {language::kTranslateUIBubbleKey, language::kTranslateUIBubbleButtonValue}};
+@@ -948,7 +948,7 @@ const FeatureEntry::FeatureVariation kTranslateBubbleU
+ {"Tab", kTranslateBubbleUITab, base::size(kTranslateBubbleUITab), nullptr},
+ {"Button_GM2", kTranslateBubbleUIButtonGM2,
+ base::size(kTranslateBubbleUIButton), nullptr}};
+-#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS
++#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_BSD || OS_CHROMEOS
+
+ const FeatureEntry::FeatureParam kMarkHttpAsDangerous[] = {
+ {security_state::features::kMarkHttpAsFeatureParameterName,
+@@ -1849,13 +1849,13 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kCloudPrintXpsDescription, kOsWin,
+ SINGLE_VALUE_TYPE(switches::kEnableCloudPrintXps)},
+ #endif // OS_WIN
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ {"enable-webgl2-compute-context",
+ flag_descriptions::kWebGL2ComputeContextName,
+ flag_descriptions::kWebGL2ComputeContextDescription,
+ kOsWin | kOsLinux | kOsCrOS,
+ SINGLE_VALUE_TYPE(switches::kEnableWebGL2ComputeContext)},
+-#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ {"enable-webgl-draft-extensions",
+ flag_descriptions::kWebglDraftExtensionsName,
+ flag_descriptions::kWebglDraftExtensionsDescription, kOsAll,
+@@ -1904,14 +1904,14 @@ const FeatureEntry kFeatureEntries[] = {
+ "OverrideTranslateTriggerInIndia")},
+ #endif // OS_ANDROID
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || \
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ {"translate-ui-bubble-options", flag_descriptions::kTranslateBubbleUIName,
+ flag_descriptions::kTranslateBubbleUIDescription, kOsDesktop,
+ FEATURE_WITH_PARAMS_VALUE_TYPE(language::kUseButtonTranslateBubbleUi,
+ kTranslateBubbleUIVariations,
+ "UseButtonTranslateBubbleUI")},
+-#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS
++#endif // OS_LINUX || OS_MACOSX || OS_WIN || OS_CHROMEOS || OS_BSD
+
+ #if BUILDFLAG(ENABLE_NATIVE_NOTIFICATIONS) && !defined(OS_CHROMEOS)
+ {"enable-native-notifications",
+@@ -1983,7 +1983,7 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kCrostiniBackupDescription, kOsCrOS,
+ FEATURE_VALUE_TYPE(chromeos::features::kCrostiniBackup)},
+ #endif // OS_CHROMEOS
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ {"terminal-system-app", flag_descriptions::kTerminalSystemAppName,
+ flag_descriptions::kTerminalSystemAppDescription, kOsCrOS | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kTerminalSystemApp)},
+@@ -1992,7 +1992,7 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kDynamicTcmallocDescription, kOsCrOS | kOsLinux,
+ FEATURE_VALUE_TYPE(performance_manager::features::kDynamicTcmallocTuning)},
+ #endif // BUILDFLAG(USE_TCMALLOC)
+-#endif // OS_CHROMEOS || OS_LINUX
++#endif // OS_CHROMEOS || OS_LINUX || defined(OS_BSD)
+ #if defined(OS_ANDROID)
+ {"enable-credit-card-assist", flag_descriptions::kCreditCardAssistName,
+ flag_descriptions::kCreditCardAssistDescription, kOsAndroid,
+@@ -2075,7 +2075,7 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(
+ previews::features::kHTTPSServerPreviewsUsingURLLoader)},
+ #endif // OS_ANDROID
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ {"enable-save-data", flag_descriptions::kEnableSaveDataName,
+ flag_descriptions::kEnableSaveDataDescription, kOsCrOS,
+ SINGLE_VALUE_TYPE(
+@@ -2427,12 +2427,12 @@ const FeatureEntry kFeatureEntries[] = {
+ "AndroidNightMode")},
+ #endif // BUILDFLAG(ENABLE_ANDROID_NIGHT_MODE)
+ #endif // OS_ANDROID
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ {"enable-dbus-and-x11-status-icons",
+ flag_descriptions::kEnableDbusAndX11StatusIconsName,
+ flag_descriptions::kEnableDbusAndX11StatusIconsDescription, kOsLinux,
+ FEATURE_VALUE_TYPE(features::kEnableDbusAndX11StatusIcons)},
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ {"enable-experimental-accessibility-features",
+ flag_descriptions::kExperimentalAccessibilityFeaturesName,
+ flag_descriptions::kExperimentalAccessibilityFeaturesDescription, kOsCrOS,
+@@ -2752,7 +2752,7 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kOmniboxLocalEntitySuggestionsDescription, kOsDesktop,
+ FEATURE_VALUE_TYPE(omnibox::kOmniboxLocalEntitySuggestions)},
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ {"omnibox-experimental-keyword-mode",
+ flag_descriptions::kOmniboxExperimentalKeywordModeName,
+ flag_descriptions::kOmniboxExperimentalKeywordModeDescription, kOsDesktop,
+@@ -2806,7 +2806,7 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_WITH_PARAMS_VALUE_TYPE(omnibox::kDocumentProvider,
+ kOmniboxDocumentProviderVariations,
+ "OmniboxBundledExperimentV1")},
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+
+ {"enable-speculative-service-worker-start-on-query-input",
+ flag_descriptions::kSpeculativeServiceWorkerStartOnQueryInputName,
+@@ -3026,13 +3026,13 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kClickToOpenPDFDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kClickToOpenPDFPlaceholder)},
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"direct-manipulation-stylus",
+ flag_descriptions::kDirectManipulationStylusName,
+ flag_descriptions::kDirectManipulationStylusDescription,
+ kOsWin | kOsMac | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kDirectManipulationStylus)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if !defined(OS_ANDROID)
+ {"chrome-colors", flag_descriptions::kChromeColorsName,
+@@ -3729,7 +3729,7 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(kClickToCallReceiver)},
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ {"click-to-call-context-menu-selected-text",
+ flag_descriptions::kClickToCallContextMenuForSelectedTextName,
+@@ -3739,7 +3739,7 @@ const FeatureEntry kFeatureEntries[] = {
+ {"click-to-call-ui", flag_descriptions::kClickToCallUIName,
+ flag_descriptions::kClickToCallUIDescription, kOsDesktop,
+ FEATURE_VALUE_TYPE(kClickToCallUI)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
+
+ {"shared-clipboard-receiver",
+@@ -3859,13 +3859,13 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(printing::features::kEnableCustomMacPaperSizes)},
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ {"enable-reopen-tab-in-product-help",
+ flag_descriptions::kReopenTabInProductHelpName,
+ flag_descriptions::kReopenTabInProductHelpDescription, kOsDesktop,
+ FEATURE_VALUE_TYPE(feature_engagement::kIPHReopenTabFeature)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
+
+ {"enable-audio-focus-enforcement",
+@@ -4245,7 +4245,7 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kAudioWorkletRealtimeThreadDescription, kOsAll,
+ FEATURE_VALUE_TYPE(blink::features::kAudioWorkletRealtimeThread)},
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"enable-autofill-save-credit-card-uses-improved-messaging",
+ flag_descriptions::kEnableAutofillSaveCreditCardUsesImprovedMessagingName,
+ flag_descriptions::
+@@ -4255,7 +4255,7 @@ const FeatureEntry kFeatureEntries[] = {
+ autofill::features::kAutofillSaveCreditCardUsesImprovedMessaging,
+ kAutofillSaveCreditCardUsesImprovedMessagingVariations,
+ "AutofillSaveCreditCardUsesImprovedMessaging")},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ {"release-notes", flag_descriptions::kReleaseNotesName,
+@@ -4337,12 +4337,12 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kEnableSyncUSSNigoriDescription, kOsAll,
+ FEATURE_VALUE_TYPE(switches::kSyncUSSNigori)},
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"global-media-controls", flag_descriptions::kGlobalMediaControlsName,
+ flag_descriptions::kGlobalMediaControlsDescription,
+ kOsWin | kOsMac | kOsLinux,
+ FEATURE_VALUE_TYPE(media::kGlobalMediaControls)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if BUILDFLAG(ENABLE_SPELLCHECK) && defined(OS_WIN)
+ {"win-use-native-spellchecker",
+@@ -4355,12 +4355,12 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kSafetyTipDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kSafetyTipUI)},
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"animated-avatar-button", flag_descriptions::kAnimatedAvatarButtonName,
+ flag_descriptions::kAnimatedAvatarButtonDescription,
+ kOsWin | kOsMac | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kAnimatedAvatarButton)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ {"crostini-webui-installer", flag_descriptions::kCrostiniWebUIInstallerName,
+@@ -4484,12 +4484,12 @@ const FeatureEntry kFeatureEntries[] = {
+ flag_descriptions::kBundledHTTPExchangesDescription, kOsAll,
+ FEATURE_VALUE_TYPE(features::kBundledHTTPExchanges)},
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"profile-menu-revamp", flag_descriptions::kProfileMenuRevampName,
+ flag_descriptions::kProfileMenuRevampDescription,
+ kOsWin | kOsMac | kOsLinux,
+ FEATURE_VALUE_TYPE(features::kProfileMenuRevamp)},
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ {"password-leak-detection", flag_descriptions::kPasswordLeakDetectionName,
+ flag_descriptions::kPasswordLeakDetectionDescription, kOsAll,
+@@ -4543,11 +4543,11 @@ const FeatureEntry kFeatureEntries[] = {
+ FEATURE_VALUE_TYPE(content_settings::kImprovedCookieControls)},
+ #endif // !defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ {"sync-clipboard-service", flag_descriptions::kSyncClipboardServiceName,
+ flag_descriptions::kSyncClipboardServiceDescription, kOsDesktop,
+ FEATURE_VALUE_TYPE(features::kSyncClipboardServiceFeature)},
+-#endif // OS_WIN || OS_MACOSX || OS_LINUX
++#endif // OS_WIN || OS_MACOSX || OS_LINUX || defined(OS_BSD)
+
+ #if defined(OS_ANDROID)
+ {"enable-clipboard-provider-text-suggestions",
diff --git a/devel/electron7/files/patch-chrome_browser_after__startup__task__utils.cc b/devel/electron7/files/patch-chrome_browser_after__startup__task__utils.cc
new file mode 100644
index 000000000000..07b7adc53d4a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_after__startup__task__utils.cc
@@ -0,0 +1,38 @@
+--- chrome/browser/after_startup_task_utils.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/after_startup_task_utils.cc
+@@ -32,7 +32,7 @@
+ #include "chrome/browser/ui/tabs/tab_strip_model.h"
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+
+@@ -118,7 +118,7 @@ void QueueTask(std::unique_ptr<AfterStartupTask> queue
+
+ void SetBrowserStartupIsComplete() {
+ DCHECK_CURRENTLY_ON(BrowserThread::UI);
+-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ // Process::Current().CreationTime() is not available on all platforms.
+ const base::Time process_creation_time =
+ base::Process::Current().CreationTime();
+@@ -126,7 +126,7 @@ void SetBrowserStartupIsComplete() {
+ UMA_HISTOGRAM_LONG_TIMES("Startup.AfterStartupTaskDelayedUntilTime",
+ base::Time::Now() - process_creation_time);
+ }
+-#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ UMA_HISTOGRAM_COUNTS_10000("Startup.AfterStartupTaskCount",
+ g_after_startup_tasks.Get().size());
+ g_startup_complete_flag.Get().Set();
+@@ -135,7 +135,7 @@ void SetBrowserStartupIsComplete() {
+ g_after_startup_tasks.Get().clear();
+ g_after_startup_tasks.Get().shrink_to_fit();
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // Make sure we complete the startup notification sequence, or launchers will
+ // get confused by not receiving the expected message from the main process.
+ views::LinuxUI* linux_ui = views::LinuxUI::instance();
diff --git a/devel/electron7/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc b/devel/electron7/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc
new file mode 100644
index 000000000000..ff7025324a99
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_apps_platform__apps_api_music__manager__private_device__id__linux.cc
@@ -0,0 +1,70 @@
+--- chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/apps/platform_apps/api/music_manager_private/device_id_linux.cc
+@@ -4,6 +4,11 @@
+
+ #include "chrome/browser/apps/platform_apps/api/music_manager_private/device_id.h"
+
++#if defined(OS_FREEBSD)
++#include <sys/types.h>
++#include <net/if_dl.h>
++#endif
++
+ #include <ifaddrs.h>
+ #include <net/if.h>
+ #include <stddef.h>
+@@ -106,9 +111,36 @@ class MacAddressProcessor {
+ const char* const prefixes[],
+ size_t prefixes_count) {
+ const int MAC_LENGTH = 6;
++#if defined(OS_FREEBSD)
++ struct ifaddrs *ifap, *ifinfo;
++#else
+ struct ifreq ifinfo;
++#endif
+
+ memset(&ifinfo, 0, sizeof(ifinfo));
++
++#if defined(OS_FREEBSD)
++ int result = getifaddrs(&ifap);
++
++ if (result != 0)
++ return true;
++
++ result = 1; // no MAC found yet
++
++ for (ifinfo = ifap; ifinfo != NULL; ifinfo = ifinfo->ifa_next) {
++ struct sockaddr* sa = ifinfo->ifa_addr;
++ if (sa->sa_family == AF_LINK &&
++ !strncmp(ifinfo->ifa_name, ifaddr->ifa_name,
++ sizeof(ifinfo->ifa_name) - 1)) {
++ result = 0;
++ break;
++ }
++ }
++
++ char mac_address[6];
++
++ strncpy(mac_address, (const char*)LLADDR((struct sockaddr_dl*)ifinfo->ifa_addr), sizeof(mac_address));
++#else
+ strncpy(ifinfo.ifr_name, ifaddr->ifa_name, sizeof(ifinfo.ifr_name) - 1);
+
+ int sd = socket(AF_INET, SOCK_DGRAM, 0);
+@@ -120,11 +152,18 @@ class MacAddressProcessor {
+
+ const char* mac_address =
+ static_cast<const char*>(ifinfo.ifr_hwaddr.sa_data);
++#endif
++
+ if (!is_valid_mac_address_.Run(mac_address, MAC_LENGTH))
+ return true;
+
++#if defined(OS_FREEBSD)
++ if (!IsValidPrefix(ifinfo->ifa_name, prefixes, prefixes_count))
++ return true;
++#else
+ if (!IsValidPrefix(ifinfo.ifr_name, prefixes, prefixes_count))
+ return true;
++#endif
+
+ // Got one!
+ found_mac_address_ =
diff --git a/devel/electron7/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc b/devel/electron7/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc
new file mode 100644
index 000000000000..f5a68f327c75
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_autocomplete_chrome__autocomplete__scheme__classifier.cc
@@ -0,0 +1,17 @@
+--- chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/autocomplete/chrome_autocomplete_scheme_classifier.cc
+@@ -59,12 +59,12 @@ ChromeAutocompleteSchemeClassifier::GetInputTypeForSch
+ return metrics::OmniboxInputType::QUERY;
+
+ case ExternalProtocolHandler::UNKNOWN: {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Linux impl of GetApplicationNameForProtocol doesn't distinguish
+ // between URL schemes with handers and those without. This will
+ // make the default behaviour be search on Linux.
+ return metrics::OmniboxInputType::EMPTY;
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ // If block state is unknown, check if there is an application registered
+ // for the url scheme.
+ GURL url(scheme + "://");
diff --git a/devel/electron7/files/patch-chrome_browser_background_background__mode__manager.cc b/devel/electron7/files/patch-chrome_browser_background_background__mode__manager.cc
new file mode 100644
index 000000000000..9bc3d3093bb6
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_background_background__mode__manager.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/background/background_mode_manager.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/background/background_mode_manager.cc
+@@ -769,7 +769,7 @@ gfx::ImageSkia GetStatusTrayIcon() {
+ return gfx::ImageSkia();
+
+ return family->CreateExact(size).AsImageSkia();
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
+ IDR_PRODUCT_LOGO_128);
+ #elif defined(OS_MACOSX)
diff --git a/devel/electron7/files/patch-chrome_browser_background_background__mode__optimizer.cc b/devel/electron7/files/patch-chrome_browser_background_background__mode__optimizer.cc
new file mode 100644
index 000000000000..1d55f7d5f674
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_background_background__mode__optimizer.cc
@@ -0,0 +1,15 @@
+--- chrome/browser/background/background_mode_optimizer.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/background/background_mode_optimizer.cc
+@@ -30,10 +30,10 @@ std::unique_ptr<BackgroundModeOptimizer> BackgroundMod
+ switches::kKeepAliveForTest))
+ return nullptr;
+
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ if (base::FeatureList::IsEnabled(features::kBackgroundModeAllowRestart))
+ return base::WrapUnique(new BackgroundModeOptimizer());
+-#endif // defined(OS_WIN) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+
+ return nullptr;
+ }
diff --git a/devel/electron7/files/patch-chrome_browser_browser__features.cc b/devel/electron7/files/patch-chrome_browser_browser__features.cc
new file mode 100644
index 000000000000..38f916a57109
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_browser__features.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/browser_features.cc.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/browser_features.cc
+@@ -13,9 +13,9 @@ const base::Feature kDoubleTapToZoomInTabletMode{
+ "DoubleTapToZoomInTabletMode", base::FEATURE_DISABLED_BY_DEFAULT};
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ const base::Feature kSyncClipboardServiceFeature{
+ "SyncClipboardService", base::FEATURE_DISABLED_BY_DEFAULT};
+-#endif // OS_WIN || OS_MACOSX || OS_LINUX
++#endif // OS_WIN || OS_MACOSX || OS_LINUX || defined(OS_BSD)
+
+ } // namespace features
diff --git a/devel/electron7/files/patch-chrome_browser_browser__features.h b/devel/electron7/files/patch-chrome_browser_browser__features.h
new file mode 100644
index 000000000000..79f3b7ab9dd9
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_browser__features.h
@@ -0,0 +1,14 @@
+--- chrome/browser/browser_features.h.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/browser_features.h
+@@ -20,9 +20,9 @@ namespace features {
+ extern const base::Feature kDoubleTapToZoomInTabletMode;
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ extern const base::Feature kSyncClipboardServiceFeature;
+-#endif // OS_WIN || OS_MACOSX || OS_LINUX
++#endif // OS_WIN || OS_MACOSX || OS_LINUX || defined(OS_BSD)
+
+ } // namespace features
+
diff --git a/devel/electron7/files/patch-chrome_browser_browser__resources.grd b/devel/electron7/files/patch-chrome_browser_browser__resources.grd
new file mode 100644
index 000000000000..b03da3726ccf
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_browser__resources.grd
@@ -0,0 +1,20 @@
+--- chrome/browser/browser_resources.grd.orig 2019-12-12 12:39:07 UTC
++++ chrome/browser/browser_resources.grd
+@@ -106,7 +106,7 @@
+ <include name="IDR_DISCARDS_SORTED_TABLE_BEHAVIOR_JS" file="resources\discards\sorted_table_behavior.js" compress="gzip" type="BINDATA" />
+ <include name="IDR_DISCARDS_WEBUI_GRAPH_DUMP_MOJOM_LITE_JS" file="${root_gen_dir}\chrome\browser\performance_manager\webui_graph_dump.mojom-lite.js" compress="gzip" use_base_dir="false" type="BINDATA" />
+ </if>
+- <if expr="is_win or is_macosx or (is_linux and not is_chromeos)">
++ <if expr="is_win or is_macosx or (is_posix and not is_chromeos)">
+ <include name="IDR_BROWSER_SWITCH_APP_HTML" file="resources\browser_switch\app.html" compress="gzip" allowexternalscript="true" type="BINDATA" />
+ <include name="IDR_BROWSER_SWITCH_APP_JS" file="resources\browser_switch\app.js" compress="gzip" type="BINDATA" />
+ <include name="IDR_BROWSER_SWITCH_PROXY_HTML" file="resources\browser_switch\browser_switch_proxy.html" compress="gzip" allowexternalscript="true" type="BINDATA" />
+@@ -561,7 +561,7 @@
+ <include name="IDR_IME_WINDOW_CLOSE_H" file="resources\input_ime\ime_window_close_hover.png" type="BINDATA" />
+ </if>
+ <include name="IDR_SSL_ERROR_ASSISTANT_PB" file="${root_gen_dir}/chrome/browser/resources/ssl/ssl_error_assistant/ssl_error_assistant.pb" use_base_dir="false" type="BINDATA" />
+- <if expr="is_android or is_linux">
++ <if expr="is_android or is_posix">
+ <include name="IDR_SANDBOX_INTERNALS_HTML" file="resources\sandbox_internals\sandbox_internals.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" compress="gzip" />
+ <include name="IDR_SANDBOX_INTERNALS_JS" file="resources\sandbox_internals\sandbox_internals.js" type="BINDATA" compress="gzip" />
+ </if>
diff --git a/devel/electron7/files/patch-chrome_browser_chrome__browser__main.cc b/devel/electron7/files/patch-chrome_browser_chrome__browser__main.cc
new file mode 100644
index 000000000000..016a36b929c8
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_chrome__browser__main.cc
@@ -0,0 +1,75 @@
+--- chrome/browser/chrome_browser_main.cc.orig 2019-12-12 12:39:08 UTC
++++ chrome/browser/chrome_browser_main.cc
+@@ -222,9 +222,9 @@
+ #include "components/arc/metrics/stability_metrics_manager.h"
+ #endif // defined(OS_CHROMEOS)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/browser/first_run/upgrade_util_linux.h"
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+
+ #if defined(OS_LINUX)
+ #include "components/crash/content/app/breakpad_linux.h"
+@@ -261,7 +261,7 @@
+ #endif // defined(OS_WIN)
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD))
+ #include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
+ #include "chrome/browser/profiles/profile_activity_metrics_recorder.h"
+ #endif
+@@ -1075,7 +1075,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
+ AddFirstRunNewTabs(browser_creator_.get(), master_prefs_->new_tabs);
+ }
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ // Create directory for user-level Native Messaging manifest files. This
+ // makes it less likely that the directory will be created by third-party
+ // software with incorrect owner or permission. See crbug.com/725513 .
+@@ -1084,14 +1084,14 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
+ &user_native_messaging_dir));
+ if (!base::PathExists(user_native_messaging_dir))
+ base::CreateDirectory(user_native_messaging_dir);
+-#endif // defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ }
+ #endif // !defined(OS_ANDROID) && !defined(OS_CHROMEOS)
+
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX)
+ // Set the product channel for crash reports.
+ breakpad::SetChannelCrashKey(chrome::GetChannelName());
+-#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
++#endif // defined(OS_LINUX)
+
+ #if defined(OS_MACOSX)
+ // Get the Keychain API to register for distributed notifications on the main
+@@ -1121,7 +1121,7 @@ int ChromeBrowserMainParts::PreCreateThreadsImpl() {
+ }
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS) || defined(OS_BSD))
+ metrics::DesktopSessionDurationTracker::Initialize();
+ ProfileActivityMetricsRecorder::Initialize();
+ #endif
+@@ -1280,6 +1280,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
+ base::TimeDelta::FromMinutes(1));
+
+ #if !defined(OS_ANDROID)
++#if !defined(OS_BSD)
+ if (base::FeatureList::IsEnabled(features::kWebUsb)) {
+ web_usb_detector_.reset(new WebUsbDetector());
+ base::PostTask(
+@@ -1288,6 +1289,7 @@ void ChromeBrowserMainParts::PostBrowserStart() {
+ base::BindOnce(&WebUsbDetector::Initialize,
+ base::Unretained(web_usb_detector_.get())));
+ }
++#endif
+ if (base::FeatureList::IsEnabled(features::kTabMetricsLogging)) {
+ // Initialize the TabActivityWatcher to begin logging tab activity events.
+ resource_coordinator::TabActivityWatcher::GetInstance();
diff --git a/devel/electron7/files/patch-chrome_browser_chrome__browser__main__linux.cc b/devel/electron7/files/patch-chrome_browser_chrome__browser__main__linux.cc
new file mode 100644
index 000000000000..359890dcee6d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_chrome__browser__main__linux.cc
@@ -0,0 +1,27 @@
+--- chrome/browser/chrome_browser_main_linux.cc.orig 2019-12-12 12:39:08 UTC
++++ chrome/browser/chrome_browser_main_linux.cc
+@@ -91,12 +91,14 @@ void ChromeBrowserMainPartsLinux::PreProfileInit() {
+ void ChromeBrowserMainPartsLinux::PostProfileInit() {
+ ChromeBrowserMainPartsPosix::PostProfileInit();
+
++#if !defined(OS_BSD)
+ g_browser_process->metrics_service()->RecordBreakpadRegistration(
+ breakpad::IsCrashReporterEnabled());
++#endif
+ }
+
+ void ChromeBrowserMainPartsLinux::PostMainMessageLoopStart() {
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+ bluez::BluezDBusManager::Initialize(nullptr /* system_bus */);
+ #endif
+
+@@ -104,7 +106,7 @@ void ChromeBrowserMainPartsLinux::PostMainMessageLoopS
+ }
+
+ void ChromeBrowserMainPartsLinux::PostDestroyThreads() {
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+ bluez::BluezDBusManager::Shutdown();
+ bluez::BluezDBusThreadManager::Shutdown();
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_chrome__browser__main__posix.cc b/devel/electron7/files/patch-chrome_browser_chrome__browser__main__posix.cc
new file mode 100644
index 000000000000..e9dd14fff82f
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_chrome__browser__main__posix.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/chrome_browser_main_posix.cc.orig 2019-12-12 12:39:08 UTC
++++ chrome/browser/chrome_browser_main_posix.cc
+@@ -70,7 +70,7 @@ void ExitHandler::ExitWhenPossibleOnUIThread(int signa
+ // ExitHandler takes care of deleting itself.
+ new ExitHandler();
+ } else {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ switch (signal) {
+ case SIGINT:
+ case SIGHUP:
+@@ -166,7 +166,7 @@ void ChromeBrowserMainPartsPosix::PostMainMessageLoopS
+ void ChromeBrowserMainPartsPosix::ShowMissingLocaleMessageBox() {
+ #if defined(OS_CHROMEOS)
+ NOTREACHED(); // Should not ever happen on ChromeOS.
+-#elif defined(OS_MACOSX)
++#elif defined(OS_MACOSX) || defined(OS_BSD)
+ // Not called on Mac because we load the locale files differently.
+ NOTREACHED();
+ #elif defined(USE_AURA)
diff --git a/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.cc b/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.cc
new file mode 100644
index 000000000000..c7b10ad5e591
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.cc
@@ -0,0 +1,83 @@
+--- chrome/browser/chrome_content_browser_client.cc.orig 2019-12-12 12:39:08 UTC
++++ chrome/browser/chrome_content_browser_client.cc
+@@ -403,7 +403,7 @@
+ #include "components/user_manager/user.h"
+ #include "components/user_manager/user_manager.h"
+ #include "services/service_manager/public/mojom/interface_provider_spec.mojom.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/chrome_browser_main_linux.h"
+ #elif defined(OS_ANDROID)
+ #include "base/android/application_status_listener.h"
+@@ -459,7 +459,7 @@
+ #endif // !defined(OS_ANDROID)
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_navigation_throttle.h"
+ #endif
+
+@@ -485,7 +485,7 @@
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #if defined(USE_X11)
+ #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views_linux_x11.h"
+ #else
+@@ -1200,7 +1200,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
+ #elif defined(OS_CHROMEOS)
+ main_parts = std::make_unique<chromeos::ChromeBrowserMainPartsChromeos>(
+ parameters, startup_data_);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ main_parts =
+ std::make_unique<ChromeBrowserMainPartsLinux>(parameters, startup_data_);
+ #elif defined(OS_ANDROID)
+@@ -1226,7 +1226,7 @@ ChromeContentBrowserClient::CreateBrowserMainParts(
+ // Construct additional browser parts. Stages are called in the order in
+ // which they are added.
+ #if defined(TOOLKIT_VIEWS)
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #if defined(USE_X11)
+ main_parts->AddParts(new ChromeBrowserMainExtraPartsViewsLinuxX11());
+ #else
+@@ -2029,7 +2029,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
+ command_line->AppendSwitchASCII(switches::kMetricsClientID,
+ client_info->client_id);
+ }
+-#elif defined(OS_POSIX)
++#elif defined(OS_POSIX) && !defined(OS_BSD)
+ #if defined(OS_ANDROID)
+ bool enable_crash_reporter = true;
+ #else
+@@ -2267,7 +2267,7 @@ void ChromeContentBrowserClient::AppendExtraCommandLin
+ StackSamplingConfiguration::Get()->AppendCommandLineSwitchForChildProcess(
+ process_type, command_line);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Processes may only query perf_event_open with the BPF sandbox disabled.
+ if (browser_command_line.HasSwitch(switches::kEnableThreadInstructionCount) &&
+ command_line->HasSwitch(service_manager::switches::kNoSandbox)) {
+@@ -3575,7 +3575,7 @@ void ChromeContentBrowserClient::GetAdditionalFileSyst
+ }
+ }
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ void ChromeContentBrowserClient::GetAdditionalMappedFilesForChildProcess(
+ const base::CommandLine& command_line,
+ int child_process_id,
+@@ -4245,7 +4245,7 @@ ChromeContentBrowserClient::CreateThrottlesForNavigati
+ }
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ std::unique_ptr<content::NavigationThrottle> browser_switcher_throttle =
+ browser_switcher::BrowserSwitcherNavigationThrottle ::
+ MaybeCreateThrottleFor(handle);
diff --git a/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.h b/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.h
new file mode 100644
index 000000000000..1ae1e498405d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_chrome__content__browser__client.h
@@ -0,0 +1,17 @@
+--- chrome/browser/chrome_content_browser_client.h.orig 2019-12-12 12:39:08 UTC
++++ chrome/browser/chrome_content_browser_client.h
+@@ -360,12 +360,12 @@ class ChromeContentBrowserClient : public content::Con
+ void OverridePageVisibilityState(
+ content::RenderFrameHost* render_frame_host,
+ content::PageVisibilityState* visibility_state) override;
+-#if defined(OS_POSIX) && !defined(OS_MACOSX)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ void GetAdditionalMappedFilesForChildProcess(
+ const base::CommandLine& command_line,
+ int child_process_id,
+ content::PosixFileDescriptorInfo* mappings) override;
+-#endif // defined(OS_POSIX) && !defined(OS_MACOSX)
++#endif // defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_BSD)
+ #if defined(OS_WIN)
+ bool PreSpawnRenderer(sandbox::TargetPolicy* policy,
+ RendererSpawnFlags flags) override;
diff --git a/devel/electron7/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc b/devel/electron7/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc
new file mode 100644
index 000000000000..17f85cd60c49
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_custom__handlers_protocol__handler__registry.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/custom_handlers/protocol_handler_registry.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/custom_handlers/protocol_handler_registry.cc
+@@ -43,7 +43,7 @@ const ProtocolHandler& LookupHandler(
+ // If true default protocol handlers will be removed if the OS level
+ // registration for a protocol is no longer Chrome.
+ bool ShouldRemoveHandlersNotInOS() {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // We don't do this on Linux as the OS registration there is not reliable,
+ // and Chrome OS doesn't have any notion of OS registration.
+ // TODO(benwells): When Linux support is more reliable remove this
diff --git a/devel/electron7/files/patch-chrome_browser_defaults.cc b/devel/electron7/files/patch-chrome_browser_defaults.cc
new file mode 100644
index 000000000000..db51b7910e4e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_defaults.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/defaults.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/defaults.cc
+@@ -43,7 +43,7 @@ const bool kSyncAutoStarts = true;
+ const bool kSyncAutoStarts = false;
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ const bool kScrollEventChangesTab = true;
+ #else
+ const bool kScrollEventChangesTab = false;
diff --git a/devel/electron7/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc b/devel/electron7/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc
new file mode 100644
index 000000000000..65e525c2c84a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_devtools_devtools__eye__dropper.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/devtools/devtools_eye_dropper.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/devtools/devtools_eye_dropper.cc
+@@ -163,7 +163,7 @@ void DevToolsEyeDropper::UpdateCursor() {
+ // magnified projection only with centered hotspot.
+ // Mac Retina requires cursor to be > 120px in order to render smoothly.
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ const float kCursorSize = 63;
+ const float kDiameter = 63;
+ const float kHotspotOffset = 32;
diff --git a/devel/electron7/files/patch-chrome_browser_diagnostics_diagnostics__writer.h b/devel/electron7/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
new file mode 100644
index 000000000000..b02b6d6ef16a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_diagnostics_diagnostics__writer.h
@@ -0,0 +1,11 @@
+--- chrome/browser/diagnostics/diagnostics_writer.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/diagnostics/diagnostics_writer.h
+@@ -15,6 +15,8 @@ namespace diagnostics {
+ // Console base class used internally.
+ class SimpleConsole;
+
++#undef MACHINE
++
+ class DiagnosticsWriter : public DiagnosticsModel::Observer {
+ public:
+ // The type of formatting done by this writer.
diff --git a/devel/electron7/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc b/devel/electron7/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc
new file mode 100644
index 000000000000..76b34bf8d9a6
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_chrome__download__manager__delegate.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/download/chrome_download_manager_delegate.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/chrome_download_manager_delegate.cc
+@@ -1257,7 +1257,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
+ target_info->is_filetype_handled_safely)
+ DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ if (item->GetOriginalMimeType() == "application/x-x509-user-cert")
+ DownloadItemModel(item).SetShouldPreferOpeningInBrowser(true);
+ #endif
+@@ -1287,7 +1287,7 @@ void ChromeDownloadManagerDelegate::OnDownloadTargetDe
+
+ bool ChromeDownloadManagerDelegate::IsOpenInBrowserPreferreredForFile(
+ const base::FilePath& path) {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (path.MatchesExtension(FILE_PATH_LITERAL(".pdf"))) {
+ return !download_prefs_->ShouldOpenPdfInSystemReader();
+ }
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__commands.cc b/devel/electron7/files/patch-chrome_browser_download_download__commands.cc
new file mode 100644
index 000000000000..48df142619a5
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__commands.cc
@@ -0,0 +1,35 @@
+--- chrome/browser/download/download_commands.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_commands.cc
+@@ -30,7 +30,7 @@
+ #include "net/base/url_util.h"
+ #include "ui/base/clipboard/scoped_clipboard_writer.h"
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #include "chrome/browser/ui/browser.h"
+ #include "chrome/browser/ui/browser_finder.h"
+ #include "chrome/browser/ui/scoped_tabbed_browser_displayer.h"
+@@ -157,7 +157,7 @@ void DownloadCommands::ExecuteCommand(Command command)
+ model_->ExecuteCommand(this, command);
+ }
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ Browser* DownloadCommands::GetBrowser() const {
+ chrome::ScopedTabbedBrowserDisplayer browser_displayer(model_->profile());
+@@ -180,12 +180,12 @@ bool DownloadCommands::CanOpenPdfInSystemViewer() cons
+ return IsDownloadPdf() &&
+ (IsAdobeReaderDefaultPDFViewer() ? is_adobe_pdf_reader_up_to_date
+ : true);
+-#elif defined(OS_MACOSX) || defined(OS_LINUX)
++#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ return IsDownloadPdf();
+ #endif
+ }
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ void DownloadCommands::CopyFileAsImageToClipboard() {
+ if (model_->GetState() != download::DownloadItem::COMPLETE ||
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__commands.h b/devel/electron7/files/patch-chrome_browser_download_download__commands.h
new file mode 100644
index 000000000000..2c07d5f85d49
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__commands.h
@@ -0,0 +1,11 @@
+--- chrome/browser/download/download_commands.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_commands.h
+@@ -45,7 +45,7 @@ class DownloadCommands {
+ bool IsCommandVisible(Command command) const;
+ void ExecuteCommand(Command command);
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ bool IsDownloadPdf() const;
+ bool CanOpenPdfInSystemViewer() const;
+ Browser* GetBrowser() const;
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__item__model.cc b/devel/electron7/files/patch-chrome_browser_download_download__item__model.cc
new file mode 100644
index 000000000000..8a416580cf0b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__item__model.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/download/download_item_model.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_item_model.cc
+@@ -565,7 +565,7 @@ bool DownloadItemModel::IsCommandChecked(
+ return download_->GetOpenWhenComplete() ||
+ download_crx_util::IsExtensionDownload(*download_);
+ case DownloadCommands::ALWAYS_OPEN_TYPE:
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (download_commands->CanOpenPdfInSystemViewer()) {
+ DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
+ return prefs->ShouldOpenPdfInSystemReader();
+@@ -602,7 +602,7 @@ void DownloadItemModel::ExecuteCommand(DownloadCommand
+ bool is_checked = IsCommandChecked(download_commands,
+ DownloadCommands::ALWAYS_OPEN_TYPE);
+ DownloadPrefs* prefs = DownloadPrefs::FromBrowserContext(profile());
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (download_commands->CanOpenPdfInSystemViewer()) {
+ prefs->SetShouldOpenPdfInSystemReader(!is_checked);
+ SetShouldPreferOpeningInBrowser(is_checked);
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__prefs.cc b/devel/electron7/files/patch-chrome_browser_download_download__prefs.cc
new file mode 100644
index 000000000000..105eff4201ff
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__prefs.cc
@@ -0,0 +1,65 @@
+--- chrome/browser/download/download_prefs.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_prefs.cc
+@@ -62,7 +62,7 @@ namespace {
+ // Consider downloads 'dangerous' if they go to the home directory on Linux and
+ // to the desktop on any platform.
+ bool DownloadPathIsDangerous(const base::FilePath& download_path) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ base::FilePath home_dir = base::GetHomeDir();
+ if (download_path == home_dir) {
+ return true;
+@@ -155,7 +155,7 @@ DownloadPrefs::DownloadPrefs(Profile* profile) : profi
+ GetDefaultDownloadDirectoryForProfile()));
+ #endif // defined(OS_CHROMEOS)
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ should_open_pdf_in_system_reader_ =
+ prefs->GetBoolean(prefs::kOpenPdfDownloadInSystemReader);
+ #endif
+@@ -257,7 +257,7 @@ void DownloadPrefs::RegisterProfilePrefs(
+ default_download_path);
+ registry->RegisterFilePathPref(prefs::kSaveFileDefaultDirectory,
+ default_download_path);
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ registry->RegisterBooleanPref(prefs::kOpenPdfDownloadInSystemReader, false);
+ #endif
+ #if defined(OS_ANDROID)
+@@ -354,7 +354,7 @@ bool DownloadPrefs::IsDownloadPathManaged() const {
+ }
+
+ bool DownloadPrefs::IsAutoOpenUsed() const {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (ShouldOpenPdfInSystemReader())
+ return true;
+ #endif
+@@ -368,7 +368,7 @@ bool DownloadPrefs::IsAutoOpenEnabledBasedOnExtension(
+ return false;
+ DCHECK(extension[0] == base::FilePath::kExtensionSeparator);
+ extension.erase(0, 1);
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (base::FilePath::CompareEqualIgnoreCase(extension,
+ FILE_PATH_LITERAL("pdf")) &&
+ ShouldOpenPdfInSystemReader())
+@@ -405,7 +405,7 @@ void DownloadPrefs::DisableAutoOpenBasedOnExtension(
+ SaveAutoOpenState();
+ }
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ void DownloadPrefs::SetShouldOpenPdfInSystemReader(bool should_open) {
+ if (should_open_pdf_in_system_reader_ == should_open)
+ return;
+@@ -426,7 +426,7 @@ bool DownloadPrefs::ShouldOpenPdfInSystemReader() cons
+ #endif
+
+ void DownloadPrefs::ResetAutoOpen() {
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ SetShouldOpenPdfInSystemReader(false);
+ #endif
+ auto_open_.clear();
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__prefs.h b/devel/electron7/files/patch-chrome_browser_download_download__prefs.h
new file mode 100644
index 000000000000..8ff4a435b563
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__prefs.h
@@ -0,0 +1,20 @@
+--- chrome/browser/download/download_prefs.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_prefs.h
+@@ -102,7 +102,7 @@ class DownloadPrefs {
+ // Disables auto-open based on file extension.
+ void DisableAutoOpenBasedOnExtension(const base::FilePath& file_name);
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ // Store the user preference to disk. If |should_open| is true, also disable
+ // the built-in PDF plugin. If |should_open| is false, enable the PDF plugin.
+ void SetShouldOpenPdfInSystemReader(bool should_open);
+@@ -150,7 +150,7 @@ class DownloadPrefs {
+ AutoOpenCompareFunctor> AutoOpenSet;
+ AutoOpenSet auto_open_;
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ bool should_open_pdf_in_system_reader_;
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__query.cc b/devel/electron7/files/patch-chrome_browser_download_download__query.cc
new file mode 100644
index 000000000000..dbfc79d3fac0
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__query.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/download/download_query.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_query.cc
+@@ -27,7 +27,11 @@
+ #include "components/download/public/common/download_item.h"
+ #include "components/url_formatter/url_formatter.h"
+ #include "content/public/browser/content_browser_client.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/gurl.h"
+
+ using download::DownloadDangerType;
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__shelf__context__menu.cc b/devel/electron7/files/patch-chrome_browser_download_download__shelf__context__menu.cc
new file mode 100644
index 000000000000..86c2196fcb5c
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__shelf__context__menu.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/download/download_shelf_context_menu.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_shelf_context_menu.cc
+@@ -127,7 +127,7 @@ base::string16 DownloadShelfContextMenu::GetLabelForCo
+ : IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
+ break;
+ }
+-#elif defined(OS_MACOSX) || defined(OS_LINUX)
++#elif defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ if (can_open_pdf_in_system_viewer) {
+ id = IDS_DOWNLOAD_MENU_PLATFORM_OPEN_ALWAYS;
+ break;
diff --git a/devel/electron7/files/patch-chrome_browser_download_download__status__updater.cc b/devel/electron7/files/patch-chrome_browser_download_download__status__updater.cc
new file mode 100644
index 000000000000..8b45729ebd3e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_download_download__status__updater.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/download/download_status_updater.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/download/download_status_updater.cc
+@@ -13,7 +13,7 @@
+ #include "base/memory/ptr_util.h"
+ #include "build/build_config.h"
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+
+@@ -136,7 +136,7 @@ void DownloadStatusUpdater::OnDownloadUpdated(content:
+ #if defined(OS_ANDROID) || (defined(USE_AURA) && !defined(OS_WIN))
+ void DownloadStatusUpdater::UpdateAppIconDownloadProgress(
+ download::DownloadItem* download) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ const views::LinuxUI* linux_ui = views::LinuxUI::instance();
+ if (linux_ui) {
+ float progress = 0;
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_BUILD.gn b/devel/electron7/files/patch-chrome_browser_extensions_BUILD.gn
new file mode 100644
index 000000000000..a6eb11018269
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_BUILD.gn
@@ -0,0 +1,15 @@
+--- chrome/browser/extensions/BUILD.gn.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/BUILD.gn
+@@ -1128,6 +1128,12 @@ jumbo_static_library("extensions") {
+ deps += [ "//chrome/common:service_process_mojom" ]
+ }
+
++ if (is_bsd) {
++ sources -= [
++ "api/image_writer_private/removable_storage_provider_linux.cc",
++ ]
++ }
++
+ if (enable_service_discovery) {
+ sources += [
+ "api/mdns/mdns_api.cc",
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_activity__log_activity__log.cc b/devel/electron7/files/patch-chrome_browser_extensions_activity__log_activity__log.cc
new file mode 100644
index 000000000000..11018dbf4008
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_activity__log_activity__log.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/extensions/activity_log/activity_log.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/activity_log/activity_log.cc
+@@ -54,7 +54,11 @@
+ #include "extensions/browser/extensions_browser_client.h"
+ #include "extensions/common/extension.h"
+ #include "extensions/common/extension_messages.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/gurl.h"
+
+ namespace constants = activity_log_constants;
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc b/devel/electron7/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
new file mode 100644
index 000000000000..4434c086f1ef
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_api_image__writer__private_removable__storage__provider.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/api/image_writer_private/removable_storage_provider.cc
+@@ -21,6 +21,7 @@ static base::LazyInstance<scoped_refptr<StorageDeviceL
+
+ void RemovableStorageProvider::GetAllDevices(DeviceListReadyCallback callback) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
++#if !defined(OS_BSD)
+ if (g_test_device_list.Get().get() != nullptr) {
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE,
+@@ -34,6 +35,9 @@ void RemovableStorageProvider::GetAllDevices(DeviceLis
+ base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
+ base::BindOnce(&RemovableStorageProvider::PopulateDeviceList),
+ std::move(callback));
++#else
++ NOTIMPLEMENTED();
++#endif
+ }
+
+ // static
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h b/devel/electron7/files/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
new file mode 100644
index 000000000000..4357c1c439e2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_api_input__ime_input__ime__api.h
@@ -0,0 +1,11 @@
+--- chrome/browser/extensions/api/input_ime/input_ime_api.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/api/input_ime/input_ime_api.h
+@@ -31,7 +31,7 @@
+
+ #if defined(OS_CHROMEOS)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api_chromeos.h"
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api_nonchromeos.h"
+ #endif // defined(OS_CHROMEOS)
+
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc b/devel/electron7/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
new file mode 100644
index 000000000000..9446f5e2f153
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_api_runtime_chrome__runtime__api__delegate.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.cc
+@@ -299,6 +299,8 @@ bool ChromeRuntimeAPIDelegate::GetPlatformInfo(Platfor
+ info->os = extensions::api::runtime::PLATFORM_OS_CROS;
+ } else if (strcmp(os, "linux") == 0) {
+ info->os = extensions::api::runtime::PLATFORM_OS_LINUX;
++ } else if (strcmp(os, "freebsd") == 0) {
++ info->os = extensions::api::runtime::PLATFORM_OS_FREEBSD;
+ } else if (strcmp(os, "openbsd") == 0) {
+ info->os = extensions::api::runtime::PLATFORM_OS_OPENBSD;
+ } else {
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc b/devel/electron7/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc
new file mode 100644
index 000000000000..6c68e710a82e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_api_settings__private_prefs__util.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/extensions/api/settings_private/prefs_util.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/api/settings_private/prefs_util.cc
+@@ -155,7 +155,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist
+ (*s_whitelist)[bookmarks::prefs::kShowBookmarkBar] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ (*s_whitelist)[::prefs::kUseCustomChromeFrame] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ #endif
+@@ -165,7 +165,7 @@ const PrefsUtil::TypedPrefMap& PrefsUtil::GetWhitelist
+ // Appearance settings.
+ (*s_whitelist)[::prefs::kCurrentThemeID] =
+ settings_api::PrefType::PREF_TYPE_STRING;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ (*s_whitelist)[::prefs::kUsesSystemTheme] =
+ settings_api::PrefType::PREF_TYPE_BOOLEAN;
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc b/devel/electron7/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
new file mode 100644
index 000000000000..f3b89d02185f
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_api_webrtc__logging__private_webrtc__logging__private__api.cc
@@ -0,0 +1,43 @@
+--- chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/api/webrtc_logging_private/webrtc_logging_private_api.cc
+@@ -29,7 +29,7 @@
+ #include "extensions/browser/process_manager.h"
+ #include "extensions/common/error_utils.h"
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ #include "extensions/common/permissions/permissions_data.h"
+ #endif
+
+@@ -38,7 +38,7 @@ namespace {
+ bool CanEnableAudioDebugRecordingsFromExtension(
+ const extensions::Extension* extension) {
+ bool enabled_by_permissions = false;
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ if (extension) {
+ enabled_by_permissions =
+ extension->permissions_data()->active_permissions().HasAPIPermission(
+@@ -557,7 +557,7 @@ void WebrtcLoggingPrivateStartEventLoggingFunction::Fi
+ }
+
+ bool WebrtcLoggingPrivateGetLogsDirectoryFunction::RunAsync() {
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ // Unlike other WebrtcLoggingPrivate functions that take a RequestInfo object,
+ // this function shouldn't be called by a component extension on behalf of
+ // some web code. It returns a DirectoryEntry for use directly in the calling
+@@ -580,11 +580,11 @@ bool WebrtcLoggingPrivateGetLogsDirectoryFunction::Run
+ &WebrtcLoggingPrivateGetLogsDirectoryFunction::FireErrorCallback,
+ this));
+ return true;
+-#else // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#else // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ SetError("Not supported on the current OS");
+ SendResponse(false);
+ return false;
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ }
+
+ void WebrtcLoggingPrivateGetLogsDirectoryFunction::FireCallback(
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc b/devel/electron7/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
new file mode 100644
index 000000000000..235bf0c555cb
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_browser__context__keyed__service__factories.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/extensions/browser_context_keyed_service_factories.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/browser_context_keyed_service_factories.cc
+@@ -55,7 +55,7 @@
+ #include "chrome/browser/chromeos/extensions/input_method_api.h"
+ #include "chrome/browser/chromeos/extensions/media_player_api.h"
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/extensions/api/input_ime/input_ime_api.h"
+ #endif
+
+@@ -94,7 +94,7 @@ void EnsureBrowserContextKeyedServiceFactoriesBuilt()
+ #if defined(OS_CHROMEOS)
+ extensions::InputImeAPI::GetFactoryInstance();
+ extensions::InputMethodAPI::GetFactoryInstance();
+-#elif defined(OS_LINUX) || defined(OS_WIN)
++#elif defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ extensions::InputImeAPI::GetFactoryInstance();
+ #endif
+ extensions::LanguageSettingsPrivateDelegateFactory::GetInstance();
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_external__provider__impl.cc b/devel/electron7/files/patch-chrome_browser_extensions_external__provider__impl.cc
new file mode 100644
index 000000000000..f47722b58de9
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_external__provider__impl.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/extensions/external_provider_impl.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/external_provider_impl.cc
+@@ -765,7 +765,7 @@ void ExternalProviderImpl::CreateExternalProviders(
+ chromeos::DemoSession::Get()->SetExtensionsExternalLoader(loader);
+ provider_list->push_back(std::move(demo_apps_provider));
+ }
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ provider_list->push_back(std::make_unique<ExternalProviderImpl>(
+ service,
+ base::MakeRefCounted<ExternalPrefLoader>(
+@@ -793,7 +793,7 @@ void ExternalProviderImpl::CreateExternalProviders(
+ bundled_extension_creation_flags));
+
+ // Define a per-user source of external extensions.
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING))
++#if defined(OS_MACOSX) || ((defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(CHROMIUM_BRANDING))
+ provider_list->push_back(std::make_unique<ExternalProviderImpl>(
+ service,
+ base::MakeRefCounted<ExternalPrefLoader>(
diff --git a/devel/electron7/files/patch-chrome_browser_extensions_install__signer.cc b/devel/electron7/files/patch-chrome_browser_extensions_install__signer.cc
new file mode 100644
index 000000000000..2c413b360146
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_extensions_install__signer.cc
@@ -0,0 +1,18 @@
+--- chrome/browser/extensions/install_signer.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/extensions/install_signer.cc
+@@ -293,13 +293,13 @@ void LogRequestStartHistograms() {
+ DCHECK(g_single_thread_checker.Get().CalledOnValidThread());
+
+ // Process::Current().CreationTime is only defined on some platforms.
+-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ const base::Time process_creation_time =
+ base::Process::Current().CreationTime();
+ UMA_HISTOGRAM_COUNTS_1M(
+ "ExtensionInstallSigner.UptimeAtTimeOfRequest",
+ (base::Time::Now() - process_creation_time).InSeconds());
+-#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#endif // defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+
+ base::TimeDelta delta;
+ base::TimeTicks now = base::TimeTicks::Now();
diff --git a/devel/electron7/files/patch-chrome_browser_first__run_first__run__dialog.h b/devel/electron7/files/patch-chrome_browser_first__run_first__run__dialog.h
new file mode 100644
index 000000000000..b73629ad5cb2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_first__run_first__run__dialog.h
@@ -0,0 +1,11 @@
+--- chrome/browser/first_run/first_run_dialog.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/first_run/first_run_dialog.h
+@@ -9,7 +9,7 @@
+ #include "build/build_config.h"
+
+ // Hide this function on platforms where the dialog does not exist.
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ class Profile;
+
diff --git a/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal.h b/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal.h
new file mode 100644
index 000000000000..74b304a62485
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal.h
@@ -0,0 +1,18 @@
+--- chrome/browser/first_run/first_run_internal.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/first_run/first_run_internal.h
+@@ -64,13 +64,13 @@ FirstRunState DetermineFirstRunState(bool has_sentinel
+ bool force_first_run,
+ bool no_first_run);
+
+-#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#if defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // For testing, forces the first run dialog to either be shown or not. If not
+ // called, the decision to show the dialog or not will be made by Chrome based
+ // on a number of factors (such as install type, whether it's a Chrome-branded
+ // build, etc).
+ void ForceFirstRunDialogShownForTesting(bool shown);
+-#endif // defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++#endif // defined(OS_MACOSX) || (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ } // namespace internal
+ } // namespace first_run
diff --git a/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal__posix.cc b/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal__posix.cc
new file mode 100644
index 000000000000..2843915bd9fb
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_first__run_first__run__internal__posix.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/first_run/first_run_internal_posix.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/first_run/first_run_internal_posix.cc
+@@ -45,7 +45,7 @@ enum class ForcedShowDialogState {
+ ForcedShowDialogState g_forced_show_dialog_state =
+ ForcedShowDialogState::kNotForced;
+
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+ // Returns whether the first run dialog should be shown. This is only true for
+ // certain builds, and only if the user has not already set preferences. In a
+ // real, official-build first run, initializes the default metrics reporting if
+@@ -96,7 +96,7 @@ void ForceFirstRunDialogShownForTesting(bool shown) {
+ }
+
+ void DoPostImportPlatformSpecificTasks(Profile* profile) {
+-#if !defined(OS_CHROMEOS)
++#if !defined(OS_CHROMEOS) && !defined(OS_BSD)
+ if (!ShouldShowFirstRunDialog())
+ return;
+
diff --git a/devel/electron7/files/patch-chrome_browser_flag__descriptions.cc b/devel/electron7/files/patch-chrome_browser_flag__descriptions.cc
new file mode 100644
index 000000000000..ab5d6f53f219
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_flag__descriptions.cc
@@ -0,0 +1,79 @@
+--- chrome/browser/flag_descriptions.cc.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/flag_descriptions.cc
+@@ -3637,7 +3637,7 @@ const char kZeroStateFilesDescription[] =
+
+ #endif // defined(OS_CHROMEOS)
+
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ const char kTerminalSystemAppName[] = "Terminal System App";
+ const char kTerminalSystemAppDescription[] =
+ "Enables the Terminal System App at chrome://terminal which is used for "
+@@ -3650,7 +3650,7 @@ const char kDynamicTcmallocDescription[] =
+ "utilization.";
+ #endif // BUILDFLAG(USE_TCMALLOC)
+
+-#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+
+ // All views-based platforms --------------------------------------------------
+
+@@ -3675,15 +3675,15 @@ const char kReopenTabInProductHelpDescription[] =
+
+ // Random platform combinations -----------------------------------------------
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ const char kWebGL2ComputeContextName[] = "WebGL 2.0 Compute";
+ const char kWebGL2ComputeContextDescription[] =
+ "Enable the use of WebGL 2.0 Compute API.";
+
+-#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+
+ const char kClickToCallContextMenuForSelectedTextName[] =
+@@ -3698,10 +3698,10 @@ const char kClickToCallUIDescription[] =
+ "Enables click to call feature signals to be handled on desktop by showing "
+ "a list of user's available devices with telephony functionality.";
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ const char kDirectManipulationStylusName[] = "Direct Manipulation Stylus";
+ const char kDirectManipulationStylusDescription[] =
+@@ -3720,7 +3720,7 @@ const char kSyncClipboardServiceName[] = "Sync Clipboa
+ const char kSyncClipboardServiceDescription[] =
+ "Enables clipboard syncing via Chrome Sync.";
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_MACOSX) || defined(OS_CHROMEOS)
+
+@@ -3830,7 +3830,7 @@ extern const char kWebrtcPipeWireCapturerDescription[]
+
+ #endif // #if defined(WEBRTC_USE_PIPEWIRE)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ const char kEnableDbusAndX11StatusIconsName[] =
+ "Enable DBus and X11 status icons";
+@@ -3839,7 +3839,7 @@ const char kEnableDbusAndX11StatusIconsDescription[] =
+ "(X11) implementations of status icons. Otherwise, uses libappindicator's "
+ "and GTK's implementations.";
+
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ const char kAvoidFlashBetweenNavigationName[] =
+ "Enable flash avoidance between same-origin navigations";
diff --git a/devel/electron7/files/patch-chrome_browser_flag__descriptions.h b/devel/electron7/files/patch-chrome_browser_flag__descriptions.h
new file mode 100644
index 000000000000..9cce599d91a2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_flag__descriptions.h
@@ -0,0 +1,87 @@
+--- chrome/browser/flag_descriptions.h.orig 2019-12-12 12:39:10 UTC
++++ chrome/browser/flag_descriptions.h
+@@ -20,9 +20,9 @@
+ #include "ui/android/buildflags.h"
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "base/allocator/buildflags.h"
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ // This file declares strings used in chrome://flags. These messages are not
+ // translated, because instead of end-users they target Chromium developers and
+@@ -2181,7 +2181,7 @@ extern const char kZeroStateFilesDescription[];
+
+ #endif // #if defined(OS_CHROMEOS)
+
+-#if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+ extern const char kTerminalSystemAppName[];
+ extern const char kTerminalSystemAppDescription[];
+
+@@ -2190,7 +2190,7 @@ extern const char kDynamicTcmallocName[];
+ extern const char kDynamicTcmallocDescription[];
+ #endif // BUILDFLAG(USE_TCMALLOC)
+
+-#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX)
++#endif // #if defined(OS_CHROMEOS) || defined(OS_LINUX) || defined(OS_BSD)
+
+ // All views-based platforms --------------------------------------------------
+
+@@ -2209,14 +2209,14 @@ extern const char kReopenTabInProductHelpDescription[]
+
+ // Random platform combinations -----------------------------------------------
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ extern const char kWebGL2ComputeContextName[];
+ extern const char kWebGL2ComputeContextDescription[];
+
+-#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+
+ extern const char kClickToCallContextMenuForSelectedTextName[];
+@@ -2225,10 +2225,10 @@ extern const char kClickToCallContextMenuForSelectedTe
+ extern const char kClickToCallUIName[];
+ extern const char kClickToCallUIDescription[];
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ extern const char kDirectManipulationStylusName[];
+ extern const char kDirectManipulationStylusDescription[];
+@@ -2242,7 +2242,7 @@ extern const char kProfileMenuRevampDescription[];
+ extern const char kSyncClipboardServiceName[];
+ extern const char kSyncClipboardServiceDescription[];
+
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_MACOSX) || defined(OS_CHROMEOS)
+
+@@ -2333,12 +2333,12 @@ extern const char kWebrtcPipeWireCapturerDescription[]
+
+ #endif // #if defined(WEBRTC_USE_PIPEWIRE)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ extern const char kEnableDbusAndX11StatusIconsName[];
+ extern const char kEnableDbusAndX11StatusIconsDescription[];
+
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ // ============================================================================
+ // Don't just add flags to the end, put them in the right section in
diff --git a/devel/electron7/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc b/devel/electron7/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
new file mode 100644
index 000000000000..aef2d876779a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media__galleries_fileapi_mtp__device__map__service.cc
@@ -0,0 +1,15 @@
+--- chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media_galleries/fileapi/mtp_device_map_service.cc
+@@ -39,10 +39,12 @@ void MTPDeviceMapService::RegisterMTPFileSystem(
+ // Note that this initializes the delegate asynchronously, but since
+ // the delegate will only be used from the IO thread, it is guaranteed
+ // to be created before use of it expects it to be there.
++#if !defined(OS_FREEBSD)
+ CreateMTPDeviceAsyncDelegate(
+ device_location, read_only,
+ base::Bind(&MTPDeviceMapService::AddAsyncDelegate,
+ base::Unretained(this), device_location, read_only));
++#endif
+ mtp_device_usage_map_[key] = 0;
+ }
+
diff --git a/devel/electron7/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc b/devel/electron7/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc
new file mode 100644
index 000000000000..32000dbb1037
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media__galleries_media__file__system__registry.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/media_galleries/media_file_system_registry.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media_galleries/media_file_system_registry.cc
+@@ -732,7 +732,10 @@ class MediaFileSystemRegistry::MediaFileSystemContextI
+ // Constructor in 'private' section because depends on private class definition.
+ MediaFileSystemRegistry::MediaFileSystemRegistry()
+ : file_system_context_(new MediaFileSystemContextImpl) {
+- StorageMonitor::GetInstance()->AddObserver(this);
++ // This conditional is needed for shutdown. Destructors
++ // try to get the media file system registry.
++ if (StorageMonitor::GetInstance())
++ StorageMonitor::GetInstance()->AddObserver(this);
+ }
+
+ MediaFileSystemRegistry::~MediaFileSystemRegistry() {
diff --git a/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc b/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc
new file mode 100644
index 000000000000..44cf35d64ca7
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__posix.cc
@@ -0,0 +1,28 @@
+--- chrome/browser/media/router/discovery/discovery_network_list_posix.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/router/discovery/discovery_network_list_posix.cc
+@@ -10,6 +10,7 @@
+ #include <netinet/in.h>
+ #include <sys/socket.h>
+ #include <sys/types.h>
++#include <sys/time.h>
+
+ #include <algorithm>
+
+@@ -19,7 +20,7 @@
+ #include "chrome/browser/media/router/discovery/discovery_network_list_wifi.h"
+ #include "net/base/net_errors.h"
+
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+ #include <netpacket/packet.h>
+ #else
+ #include <net/if_dl.h>
+@@ -28,7 +29,7 @@
+ namespace media_router {
+ namespace {
+
+-#if !defined(OS_MACOSX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD)
+ using sll = struct sockaddr_ll;
+ #define SOCKET_ARP_TYPE(s) ((s)->sll_hatype)
+ #define SOCKET_ADDRESS_LEN(s) ((s)->sll_halen)
diff --git a/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc b/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc
new file mode 100644
index 000000000000..3f8479c6f961
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_router_discovery_discovery__network__list__wifi__linux.cc
@@ -0,0 +1,27 @@
+--- chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/router/discovery/discovery_network_list_wifi_linux.cc
+@@ -9,8 +9,6 @@
+ #include <sys/socket.h>
+ #include <sys/types.h>
+
+-#include <linux/wireless.h>
+-
+ #include "base/files/scoped_file.h"
+ #include "base/logging.h"
+ #include "net/base/network_interfaces_linux.h"
+@@ -20,6 +18,7 @@ namespace media_router {
+ bool MaybeGetWifiSSID(const std::string& if_name, std::string* ssid_out) {
+ DCHECK(ssid_out);
+
++#if !defined(OS_BSD)
+ base::ScopedFD ioctl_socket(socket(AF_INET, SOCK_DGRAM, 0));
+ if (!ioctl_socket.is_valid()) {
+ // AF_INET is for IPv4, so it may fail for IPv6-only hosts even when there
+@@ -41,6 +40,7 @@ bool MaybeGetWifiSSID(const std::string& if_name, std:
+ ssid_out->assign(ssid);
+ return true;
+ }
++#endif
+ return false;
+ }
+
diff --git a/devel/electron7/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc b/devel/electron7/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc
new file mode 100644
index 000000000000..c76bfb615f1b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_router_providers_wired__display_wired__display__media__route__provider.cc
@@ -0,0 +1,23 @@
+--- chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/router/providers/wired_display/wired_display_media_route_provider.cc
+@@ -112,6 +112,12 @@ void WiredDisplayMediaRouteProvider::CreateRoute(
+ bool incognito,
+ CreateRouteCallback callback) {
+ DCHECK(!base::Contains(presentations_, presentation_id));
++#if defined(OS_BSD)
++ std::move(callback).Run(base::nullopt, nullptr,
++ std::string("Not implemented"),
++ RouteRequestResult::UNKNOWN_ERROR);
++ return;
++#else
+ base::Optional<Display> display = GetDisplayBySinkId(sink_id);
+ if (!display) {
+ std::move(callback).Run(base::nullopt, nullptr,
+@@ -138,6 +144,7 @@ void WiredDisplayMediaRouteProvider::CreateRoute(
+ std::move(callback).Run(route, nullptr, base::nullopt,
+ RouteRequestResult::OK);
+ NotifyRouteObservers();
++#endif
+ }
+
+ void WiredDisplayMediaRouteProvider::JoinRoute(
diff --git a/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc
new file mode 100644
index 000000000000..a80783abb370
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__event__log__uploader.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/media/webrtc/webrtc_event_log_uploader.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/webrtc/webrtc_event_log_uploader.cc
+@@ -36,7 +36,7 @@ constexpr size_t kExpectedMimeOverheadBytes = 1000; /
+ const char kProduct[] = "Chrome";
+ #elif defined(OS_MACOSX)
+ const char kProduct[] = "Chrome_Mac";
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ const char kProduct[] = "Chrome_Linux";
+ #elif defined(OS_ANDROID)
+ const char kProduct[] = "Chrome_Android";
diff --git a/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
new file mode 100644
index 000000000000..622048dbd308
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__log__uploader.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/media/webrtc/webrtc_log_uploader.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/webrtc/webrtc_log_uploader.cc
+@@ -358,6 +358,8 @@ void WebRtcLogUploader::SetupMultipart(
+ const char product[] = "Chrome_Android";
+ #elif defined(OS_CHROMEOS)
+ const char product[] = "Chrome_ChromeOS";
++#elif defined(OS_FREEBSD)
++ const char product[] = "Chrome_FreeBSD";
+ #else
+ #error Platform not supported.
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc
new file mode 100644
index 000000000000..83599743ed5a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.cc
@@ -0,0 +1,33 @@
+--- chrome/browser/media/webrtc/webrtc_logging_controller.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/webrtc/webrtc_logging_controller.cc
+@@ -24,10 +24,10 @@
+ #include "content/public/browser/render_process_host.h"
+ #include "services/service_manager/public/cpp/connector.h"
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ #include "content/public/browser/child_process_security_policy.h"
+ #include "storage/browser/fileapi/isolated_context.h"
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ using webrtc_event_logging::WebRtcEventLogManager;
+
+@@ -267,7 +267,7 @@ void WebRtcLoggingController::StartEventLogging(
+ web_app_id, callback);
+ }
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ void WebRtcLoggingController::GetLogsDirectory(
+ const LogsDirectoryCallback& callback,
+ const LogsDirectoryErrorCallback& error_callback) {
+@@ -312,7 +312,7 @@ void WebRtcLoggingController::GrantLogsDirectoryAccess
+ base::SequencedTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::BindOnce(callback, file_system.id(), registered_name));
+ }
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ void WebRtcLoggingController::OnRtpPacket(
+ std::unique_ptr<uint8_t[]> packet_header,
diff --git a/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h
new file mode 100644
index 000000000000..c412e553b486
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_media_webrtc_webrtc__logging__controller.h
@@ -0,0 +1,36 @@
+--- chrome/browser/media/webrtc/webrtc_logging_controller.h.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/media/webrtc/webrtc_logging_controller.h
+@@ -129,13 +129,13 @@ class WebRtcLoggingController
+ size_t web_app_id,
+ const StartEventLoggingCallback& callback);
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ // Ensures that the WebRTC Logs directory exists and then grants render
+ // process access to the 'WebRTC Logs' directory, and invokes |callback| with
+ // the ids necessary to create a DirectoryEntry object.
+ void GetLogsDirectory(const LogsDirectoryCallback& callback,
+ const LogsDirectoryErrorCallback& error_callback);
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ // chrome::mojom::WebRtcLoggingClient methods:
+ void OnAddMessages(
+@@ -188,7 +188,7 @@ class WebRtcLoggingController
+ bool success,
+ const std::string& error_message);
+
+-#if defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ // Grants the render process access to the 'WebRTC Logs' directory, and
+ // invokes |callback| with the ids necessary to create a DirectoryEntry
+ // object. If the |logs_path| couldn't be created or found, |error_callback|
+@@ -197,7 +197,7 @@ class WebRtcLoggingController
+ const LogsDirectoryCallback& callback,
+ const LogsDirectoryErrorCallback& error_callback,
+ const base::FilePath& logs_path);
+-#endif // defined(OS_LINUX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ static base::FilePath GetLogDirectoryAndEnsureExists(
+ const base::FilePath& browser_context_directory_path);
diff --git a/devel/electron7/files/patch-chrome_browser_memory__details.cc b/devel/electron7/files/patch-chrome_browser_memory__details.cc
new file mode 100644
index 000000000000..26fef10f78ba
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_memory__details.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/memory_details.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/memory_details.cc
+@@ -38,7 +38,7 @@
+ #include "services/resource_coordinator/public/cpp/memory_instrumentation/memory_instrumentation.h"
+ #include "ui/base/l10n/l10n_util.h"
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ #include "services/service_manager/zygote/zygote_host_linux.h"
+ #endif
+
+@@ -336,7 +336,7 @@ void MemoryDetails::CollectChildInfoOnUIThread() {
+ process.titles.push_back(title);
+ }
+
+-#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID)
++#if defined(OS_POSIX) && !defined(OS_MACOSX) && !defined(OS_ANDROID) && !defined(OS_BSD)
+ if (service_manager::ZygoteHost::GetInstance()->IsZygotePid(process.pid)) {
+ process.process_type = content::PROCESS_TYPE_ZYGOTE;
+ }
diff --git a/devel/electron7/files/patch-chrome_browser_memory__details__linux.cc b/devel/electron7/files/patch-chrome_browser_memory__details__linux.cc
new file mode 100644
index 000000000000..315a7d4b301d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_memory__details__linux.cc
@@ -0,0 +1,13 @@
+--- chrome/browser/memory_details_linux.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/memory_details_linux.cc
+@@ -72,8 +72,10 @@ ProcessData GetProcessDataMemoryInformation(
+
+ std::unique_ptr<base::ProcessMetrics> metrics(
+ base::ProcessMetrics::CreateProcessMetrics(pid));
++#if !defined(OS_BSD)
+ pmi.num_open_fds = metrics->GetOpenFdCount();
+ pmi.open_fds_soft_limit = metrics->GetOpenFdSoftLimit();
++#endif
+
+ process_data.processes.push_back(pmi);
+ }
diff --git a/devel/electron7/files/patch-chrome_browser_metrics_bluetooth__available__utility.cc b/devel/electron7/files/patch-chrome_browser_metrics_bluetooth__available__utility.cc
new file mode 100644
index 000000000000..f463301daffd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_metrics_bluetooth__available__utility.cc
@@ -0,0 +1,13 @@
+--- chrome/browser/metrics/bluetooth_available_utility.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/metrics/bluetooth_available_utility.cc
+@@ -76,8 +76,10 @@ void ReportBluetoothAvailability() {
+ return;
+ }
+
++#if !defined(OS_BSD)
+ device::BluetoothAdapterFactory::Get().GetAdapter(
+ base::BindOnce(&OnGetAdapter));
++#endif
+ }
+
+ } // namespace bluetooth_utility
diff --git a/devel/electron7/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc b/devel/electron7/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
new file mode 100644
index 000000000000..73a413a141ff
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_metrics_chrome__browser__main__extra__parts__metrics.cc
@@ -0,0 +1,21 @@
+--- chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/metrics/chrome_browser_main_extra_parts_metrics.cc
+@@ -47,7 +47,9 @@
+
+ #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
+ #include <gnu/libc-version.h>
++#endif
+
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "base/linux_util.h"
+ #include "base/strings/string_split.h"
+ #include "base/strings/string_util.h"
+@@ -55,7 +57,7 @@
+ #if defined(USE_X11)
+ #include "ui/base/x/x11_util.h"
+ #endif
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ #if defined(USE_OZONE) || defined(USE_X11)
+ #include "ui/events/devices/device_data_manager.h"
diff --git a/devel/electron7/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc b/devel/electron7/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
new file mode 100644
index 000000000000..2d08191eca0c
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_metrics_chrome__metrics__service__client.cc
@@ -0,0 +1,25 @@
+--- chrome/browser/metrics/chrome_metrics_service_client.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/metrics/chrome_metrics_service_client.cc
+@@ -721,11 +721,11 @@ void ChromeMetricsServiceClient::RegisterMetricsServic
+ #endif // defined(OS_WIN)
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ metrics_service_->RegisterMetricsProvider(
+ std::make_unique<DesktopPlatformFeaturesMetricsProvider>());
+ #endif // defined(OS_WIN) || defined(OS_MACOSX) || \
+- // (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ #if BUILDFLAG(ENABLE_PLUGINS)
+ plugin_metrics_provider_ = new PluginMetricsProvider(local_state);
+@@ -974,7 +974,7 @@ bool ChromeMetricsServiceClient::RegisterForProfileEve
+ }
+ #endif
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // This creates the DesktopProfileSessionDurationsServices if it didn't exist
+ // already.
+ metrics::DesktopProfileSessionDurationsServiceFactory::GetForBrowserContext(
diff --git a/devel/electron7/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc b/devel/electron7/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc
new file mode 100644
index 000000000000..b6721f75005a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_metrics_process__memory__metrics__emitter.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/metrics/process_memory_metrics_emitter.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/metrics/process_memory_metrics_emitter.cc
+@@ -378,7 +378,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc
+
+ builder->SetPrivateMemoryFootprint(pmd.os_dump().private_footprint_kb / 1024);
+ builder->SetSharedMemoryFootprint(pmd.os_dump().shared_footprint_kb / 1024);
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ builder->SetPrivateSwapFootprint(pmd.os_dump().private_footprint_swap_kb /
+ 1024);
+ #endif
+@@ -401,7 +401,7 @@ void EmitProcessUmaAndUkm(const GlobalMemoryDump::Proc
+ MEMORY_METRICS_HISTOGRAM_MB(std::string(kMemoryHistogramPrefix) +
+ process_name + ".SharedMemoryFootprint",
+ pmd.os_dump().shared_footprint_kb / 1024);
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ MEMORY_METRICS_HISTOGRAM_MB(std::string(kMemoryHistogramPrefix) +
+ process_name + ".PrivateSwapFootprint",
+ pmd.os_dump().private_footprint_swap_kb / 1024);
diff --git a/devel/electron7/files/patch-chrome_browser_native__file__system_chrome__native__file__system__permission__context.cc b/devel/electron7/files/patch-chrome_browser_native__file__system_chrome__native__file__system__permission__context.cc
new file mode 100644
index 000000000000..3b2a08ccac45
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_native__file__system_chrome__native__file__system__permission__context.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/native_file_system/chrome_native_file_system_permission_context.cc
+@@ -225,7 +225,7 @@ const struct {
+ {base::DIR_APP_DATA, nullptr, true},
+ {base::DIR_HOME, FILE_PATH_LITERAL("Library"), true},
+ #endif
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // On Linux also block access to devices via /dev, as well as security
+ // sensitive data in /sys and /proc.
+ {kNoBasePathKey, FILE_PATH_LITERAL("/dev"), true},
diff --git a/devel/electron7/files/patch-chrome_browser_net_system__network__context__manager.cc b/devel/electron7/files/patch-chrome_browser_net_system__network__context__manager.cc
new file mode 100644
index 000000000000..595be57d2b04
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_net_system__network__context__manager.cc
@@ -0,0 +1,64 @@
+--- chrome/browser/net/system_network_context_manager.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/net/system_network_context_manager.cc
+@@ -78,11 +78,11 @@
+ #include "chrome/browser/chromeos/policy/browser_policy_connector_chromeos.h"
+ #endif // defined(OS_CHROMEOS)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "chrome/common/chrome_paths_internal.h"
+ #include "chrome/grit/chromium_strings.h"
+ #include "ui/base/l10n/l10n_util.h"
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+
+ #if BUILDFLAG(ENABLE_EXTENSIONS)
+ #include "extensions/common/constants.h"
+@@ -206,10 +206,10 @@ network::mojom::HttpAuthDynamicParamsPtr CreateHttpAut
+ auth_dynamic_params->enable_negotiate_port =
+ local_state->GetBoolean(prefs::kEnableAuthNegotiatePort);
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ auth_dynamic_params->delegate_by_kdc_policy =
+ local_state->GetBoolean(prefs::kAuthNegotiateDelegateByKdcPolicy);
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ #if defined(OS_POSIX)
+ auth_dynamic_params->ntlm_v2_enabled =
+@@ -457,10 +457,10 @@ SystemNetworkContextManager::SystemNetworkContextManag
+ pref_change_registrar_.Add(prefs::kEnableAuthNegotiatePort,
+ auth_pref_callback);
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ pref_change_registrar_.Add(prefs::kAuthNegotiateDelegateByKdcPolicy,
+ auth_pref_callback);
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ #if defined(OS_POSIX)
+ pref_change_registrar_.Add(prefs::kNtlmV2Enabled, auth_pref_callback);
+@@ -509,10 +509,10 @@ void SystemNetworkContextManager::RegisterPrefs(PrefRe
+ registry->RegisterStringPref(prefs::kAuthServerWhitelist, std::string());
+ registry->RegisterStringPref(prefs::kAuthNegotiateDelegateWhitelist,
+ std::string());
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ registry->RegisterBooleanPref(prefs::kAuthNegotiateDelegateByKdcPolicy,
+ false);
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+
+ #if defined(OS_POSIX)
+ registry->RegisterBooleanPref(
+@@ -620,7 +620,7 @@ void SystemNetworkContextManager::OnNetworkServiceCrea
+ insecure_stub_resolver_enabled, secure_dns_mode,
+ std::move(dns_over_https_servers));
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ const base::CommandLine& command_line =
+ *base::CommandLine::ForCurrentProcess();
+
diff --git a/devel/electron7/files/patch-chrome_browser_notifications_notification__display__service__impl.cc b/devel/electron7/files/patch-chrome_browser_notifications_notification__display__service__impl.cc
new file mode 100644
index 000000000000..eb8ab052c69a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_notifications_notification__display__service__impl.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/notifications/notification_display_service_impl.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/notifications/notification_display_service_impl.cc
+@@ -33,7 +33,7 @@
+ #include "chrome/browser/notifications/notification_platform_bridge_message_center.h"
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h"
+ #endif
+
+@@ -122,7 +122,7 @@ NotificationDisplayServiceImpl::NotificationDisplaySer
+ AddNotificationHandler(NotificationHandler::Type::WEB_PERSISTENT,
+ std::make_unique<PersistentNotificationHandler>());
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ AddNotificationHandler(
+ NotificationHandler::Type::SEND_TAB_TO_SELF,
+ std::make_unique<send_tab_to_self::DesktopNotificationHandler>(
diff --git a/devel/electron7/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc b/devel/electron7/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
new file mode 100644
index 000000000000..a116ba344580
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_password__manager_chrome__password__manager__client.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/password_manager/chrome_password_manager_client.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/password_manager/chrome_password_manager_client.cc
+@@ -84,7 +84,11 @@
+ #include "net/base/url_util.h"
+ #include "net/cert/cert_status_flags.h"
+ #include "services/metrics/public/cpp/ukm_recorder.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+ #include "url/url_constants.h"
+
+ #if BUILDFLAG(FULL_SAFE_BROWSING)
diff --git a/devel/electron7/files/patch-chrome_browser_password__manager_password__store__factory.cc b/devel/electron7/files/patch-chrome_browser_password__manager_password__store__factory.cc
new file mode 100644
index 000000000000..1ddf887941c0
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_password__manager_password__store__factory.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/password_manager/password_store_factory.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/password_manager/password_store_factory.cc
+@@ -181,7 +181,7 @@ PasswordStoreFactory::BuildServiceInstanceFor(
+ base::TimeDelta::FromSeconds(20));
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ std::unique_ptr<password_manager::PasswordStoreSigninNotifier> notifier =
+ std::make_unique<password_manager::PasswordStoreSigninNotifierImpl>(
+ IdentityManagerFactory::GetForProfile(profile));
diff --git a/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc b/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc
new file mode 100644
index 000000000000..54ee1129991a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.cc
@@ -0,0 +1,38 @@
+--- chrome/browser/performance_monitor/process_metrics_history.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/performance_monitor/process_metrics_history.cc
+@@ -47,7 +47,7 @@ void ProcessMetricsHistory::SampleMetrics() {
+ #if defined(OS_WIN)
+ disk_usage_ = process_metrics_->GetDiskUsageBytesPerSecond();
+ #endif
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ idle_wakeups_ = process_metrics_->GetIdleWakeupsPerSecond();
+ #endif
+ #if defined(OS_MACOSX)
+@@ -88,7 +88,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() {
+ kDiskUsageHistogramMin, kDiskUsageHistogramMax,
+ kDiskUsageHistogramBucketCount);
+ #endif
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ UMA_HISTOGRAM_COUNTS_10000(
+ "PerformanceMonitor.IdleWakeups.BrowserProcess", idle_wakeups_);
+ #endif
+@@ -109,7 +109,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() {
+ UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.RendererProcess",
+ true);
+ }
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ UMA_HISTOGRAM_COUNTS_10000(
+ "PerformanceMonitor.IdleWakeups.RendererProcess", idle_wakeups_);
+ #endif
+@@ -129,7 +129,7 @@ void ProcessMetricsHistory::RunPerformanceTriggers() {
+ kHistogramBucketCount);
+ if (cpu_usage_ > kHighCPUUtilizationThreshold)
+ UMA_HISTOGRAM_BOOLEAN("PerformanceMonitor.HighCPU.GPUProcess", true);
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ UMA_HISTOGRAM_COUNTS_10000("PerformanceMonitor.IdleWakeups.GPUProcess",
+ idle_wakeups_);
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.h b/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.h
new file mode 100644
index 000000000000..64ca0fa3819a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_performance__monitor_process__metrics__history.h
@@ -0,0 +1,11 @@
+--- chrome/browser/performance_monitor/process_metrics_history.h.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/performance_monitor/process_metrics_history.h
+@@ -72,7 +72,7 @@ class ProcessMetricsHistory {
+ uint64_t disk_usage_ = 0;
+ #endif
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_AIX) || defined(OS_BSD)
+ int idle_wakeups_ = 0;
+ #endif
+ #if defined(OS_MACOSX)
diff --git a/devel/electron7/files/patch-chrome_browser_platform__util.h b/devel/electron7/files/patch-chrome_browser_platform__util.h
new file mode 100644
index 000000000000..262e7989117c
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_platform__util.h
@@ -0,0 +1,11 @@
+--- chrome/browser/platform_util.h.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/platform_util.h
+@@ -41,7 +41,7 @@ enum OpenOperationResult {
+ enum OpenItemType {
+ OPEN_FILE,
+ OPEN_FOLDER,
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ SHOW_ITEM_IN_FOLDER
+ #endif
+ };
diff --git a/devel/electron7/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc b/devel/electron7/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc
new file mode 100644
index 000000000000..468c606aea6e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_plugins_plugin__info__host__impl.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/plugins/plugin_info_host_impl.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/plugins/plugin_info_host_impl.cc
+@@ -383,7 +383,7 @@ void PluginInfoHostImpl::ComponentPluginLookupDone(
+ std::unique_ptr<component_updater::ComponentInfo> cus_plugin_info) {
+ if (cus_plugin_info) {
+ output->status = chrome::mojom::PluginStatus::kComponentUpdateRequired;
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ if (cus_plugin_info->version != base::Version("0")) {
+ output->status = chrome::mojom::PluginStatus::kRestartRequired;
+ }
diff --git a/devel/electron7/files/patch-chrome_browser_plugins_plugins__resource__service.cc b/devel/electron7/files/patch-chrome_browser_plugins_plugins__resource__service.cc
new file mode 100644
index 000000000000..4daa8d69e3b7
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_plugins_plugins__resource__service.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/plugins/plugins_resource_service.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/plugins/plugins_resource_service.cc
+@@ -63,7 +63,7 @@ GURL GetPluginsServerURL() {
+ filename = "plugins_win.json";
+ #elif defined(OS_CHROMEOS)
+ filename = "plugins_chromeos.json";
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ filename = "plugins_linux.json";
+ #elif defined(OS_MACOSX)
+ filename = "plugins_mac.json";
diff --git a/devel/electron7/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc b/devel/electron7/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc
new file mode 100644
index 000000000000..a19edeb578ce
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_policy_browser__signin__policy__handler.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/policy/browser_signin_policy_handler.cc.orig 2019-12-12 12:39:11 UTC
++++ chrome/browser/policy/browser_signin_policy_handler.cc
+@@ -39,7 +39,7 @@ void BrowserSigninPolicyHandler::ApplyPolicySettings(c
+ }
+ switch (static_cast<BrowserSigninMode>(int_value)) {
+ case BrowserSigninMode::kForced:
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_BSD)
+ prefs->SetValue(prefs::kForceBrowserSignin, base::Value(true));
+ #endif
+ FALLTHROUGH;
diff --git a/devel/electron7/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc b/devel/electron7/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc
new file mode 100644
index 000000000000..504aed67d0a9
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_policy_configuration__policy__handler__list__factory.cc
@@ -0,0 +1,43 @@
+--- chrome/browser/policy/configuration_policy_handler_list_factory.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/policy/configuration_policy_handler_list_factory.cc
+@@ -113,7 +113,7 @@
+ #endif
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
+ #endif
+
+@@ -333,11 +333,11 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] =
+ prefs::kSafeBrowsingSendFilesForMalwareCheck,
+ base::Value::Type::INTEGER
+ },
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ { key::kAuthNegotiateDelegateByKdcPolicy,
+ prefs::kAuthNegotiateDelegateByKdcPolicy,
+ base::Value::Type::BOOLEAN },
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_CHROMEOS) || defined(OS_BSD)
+ #if defined(OS_POSIX)
+ { key::kNtlmV2Enabled,
+ prefs::kNtlmV2Enabled,
+@@ -1064,7 +1064,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] =
+ base::Value::Type::BOOLEAN },
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ { key::kAlternativeBrowserPath,
+ browser_switcher::prefs::kAlternativeBrowserPath,
+ base::Value::Type::STRING },
+@@ -1125,7 +1125,7 @@ const PolicyToPreferenceMapEntry kSimplePolicyMap[] =
+ browser_switcher::prefs::kChromeParameters,
+ base::Value::Type::LIST },
+ #endif
+-#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
+ { key::kBrowserGuestModeEnforced,
+ prefs::kBrowserGuestModeEnforced,
+ base::Value::Type::BOOLEAN },
diff --git a/devel/electron7/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc b/devel/electron7/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc
new file mode 100644
index 000000000000..9f3f75be4b60
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_policy_policy__prefs__browsertest.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/policy/policy_prefs_browsertest.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/policy/policy_prefs_browsertest.cc
+@@ -184,6 +184,8 @@ class PolicyTestCase {
+ const std::string os("chromeos");
+ #elif defined(OS_LINUX)
+ const std::string os("linux");
++#elif defined(OS_FREEBSD)
++ const std::string os("freebsd");
+ #else
+ #error "Unknown platform"
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_prefs_browser__prefs.cc b/devel/electron7/files/patch-chrome_browser_prefs_browser__prefs.cc
new file mode 100644
index 000000000000..90f46e1f7de4
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_prefs_browser__prefs.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/prefs/browser_prefs.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/prefs/browser_prefs.cc
+@@ -346,7 +346,7 @@
+ #endif
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "chrome/browser/browser_switcher/browser_switcher_prefs.h"
+ #endif
+
+@@ -951,7 +951,7 @@ void RegisterProfilePrefs(user_prefs::PrefRegistrySync
+ #endif
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ browser_switcher::BrowserSwitcherPrefs::RegisterProfilePrefs(registry);
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_prefs_pref__service__incognito__whitelist.cc b/devel/electron7/files/patch-chrome_browser_prefs_pref__service__incognito__whitelist.cc
new file mode 100644
index 000000000000..b2ef6cc6ec21
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_prefs_pref__service__incognito__whitelist.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/prefs/pref_service_incognito_whitelist.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/prefs/pref_service_incognito_whitelist.cc
+@@ -186,7 +186,7 @@ const char* const kPersistentPrefNames[] = {
+ prefs::kShowFullscreenToolbar,
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ // Toggleing custom frames affects all open windows in the profile, hence
+ // should be written to the regular profile when changed in incognito mode.
+ prefs::kUseCustomChromeFrame,
diff --git a/devel/electron7/files/patch-chrome_browser_process__singleton__posix.cc b/devel/electron7/files/patch-chrome_browser_process__singleton__posix.cc
new file mode 100644
index 000000000000..8aafd173c9dd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_process__singleton__posix.cc
@@ -0,0 +1,34 @@
+--- chrome/browser/process_singleton_posix.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/process_singleton_posix.cc
+@@ -95,11 +95,11 @@
+ #include "net/base/network_interfaces.h"
+ #include "ui/base/l10n/l10n_util.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/ui/process_singleton_dialog_linux.h"
+ #endif
+
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+
+@@ -296,7 +296,7 @@ bool DisplayProfileInUseError(const base::FilePath& lo
+ if (g_disable_prompt)
+ return g_user_opted_unlock_in_use_profile;
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ base::string16 relaunch_button_text = l10n_util::GetStringUTF16(
+ IDS_PROFILE_IN_USE_LINUX_RELAUNCH);
+ return ShowProcessSingletonDialog(error, relaunch_button_text);
+@@ -872,7 +872,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::Notif
+ SendRemoteProcessInteractionResultHistogram(REMOTE_PROCESS_SHUTTING_DOWN);
+ return PROCESS_NONE;
+ } else if (strncmp(buf, kACKToken, base::size(kACKToken) - 1) == 0) {
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Likely NULL in unit tests.
+ views::LinuxUI* linux_ui = views::LinuxUI::instance();
+ if (linux_ui)
diff --git a/devel/electron7/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc b/devel/electron7/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc
new file mode 100644
index 000000000000..d93c1081dd4f
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_profiles_chrome__browser__main__extra__parts__profiles.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/profiles/chrome_browser_main_extra_parts_profiles.cc
+@@ -181,7 +181,7 @@
+ #include "chrome/browser/safe_browsing/advanced_protection_status_manager_factory.h"
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/sync/sync_clipboard_service_factory.h"
+ #endif
+
+@@ -336,7 +336,7 @@ void ChromeBrowserMainExtraPartsProfiles::
+ MediaGalleriesPreferencesFactory::GetInstance();
+ #endif
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ metrics::DesktopProfileSessionDurationsServiceFactory::GetInstance();
+ #endif
+ ModelTypeStoreServiceFactory::GetInstance();
+@@ -398,7 +398,7 @@ void ChromeBrowserMainExtraPartsProfiles::
+ SpellcheckServiceFactory::GetInstance();
+ #endif
+ suggestions::SuggestionsServiceFactory::GetInstance();
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ SyncClipboardServiceFactory::GetInstance();
+ #endif
+ TabRestoreServiceFactory::GetInstance();
diff --git a/devel/electron7/files/patch-chrome_browser_profiles_profile__attributes__entry.cc b/devel/electron7/files/patch-chrome_browser_profiles_profile__attributes__entry.cc
new file mode 100644
index 000000000000..800da17bbabc
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_profiles_profile__attributes__entry.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/profiles/profile_attributes_entry.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/profiles/profile_attributes_entry.cc
+@@ -83,7 +83,7 @@ void ProfileAttributesEntry::Initialize(ProfileInfoCac
+ if (is_force_signin_enabled_) {
+ if (!IsAuthenticated())
+ is_force_signin_profile_locked_ = true;
+-#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ } else if (IsSigninRequired()) {
+ // Profiles that require signin in the absence of an enterprise policy are
+ // left-overs from legacy supervised users. Just unlock them, so users can
diff --git a/devel/electron7/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc b/devel/electron7/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
new file mode 100644
index 000000000000..31b90afcf3b4
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_renderer__context__menu_render__view__context__menu.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/renderer_context_menu/render_view_context_menu.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/renderer_context_menu/render_view_context_menu.cc
+@@ -1699,7 +1699,7 @@ void RenderViewContextMenu::AppendEditableItems() {
+ // 'Undo' and 'Redo' for text input with no suggestions and no text selected.
+ // We make an exception for OS X as context clicking will select the closest
+ // word. In this case both items are always shown.
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_UNDO,
+ IDS_CONTENT_CONTEXT_UNDO);
+ menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_REDO,
+@@ -1741,7 +1741,7 @@ void RenderViewContextMenu::AppendLanguageSettings() {
+ if (!use_spelling)
+ return;
+
+-#if defined(OS_MACOSX)
++#if defined(OS_MACOSX) || defined(OS_BSD)
+ menu_model_.AddItemWithStringId(IDC_CONTENT_CONTEXT_LANGUAGE_SETTINGS,
+ IDS_CONTENT_CONTEXT_LANGUAGE_SETTINGS);
+ #else
+@@ -2045,7 +2045,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id)
+ case IDC_CHECK_SPELLING_WHILE_TYPING:
+ return prefs->GetBoolean(spellcheck::prefs::kSpellCheckEnable);
+
+-#if !defined(OS_MACOSX) && defined(OS_POSIX)
++#if !defined(OS_MACOSX) && !defined(OS_BSD) && defined(OS_POSIX)
+ // TODO(suzhe): this should not be enabled for password fields.
+ case IDC_INPUT_METHODS_MENU:
+ return true;
diff --git a/devel/electron7/files/patch-chrome_browser_renderer__preferences__util.cc b/devel/electron7/files/patch-chrome_browser_renderer__preferences__util.cc
new file mode 100644
index 000000000000..e681c2d25b47
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_renderer__preferences__util.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/renderer_preferences_util.cc.orig 2019-12-12 12:39:12 UTC
++++ chrome/browser/renderer_preferences_util.cc
+@@ -30,7 +30,7 @@
+ #include "ui/base/cocoa/defaults_utils.h"
+ #endif
+
+-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "chrome/browser/themes/theme_service.h"
+ #include "chrome/browser/themes/theme_service_factory.h"
+ #include "ui/views/linux_ui/linux_ui.h"
+@@ -130,7 +130,7 @@ void UpdateFromSystemSettings(blink::mojom::RendererPr
+ prefs->caret_blink_interval = interval;
+ #endif
+
+-#if defined(USE_AURA) && defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(USE_AURA) && (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ views::LinuxUI* linux_ui = views::LinuxUI::instance();
+ if (linux_ui) {
+ if (ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme()) {
+@@ -149,7 +149,7 @@ void UpdateFromSystemSettings(blink::mojom::RendererPr
+ }
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_BSD)
+ content::UpdateFontRendererPreferencesFromSystemSettings(prefs);
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py b/devel/electron7/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
new file mode 100644
index 000000000000..b8bf086f3b4f
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_resources_safe__browsing_gen__file__type__proto.py
@@ -0,0 +1,19 @@
+--- chrome/browser/resources/safe_browsing/gen_file_type_proto.py.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/resources/safe_browsing/gen_file_type_proto.py
+@@ -31,6 +31,7 @@ def PlatformTypes():
+ "android": download_file_types_pb2.DownloadFileType.PLATFORM_ANDROID,
+ "chromeos": download_file_types_pb2.DownloadFileType.PLATFORM_CHROME_OS,
+ "linux": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX,
++ "bsd": download_file_types_pb2.DownloadFileType.PLATFORM_LINUX,
+ "mac": download_file_types_pb2.DownloadFileType.PLATFORM_MAC,
+ "win": download_file_types_pb2.DownloadFileType.PLATFORM_WINDOWS,
+ }
+@@ -169,7 +170,7 @@ class DownloadFileTypeProtoGenerator(BinaryProtoGenera
+ 'Outfile must have a %d for version and %s for platform.')
+ parser.add_option('-t', '--type',
+ help='The platform type. One of android, chromeos, ' +
+- 'linux, mac, win')
++ 'linux, bsd, mac, win')
+
+ def AddExtraCommandLineArgsForVirtualEnvRun(self, opts, command):
+ if opts.type is not None:
diff --git a/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js
new file mode 100644
index 000000000000..1dc370e85719
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__browser__proxy.js
@@ -0,0 +1,20 @@
+--- chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/resources/settings/appearance_page/appearance_browser_proxy.js
+@@ -19,7 +19,7 @@ cr.define('settings', function() {
+
+ useDefaultTheme() {}
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ useSystemTheme() {}
+
+ // </if>
+@@ -59,7 +59,7 @@ cr.define('settings', function() {
+ chrome.send('useDefaultTheme');
+ }
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ /** @override */
+ useSystemTheme() {
+ chrome.send('useSystemTheme');
diff --git a/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html
new file mode 100644
index 000000000000..c0e0f6981ba3
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.html
@@ -0,0 +1,29 @@
+--- chrome/browser/resources/settings/appearance_page/appearance_page.html.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/resources/settings/appearance_page/appearance_page.html
+@@ -67,7 +67,7 @@
+ <cr-link-row class="first" hidden="[[!pageVisibility.setTheme]]"
+ label="$i18n{themes}" sub-label="[[themeSublabel_]]"
+ on-click="openThemeUrl_" external></cr-link-row>
+-<if expr="not is_linux or chromeos">
++<if expr="not is_posix or chromeos">
+ <template is="dom-if" if="[[prefs.extensions.theme.id.value]]">
+ <div class="separator"></div>
+ <cr-button id="useDefault" on-click="onUseDefaultTap_">
+@@ -75,7 +75,7 @@
+ </cr-button>
+ </template>
+ </if>
+-<if expr="is_linux and not chromeos">
++<if expr="is_posix and not chromeos">
+ <div class="settings-row continuation"
+ hidden="[[!showThemesSecondary_(
+ prefs.extensions.theme.id.value, useSystemTheme_)]]"
+@@ -138,7 +138,7 @@
+ pref="{{prefs.bookmark_bar.show_on_all_tabs}}"
+ label="$i18n{showBookmarksBar}">
+ </settings-toggle-button>
+-<if expr="is_linux and not chromeos">
++<if expr="is_posix and not chromeos">
+ <settings-toggle-button
+ class$="[[getFirst_(pageVisibility.bookmarksBar)]]"
+ pref="{{prefs.browser.custom_chrome_frame}}"
diff --git a/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.js b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.js
new file mode 100644
index 000000000000..586243c078af
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_resources_settings_appearance__page_appearance__page.js
@@ -0,0 +1,33 @@
+--- chrome/browser/resources/settings/appearance_page/appearance_page.js.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/resources/settings/appearance_page/appearance_page.js
+@@ -130,7 +130,7 @@ Polymer({
+ 'defaultFontSizeChanged_(prefs.webkit.webprefs.default_font_size.value)',
+ 'themeChanged_(prefs.extensions.theme.id.value, useSystemTheme_)',
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ // NOTE: this pref only exists on Linux.
+ 'useSystemThemePrefChanged_(prefs.extensions.theme.use_system.value)',
+ // </if>
+@@ -238,7 +238,7 @@ Polymer({
+ this.appearanceBrowserProxy_.useDefaultTheme();
+ },
+
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ /**
+ * @param {boolean} useSystemTheme
+ * @private
+@@ -315,10 +315,10 @@ Polymer({
+ }
+
+ let i18nId;
+- // <if expr="is_linux and not chromeos">
++ // <if expr="is_bsd and not chromeos">
+ i18nId = useSystemTheme ? 'systemTheme' : 'classicTheme';
+ // </if>
+- // <if expr="not is_linux or chromeos">
++ // <if expr="not is_bsd or chromeos">
+ i18nId = 'chooseFromWebStore';
+ // </if>
+ this.themeSublabel_ = this.i18n(i18nId);
diff --git a/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc b/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
new file mode 100644
index 000000000000..8b9eeb4c7e45
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__handler__util.cc
@@ -0,0 +1,15 @@
+--- chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/safe_browsing/incident_reporting/incident_handler_util.cc
+@@ -8,7 +8,12 @@
+
+ #include "base/hash/hash.h"
+ #include "base/logging.h"
++//XXX(rene) needs shim headers?
++#if defined(USE_SYSTEM_PROTOBUF)
++#include <google/protobuf/message_lite.h>
++#else
+ #include "third_party/protobuf/src/google/protobuf/message_lite.h"
++#endif
+
+ namespace safe_browsing {
+
diff --git a/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc b/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc
new file mode 100644
index 000000000000..ce7bc48bf3ce
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_safe__browsing_incident__reporting_incident__reporting__service.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/safe_browsing/incident_reporting/incident_reporting_service.cc
+@@ -713,7 +713,7 @@ void IncidentReportingService::OnEnvironmentDataCollec
+ environment_collection_pending_ = false;
+
+ // Process::Current().CreationTime() is missing on some platforms.
+-#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ base::TimeDelta uptime =
+ first_incident_time_ - base::Process::Current().CreationTime();
+ environment_data->mutable_process()->set_uptime_msec(uptime.InMilliseconds());
diff --git a/devel/electron7/files/patch-chrome_browser_search_search__suggest_search__suggest__service.cc b/devel/electron7/files/patch-chrome_browser_search_search__suggest_search__suggest__service.cc
new file mode 100644
index 000000000000..857c906fc5dd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_search_search__suggest_search__suggest__service.cc
@@ -0,0 +1,14 @@
+--- chrome/browser/search/search_suggest/search_suggest_service.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/search/search_suggest/search_suggest_service.cc
+@@ -17,7 +17,11 @@
+ #include "components/prefs/scoped_user_pref_update.h"
+ #include "components/signin/public/identity_manager/accounts_in_cookie_jar_info.h"
+ #include "components/signin/public/identity_manager/identity_manager.h"
++#if defined(OS_BSD)
++#include <re2/re2.h>
++#else
+ #include "third_party/re2/src/re2/re2.h"
++#endif
+
+ namespace {
+
diff --git a/devel/electron7/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc b/devel/electron7/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc
new file mode 100644
index 000000000000..6688d36ef421
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_send__tab__to__self_receiving__ui__handler__registry.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/send_tab_to_self/receiving_ui_handler_registry.cc
+@@ -11,7 +11,7 @@
+ #include "chrome/browser/profiles/profile.h"
+ #include "chrome/browser/send_tab_to_self/receiving_ui_handler.h"
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ #include "chrome/browser/send_tab_to_self/desktop_notification_handler.h"
+ #endif
+
+@@ -32,7 +32,7 @@ ReceivingUiHandlerRegistry* ReceivingUiHandlerRegistry
+ // Instantiates all the handlers relevant to this platform.
+ void ReceivingUiHandlerRegistry::InstantiatePlatformSpecificHandlers(
+ Profile* profile) {
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ applicable_handlers_.push_back(
+ std::make_unique<send_tab_to_self::DesktopNotificationHandler>(profile));
+ #elif defined(OS_ANDROID)
diff --git a/devel/electron7/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc b/devel/electron7/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc
new file mode 100644
index 000000000000..ca25bcc8ac03
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_send__tab__to__self_send__tab__to__self__client__service.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/send_tab_to_self/send_tab_to_self_client_service.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/send_tab_to_self/send_tab_to_self_client_service.cc
+@@ -41,7 +41,7 @@ void SendTabToSelfClientService::SendTabToSelfModelLoa
+ void SendTabToSelfClientService::EntriesAddedRemotely(
+ const std::vector<const SendTabToSelfEntry*>& new_entries) {
+ for (const std::unique_ptr<ReceivingUiHandler>& handler : GetHandlers()) {
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ // Only respond to notifications corresponding to this service's profile
+ // for these OSes; mobile does not have a Profile.
+ // Cast note: on desktop, handlers are guaranteed to be the derived class
diff --git a/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.cc b/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.cc
new file mode 100644
index 000000000000..2c70cd534cf7
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.cc
@@ -0,0 +1,17 @@
+--- chrome/browser/sharing/click_to_call/feature.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/sharing/click_to_call/feature.cc
+@@ -9,12 +9,12 @@ const base::Feature kClickToCallReceiver{"ClickToCallR
+ base::FEATURE_ENABLED_BY_DEFAULT};
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ const base::Feature kClickToCallContextMenuForSelectedText{
+ "ClickToCallContextMenuForSelectedText", base::FEATURE_DISABLED_BY_DEFAULT};
+
+ const base::Feature kClickToCallUI{"ClickToCallUI",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
diff --git a/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.h b/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.h
new file mode 100644
index 000000000000..190c70c746fd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_sharing_click__to__call_feature.h
@@ -0,0 +1,20 @@
+--- chrome/browser/sharing/click_to_call/feature.h.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/sharing/click_to_call/feature.h
+@@ -13,7 +13,7 @@
+ extern const base::Feature kClickToCallReceiver;
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || \
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) || \
+ defined(OS_CHROMEOS)
+ // Feature to allow click to call gets processed on desktop.
+ extern const base::Feature kClickToCallUI;
+@@ -21,7 +21,7 @@ extern const base::Feature kClickToCallUI;
+ // Feature to show click to call in context menu when selected text is a phone
+ // number.
+ extern const base::Feature kClickToCallContextMenuForSelectedText;
+-#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) ||
++#endif // defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD) ||
+ // defined(OS_CHROMEOS)
+
+ #endif // CHROME_BROWSER_SHARING_CLICK_TO_CALL_FEATURE_H_
diff --git a/devel/electron7/files/patch-chrome_browser_signin_signin__util.cc b/devel/electron7/files/patch-chrome_browser_signin_signin__util.cc
new file mode 100644
index 000000000000..c6eb214fb843
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_signin_signin__util.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/signin/signin_util.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/signin/signin_util.cc
+@@ -34,7 +34,7 @@
+ #include "google_apis/gaia/gaia_auth_util.h"
+ #include "ui/base/l10n/l10n_util.h"
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #include "chrome/browser/ui/browser_finder.h"
+ #include "chrome/browser/ui/browser_list.h"
+ #include "chrome/browser/ui/browser_list_observer.h"
+@@ -46,7 +46,7 @@ namespace {
+
+ constexpr char kSignoutSettingKey[] = "signout_setting";
+
+-#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #define CAN_DELETE_PROFILE
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_ssl_captive__portal__blocking__page.cc b/devel/electron7/files/patch-chrome_browser_ssl_captive__portal__blocking__page.cc
new file mode 100644
index 000000000000..11e72959a466
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ssl_captive__portal__blocking__page.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ssl/captive_portal_blocking_page.cc.orig 2019-12-12 12:39:15 UTC
++++ chrome/browser/ssl/captive_portal_blocking_page.cc
+@@ -124,7 +124,7 @@ std::string CaptivePortalBlockingPage::GetWiFiSSID() c
+ wifi_service->GetConnectedNetworkSSID(&ssid, &error);
+ if (!error.empty())
+ return std::string();
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ ssid = net::GetWifiSSID();
+ #elif defined(OS_ANDROID)
+ ssid = net::android::GetWifiSSID();
diff --git a/devel/electron7/files/patch-chrome_browser_ssl_ssl__error__controller__client.cc b/devel/electron7/files/patch-chrome_browser_ssl_ssl__error__controller__client.cc
new file mode 100644
index 000000000000..a7cc7d9553f9
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ssl_ssl__error__controller__client.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ssl/ssl_error_controller_client.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ssl/ssl_error_controller_client.cc
+@@ -79,7 +79,7 @@ void LaunchDateAndTimeSettingsImpl() {
+ #if defined(OS_ANDROID)
+ chrome::android::OpenDateAndTimeSettings();
+
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ struct ClockCommand {
+ const char* const pathname;
+ const char* const argument;
+@@ -204,7 +204,7 @@ void SSLErrorControllerClient::Proceed() {
+ }
+
+ bool SSLErrorControllerClient::CanLaunchDateAndTimeSettings() {
+-#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_MACOSX) || \
++#if defined(OS_ANDROID) || defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD) || \
+ defined(OS_WIN)
+ return true;
+ #else
diff --git a/devel/electron7/files/patch-chrome_browser_sync_chrome__sync__client.cc b/devel/electron7/files/patch-chrome_browser_sync_chrome__sync__client.cc
new file mode 100644
index 000000000000..83a099a53bf6
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_sync_chrome__sync__client.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/sync/chrome_sync_client.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/sync/chrome_sync_client.cc
+@@ -389,7 +389,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy
+ GetSyncableServiceForType(syncer::APP_LIST), dump_stack));
+ #endif // BUILDFLAG(ENABLE_APP_LIST)
+
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ // Dictionary sync is enabled by default.
+ if (!disabled_types.Has(syncer::DICTIONARY)) {
+ controllers.push_back(
+@@ -397,7 +397,7 @@ ChromeSyncClient::CreateDataTypeControllers(syncer::Sy
+ syncer::DICTIONARY, GetModelTypeStoreService()->GetStoreFactory(),
+ GetSyncableServiceForType(syncer::DICTIONARY), dump_stack));
+ }
+-#endif // defined(OS_LINUX) || defined(OS_WIN)
++#endif // defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ if (arc::IsArcAllowedForProfile(profile_) &&
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.cc b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.cc
new file mode 100644
index 000000000000..7e465425baf5
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.cc
@@ -0,0 +1,56 @@
+--- chrome/browser/task_manager/sampling/task_group.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/sampling/task_group.cc
+@@ -33,9 +33,9 @@ const int kBackgroundRefreshTypesMask =
+ #if defined(OS_WIN)
+ REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME |
+ #endif // defined(OS_WIN)
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ REFRESH_TYPE_FD_COUNT |
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #if BUILDFLAG(ENABLE_NACL)
+ REFRESH_TYPE_NACL |
+ #endif // BUILDFLAG(ENABLE_NACL)
+@@ -114,9 +114,9 @@ TaskGroup::TaskGroup(
+ #if BUILDFLAG(ENABLE_NACL)
+ nacl_debug_stub_port_(nacl::kGdbDebugStubPortUnknown),
+ #endif // BUILDFLAG(ENABLE_NACL)
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ open_fd_count_(-1),
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ idle_wakeups_per_second_(-1),
+ gpu_memory_has_duplicates_(false),
+ is_backgrounded_(false) {
+@@ -129,10 +129,10 @@ TaskGroup::TaskGroup(
+ weak_ptr_factory_.GetWeakPtr()),
+ base::Bind(&TaskGroup::OnIdleWakeupsRefreshDone,
+ weak_ptr_factory_.GetWeakPtr()),
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ base::Bind(&TaskGroup::OnOpenFdCountRefreshDone,
+ weak_ptr_factory_.GetWeakPtr()),
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ base::Bind(&TaskGroup::OnProcessPriorityDone,
+ weak_ptr_factory_.GetWeakPtr()));
+
+@@ -300,14 +300,14 @@ void TaskGroup::OnRefreshNaClDebugStubPortDone(int nac
+ }
+ #endif // BUILDFLAG(ENABLE_NACL)
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ void TaskGroup::OnOpenFdCountRefreshDone(int open_fd_count) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
+
+ open_fd_count_ = open_fd_count;
+ OnBackgroundRefreshTypeFinished(REFRESH_TYPE_FD_COUNT);
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ void TaskGroup::OnCpuRefreshDone(double cpu_usage) {
+ DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.h b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.h
new file mode 100644
index 000000000000..0a3d182238ce
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group.h
@@ -0,0 +1,48 @@
+--- chrome/browser/task_manager/sampling/task_group.h.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/sampling/task_group.h
+@@ -39,7 +39,7 @@ constexpr int kUnsupportedVMRefreshFlags =
+ REFRESH_TYPE_WEBCACHE_STATS | REFRESH_TYPE_NETWORK_USAGE |
+ REFRESH_TYPE_NACL | REFRESH_TYPE_IDLE_WAKEUPS | REFRESH_TYPE_HANDLES |
+ REFRESH_TYPE_START_TIME | REFRESH_TYPE_CPU_TIME | REFRESH_TYPE_PRIORITY |
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ REFRESH_TYPE_FD_COUNT |
+ #endif
+ REFRESH_TYPE_HARD_FAULTS;
+@@ -122,9 +122,9 @@ class TaskGroup {
+ int nacl_debug_stub_port() const { return nacl_debug_stub_port_; }
+ #endif // BUILDFLAG(ENABLE_NACL)
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ int open_fd_count() const { return open_fd_count_; }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ int idle_wakeups_per_second() const { return idle_wakeups_per_second_; }
+
+@@ -138,9 +138,9 @@ class TaskGroup {
+ void RefreshNaClDebugStubPort(int child_process_unique_id);
+ void OnRefreshNaClDebugStubPortDone(int port);
+ #endif
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ void OnOpenFdCountRefreshDone(int open_fd_count);
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ void OnCpuRefreshDone(double cpu_usage);
+ void OnSwappedMemRefreshDone(int64_t swapped_mem_bytes);
+@@ -209,10 +209,10 @@ class TaskGroup {
+ #if BUILDFLAG(ENABLE_NACL)
+ int nacl_debug_stub_port_;
+ #endif // BUILDFLAG(ENABLE_NACL)
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ // The number of file descriptors currently open by the process.
+ int open_fd_count_;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ int idle_wakeups_per_second_;
+ bool gpu_memory_has_duplicates_;
+ bool is_backgrounded_;
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc
new file mode 100644
index 000000000000..84d20534a83b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.cc
@@ -0,0 +1,72 @@
+--- chrome/browser/task_manager/sampling/task_group_sampler.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/sampling/task_group_sampler.cc
+@@ -43,9 +43,9 @@ TaskGroupSampler::TaskGroupSampler(
+ const OnCpuRefreshCallback& on_cpu_refresh,
+ const OnSwappedMemRefreshCallback& on_swapped_mem_refresh,
+ const OnIdleWakeupsCallback& on_idle_wakeups,
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnOpenFdCountCallback& on_open_fd_count,
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnProcessPriorityCallback& on_process_priority)
+ : process_(std::move(process)),
+ process_metrics_(CreateProcessMetrics(process_.Handle())),
+@@ -53,9 +53,9 @@ TaskGroupSampler::TaskGroupSampler(
+ on_cpu_refresh_callback_(on_cpu_refresh),
+ on_swapped_mem_refresh_callback_(on_swapped_mem_refresh),
+ on_idle_wakeups_callback_(on_idle_wakeups),
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ on_open_fd_count_callback_(on_open_fd_count),
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ on_process_priority_callback_(on_process_priority) {
+ DCHECK(blocking_pool_runner.get());
+
+@@ -86,7 +86,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags)
+ on_swapped_mem_refresh_callback_);
+ }
+
+-#if defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_IDLE_WAKEUPS,
+ refresh_flags)) {
+ base::PostTaskAndReplyWithResult(
+@@ -95,9 +95,9 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags)
+ base::Bind(&TaskGroupSampler::RefreshIdleWakeupsPerSecond, this),
+ on_idle_wakeups_callback_);
+ }
+-#endif // defined(OS_MACOSX) || defined(OS_LINUX)
++#endif // defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_FD_COUNT,
+ refresh_flags)) {
+ base::PostTaskAndReplyWithResult(
+@@ -106,7 +106,7 @@ void TaskGroupSampler::Refresh(int64_t refresh_flags)
+ base::Bind(&TaskGroupSampler::RefreshOpenFdCount, this),
+ on_open_fd_count_callback_);
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ if (TaskManagerObserver::IsResourceRefreshEnabled(REFRESH_TYPE_PRIORITY,
+ refresh_flags)) {
+@@ -149,13 +149,13 @@ int TaskGroupSampler::RefreshIdleWakeupsPerSecond() {
+ return process_metrics_->GetIdleWakeupsPerSecond();
+ }
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ int TaskGroupSampler::RefreshOpenFdCount() {
+ DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
+
+ return process_metrics_->GetOpenFdCount();
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ bool TaskGroupSampler::RefreshProcessPriority() {
+ DCHECK(worker_pool_sequenced_checker_.CalledOnValidSequence());
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h
new file mode 100644
index 000000000000..4417302d505e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__group__sampler.h
@@ -0,0 +1,50 @@
+--- chrome/browser/task_manager/sampling/task_group_sampler.h.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/sampling/task_group_sampler.h
+@@ -32,9 +32,9 @@ class TaskGroupSampler : public base::RefCountedThread
+ using OnCpuRefreshCallback = base::Callback<void(double)>;
+ using OnSwappedMemRefreshCallback = base::Callback<void(int64_t)>;
+ using OnIdleWakeupsCallback = base::Callback<void(int)>;
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ using OnOpenFdCountCallback = base::Callback<void(int)>;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ using OnProcessPriorityCallback = base::Callback<void(bool)>;
+
+ TaskGroupSampler(
+@@ -43,9 +43,9 @@ class TaskGroupSampler : public base::RefCountedThread
+ const OnCpuRefreshCallback& on_cpu_refresh,
+ const OnSwappedMemRefreshCallback& on_memory_refresh,
+ const OnIdleWakeupsCallback& on_idle_wakeups,
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnOpenFdCountCallback& on_open_fd_count,
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnProcessPriorityCallback& on_process_priority);
+
+ // Refreshes the expensive process' stats (CPU usage, memory usage, and idle
+@@ -60,9 +60,9 @@ class TaskGroupSampler : public base::RefCountedThread
+ double RefreshCpuUsage();
+ int64_t RefreshSwappedMem();
+ int RefreshIdleWakeupsPerSecond();
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ int RefreshOpenFdCount();
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ bool RefreshProcessPriority();
+
+ // The process that holds the handle that we own so that we can use it for
+@@ -84,9 +84,9 @@ class TaskGroupSampler : public base::RefCountedThread
+ const OnCpuRefreshCallback on_cpu_refresh_callback_;
+ const OnSwappedMemRefreshCallback on_swapped_mem_refresh_callback_;
+ const OnIdleWakeupsCallback on_idle_wakeups_callback_;
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnOpenFdCountCallback on_open_fd_count_callback_;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ const OnProcessPriorityCallback on_process_priority_callback_;
+
+ // To assert we're running on the correct thread.
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc
new file mode 100644
index 000000000000..7ccfadda34ea
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_sampling_task__manager__impl.cc
@@ -0,0 +1,16 @@
+--- chrome/browser/task_manager/sampling/task_manager_impl.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/sampling/task_manager_impl.cc
+@@ -219,11 +219,11 @@ void TaskManagerImpl::GetUSERHandles(TaskId task_id,
+ }
+
+ int TaskManagerImpl::GetOpenFdCount(TaskId task_id) const {
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ return GetTaskGroupByTaskId(task_id)->open_fd_count();
+ #else
+ return -1;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ }
+
+ bool TaskManagerImpl::IsTaskOnBackgroundedProcess(TaskId task_id) const {
diff --git a/devel/electron7/files/patch-chrome_browser_task__manager_task__manager__observer.h b/devel/electron7/files/patch-chrome_browser_task__manager_task__manager__observer.h
new file mode 100644
index 000000000000..bde636f87154
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_task__manager_task__manager__observer.h
@@ -0,0 +1,16 @@
+--- chrome/browser/task_manager/task_manager_observer.h.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/task_manager/task_manager_observer.h
+@@ -43,11 +43,11 @@ enum RefreshType {
+ // or backgrounded.
+ REFRESH_TYPE_PRIORITY = 1 << 13,
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ // For observers interested in getting the number of open file descriptors of
+ // processes.
+ REFRESH_TYPE_FD_COUNT = 1 << 14,
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ REFRESH_TYPE_KEEPALIVE_COUNT = 1 << 15,
+ REFRESH_TYPE_MEMORY_FOOTPRINT = 1 << 16,
diff --git a/devel/electron7/files/patch-chrome_browser_themes_theme__service__factory.cc b/devel/electron7/files/patch-chrome_browser_themes_theme__service__factory.cc
new file mode 100644
index 000000000000..019898710ed7
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_themes_theme__service__factory.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/themes/theme_service_factory.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/themes/theme_service_factory.cc
+@@ -18,7 +18,7 @@
+
+ #if defined(OS_WIN)
+ #include "chrome/browser/themes/theme_service_win.h"
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ #include "chrome/browser/themes/theme_service_aura_linux.h"
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+@@ -60,7 +60,7 @@ KeyedService* ThemeServiceFactory::BuildServiceInstanc
+ ThemeService* provider = NULL;
+ #if defined(OS_WIN)
+ provider = new ThemeServiceWin;
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ provider = new ThemeServiceAuraLinux;
+ #else
+ provider = new ThemeService;
+@@ -72,7 +72,7 @@ KeyedService* ThemeServiceFactory::BuildServiceInstanc
+
+ void ThemeServiceFactory::RegisterProfilePrefs(
+ user_prefs::PrefRegistrySyncable* registry) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ bool default_uses_system_theme = false;
+
+ const views::LinuxUI* linux_ui = views::LinuxUI::instance();
diff --git a/devel/electron7/files/patch-chrome_browser_tracing_crash__service__uploader.cc b/devel/electron7/files/patch-chrome_browser_tracing_crash__service__uploader.cc
new file mode 100644
index 000000000000..e77ff7f337a5
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_tracing_crash__service__uploader.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/tracing/crash_service_uploader.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/tracing/crash_service_uploader.cc
+@@ -161,6 +161,8 @@ void TraceCrashServiceUploader::DoCompressOnBackground
+ const char product[] = "Chrome_Linux";
+ #elif defined(OS_ANDROID)
+ const char product[] = "Chrome_Android";
++#elif defined(OS_FREEBSD)
++ const char product[] = "Chrome_FreeBSD";
+ #else
+ #error Platform not supported.
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_browser__command__controller.cc b/devel/electron7/files/patch-chrome_browser_ui_browser__command__controller.cc
new file mode 100644
index 000000000000..80c67213df41
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_browser__command__controller.cc
@@ -0,0 +1,38 @@
+--- chrome/browser/ui/browser_command_controller.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ui/browser_command_controller.cc
+@@ -81,7 +81,7 @@
+ #include "chrome/browser/ui/browser_commands_chromeos.h"
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "ui/base/ime/linux/text_edit_key_bindings_delegate_auralinux.h"
+ #endif
+
+@@ -251,7 +251,7 @@ bool BrowserCommandController::IsReservedCommandOrKey(
+ #endif
+ }
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // If this key was registered by the user as a content editing hotkey, then
+ // it is not reserved.
+ ui::TextEditKeyBindingsDelegateAuraLinux* delegate =
+@@ -467,7 +467,7 @@ bool BrowserCommandController::ExecuteCommandWithDispo
+ break;
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ case IDC_MINIMIZE_WINDOW:
+ browser_->window()->Minimize();
+ break;
+@@ -925,7 +925,7 @@ void BrowserCommandController::InitCommandState() {
+ command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_2, true);
+ command_updater_.UpdateCommandEnabled(IDC_VISIT_DESKTOP_OF_LRU_USER_3, true);
+ #endif
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ command_updater_.UpdateCommandEnabled(IDC_MINIMIZE_WINDOW, true);
+ command_updater_.UpdateCommandEnabled(IDC_MAXIMIZE_WINDOW, true);
+ command_updater_.UpdateCommandEnabled(IDC_RESTORE_WINDOW, true);
diff --git a/devel/electron7/files/patch-chrome_browser_ui_browser__view__prefs.cc b/devel/electron7/files/patch-chrome_browser_ui_browser__view__prefs.cc
new file mode 100644
index 000000000000..bceeb4330115
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_browser__view__prefs.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/browser_view_prefs.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ui/browser_view_prefs.cc
+@@ -34,7 +34,7 @@ void RegisterBrowserViewLocalPrefs(PrefRegistrySimple*
+
+ void RegisterBrowserViewProfilePrefs(
+ user_prefs::PrefRegistrySyncable* registry) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ bool custom_frame_pref_default = false;
+ #if defined(USE_X11)
+ custom_frame_pref_default = ui::GetCustomFramePrefDefault();
+@@ -45,7 +45,7 @@ void RegisterBrowserViewProfilePrefs(
+ #endif
+ registry->RegisterBooleanPref(prefs::kUseCustomChromeFrame,
+ custom_frame_pref_default);
+-#endif // OS_LINUX && !OS_CHROMEOS
++#endif // (OS_LINUX && !OS_CHROMEOS) || defined(OS_BSD)
+ }
+
+ void MigrateBrowserTabStripPrefs(PrefService* prefs) {
diff --git a/devel/electron7/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc b/devel/electron7/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
new file mode 100644
index 000000000000..bd5a484d2187
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_exclusive__access_exclusive__access__bubble.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc
+@@ -16,7 +16,7 @@
+
+ // NOTE(koz): Linux doesn't use the thick shadowed border, so we add padding
+ // here.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ const int ExclusiveAccessBubble::kPaddingPx = 8;
+ #else
+ const int ExclusiveAccessBubble::kPaddingPx = 15;
diff --git a/devel/electron7/files/patch-chrome_browser_ui_input__method_input__method__engine__base.cc b/devel/electron7/files/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
new file mode 100644
index 000000000000..696a04bbeacd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_input__method_input__method__engine__base.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/input_method/input_method_engine_base.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ui/input_method/input_method_engine_base.cc
+@@ -30,7 +30,7 @@
+ #include "ui/base/ime/chromeos/ime_keymap.h"
+ #elif defined(OS_WIN)
+ #include "ui/events/keycodes/keyboard_codes_win.h"
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/events/keycodes/keyboard_codes_posix.h"
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc b/devel/electron7/files/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
new file mode 100644
index 000000000000..82f821073e38
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_libgtkui_print__dialog__gtk.cc
@@ -0,0 +1,10 @@
+--- chrome/browser/ui/libgtkui/print_dialog_gtk.cc.orig 2019-12-12 12:39:16 UTC
++++ chrome/browser/ui/libgtkui/print_dialog_gtk.cc
+@@ -336,6 +336,7 @@ void PrintDialogGtk::ShowDialog(
+ // Since we only generate PDF, only show printers that support PDF.
+ // TODO(thestig) Add more capabilities to support?
+ GtkPrintCapabilities cap = static_cast<GtkPrintCapabilities>(
++ GTK_PRINT_CAPABILITY_GENERATE_PS |
+ GTK_PRINT_CAPABILITY_GENERATE_PDF |
+ GTK_PRINT_CAPABILITY_PAGE_SET |
+ GTK_PRINT_CAPABILITY_COPIES |
diff --git a/devel/electron7/files/patch-chrome_browser_ui_sad__tab.cc b/devel/electron7/files/patch-chrome_browser_ui_sad__tab.cc
new file mode 100644
index 000000000000..74586cbe7c8a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_sad__tab.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/sad_tab.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/sad_tab.cc
+@@ -181,7 +181,7 @@ std::vector<int> SadTab::GetSubMessages() {
+ // Only show incognito suggestion if not already in Incognito mode.
+ if (!web_contents_->GetBrowserContext()->IsOffTheRecord())
+ message_ids.insert(message_ids.begin(), IDS_SAD_TAB_RELOAD_INCOGNITO);
+-#if defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ // Note: on macOS, Linux and ChromeOS, the first bullet is either one of
+ // IDS_SAD_TAB_RELOAD_CLOSE_TABS or IDS_SAD_TAB_RELOAD_CLOSE_NOTABS
+ // followed by one of the above suggestions.
diff --git a/devel/electron7/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc b/devel/electron7/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
new file mode 100644
index 000000000000..f551b428b097
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_startup_bad__flags__prompt.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/startup/bad_flags_prompt.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/startup/bad_flags_prompt.cc
+@@ -89,7 +89,7 @@ static const char* kBadFlags[] = {
+ extensions::switches::kExtensionsOnChromeURLs,
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ // Speech dispatcher is buggy, it can crash and it can make Chrome freeze.
+ // http://crbug.com/327295
+ switches::kEnableSpeechDispatcher,
diff --git a/devel/electron7/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc b/devel/electron7/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc
new file mode 100644
index 000000000000..d4539b6438b5
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_startup_startup__browser__creator.cc
@@ -0,0 +1,31 @@
+--- chrome/browser/ui/startup/startup_browser_creator.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/startup/startup_browser_creator.cc
+@@ -85,7 +85,7 @@
+ #include "chrome/browser/ui/user_manager.h"
+ #endif
+
+-#if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
++#if defined(TOOLKIT_VIEWS) && (defined(OS_LINUX) || defined(OS_BSD))
+ #include "ui/events/devices/x11/touch_factory_x11.h" // nogncheck
+ #endif
+
+@@ -295,7 +295,7 @@ bool IsSilentLaunchEnabled(const base::CommandLine& co
+ // true, send a warning if guest mode is requested but not allowed by policy.
+ bool IsGuestModeEnforced(const base::CommandLine& command_line,
+ bool show_warning) {
+-#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_BSD)
+ PrefService* service = g_browser_process->local_state();
+ DCHECK(service);
+
+@@ -666,8 +666,10 @@ bool StartupBrowserCreator::ProcessCmdLineImpl(
+ }
+ #endif // OS_CHROMEOS
+
++#if 0 /* XXX */
+ #if defined(TOOLKIT_VIEWS) && defined(USE_X11)
+ ui::TouchFactory::SetTouchDeviceListFromCommandLine();
++#endif
+ #endif
+
+ #if defined(OS_MACOSX)
diff --git a/devel/electron7/files/patch-chrome_browser_ui_tab__helpers.cc b/devel/electron7/files/patch-chrome_browser_ui_tab__helpers.cc
new file mode 100644
index 000000000000..24c4c8357ebe
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_tab__helpers.cc
@@ -0,0 +1,25 @@
+--- chrome/browser/ui/tab_helpers.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/tab_helpers.cc
+@@ -121,7 +121,7 @@
+ #include "components/zoom/zoom_controller.h"
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/ui/blocked_content/framebust_block_tab_helper.h"
+ #include "chrome/browser/ui/hats/hats_helper.h"
+ #endif
+@@ -313,11 +313,11 @@ void TabHelpers::AttachTabHelpers(WebContents* web_con
+ #endif
+
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ metrics::DesktopSessionDurationObserver::CreateForWebContents(web_contents);
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ if (base::FeatureList::IsEnabled(
+ features::kHappinessTrackingSurveysForDesktop) ||
+ base::FeatureList::IsEnabled(
diff --git a/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__columns.cc b/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__columns.cc
new file mode 100644
index 000000000000..53824718b6c0
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__columns.cc
@@ -0,0 +1,15 @@
+--- chrome/browser/ui/task_manager/task_manager_columns.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/task_manager/task_manager_columns.cc
+@@ -93,10 +93,10 @@ const TableColumnData kColumns[] = {
+ base::size("100000") * kCharWidth, -1, true, false, false},
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ {IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN, ui::TableColumn::RIGHT, -1, 0,
+ base::size("999") * kCharWidth, -1, true, false, false},
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ {IDS_TASK_MANAGER_PROCESS_PRIORITY_COLUMN, ui::TableColumn::LEFT, -1, 0,
+ base::size("background") * kCharWidth, -1, true, true, false},
+ {IDS_TASK_MANAGER_KEEPALIVE_COUNT_COLUMN, ui::TableColumn::RIGHT, -1, 0,
diff --git a/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc b/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc
new file mode 100644
index 000000000000..3a9af86a444c
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_task__manager_task__manager__table__model.cc
@@ -0,0 +1,50 @@
+--- chrome/browser/ui/task_manager/task_manager_table_model.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/task_manager/task_manager_table_model.cc
+@@ -451,13 +451,13 @@ base::string16 TaskManagerTableModel::GetText(int row,
+ ? stringifier_->backgrounded_string()
+ : stringifier_->foregrounded_string();
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: {
+ const int fd_count = observed_task_manager()->GetOpenFdCount(tasks_[row]);
+ return fd_count >= 0 ? base::FormatNumber(fd_count)
+ : stringifier_->n_a_string();
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ case IDS_TASK_MANAGER_KEEPALIVE_COUNT_COLUMN: {
+ return stringifier_->GetKeepaliveCountText(
+@@ -617,7 +617,7 @@ int TaskManagerTableModel::CompareValues(int row1,
+ return BooleanCompare(is_proc1_bg, is_proc2_bg);
+ }
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN: {
+ const int proc1_fd_count =
+ observed_task_manager()->GetOpenFdCount(tasks_[row1]);
+@@ -625,7 +625,7 @@ int TaskManagerTableModel::CompareValues(int row1,
+ observed_task_manager()->GetOpenFdCount(tasks_[row2]);
+ return ValueCompare(proc1_fd_count, proc2_fd_count);
+ }
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ default:
+ NOTREACHED();
+@@ -791,11 +791,11 @@ void TaskManagerTableModel::UpdateRefreshTypes(int col
+ type = REFRESH_TYPE_KEEPALIVE_COUNT;
+ break;
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ case IDS_TASK_MANAGER_OPEN_FD_COUNT_COLUMN:
+ type = REFRESH_TYPE_FD_COUNT;
+ break;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+
+ default:
+ NOTREACHED();
diff --git a/devel/electron7/files/patch-chrome_browser_ui_toolbar_app__menu__model.cc b/devel/electron7/files/patch-chrome_browser_ui_toolbar_app__menu__model.cc
new file mode 100644
index 000000000000..e4992aae421a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_toolbar_app__menu__model.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/toolbar/app_menu_model.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/toolbar/app_menu_model.cc
+@@ -685,7 +685,7 @@ bool AppMenuModel::IsCommandIdVisible(int command_id)
+ return app_menu_icon_controller_->GetTypeAndSeverity().type ==
+ AppMenuIconController::IconType::UPGRADE_NOTIFICATION;
+ }
+-#if !defined(OS_LINUX) || defined(USE_AURA)
++#if (!defined(OS_LINUX) && !defined(OS_BSD)) || defined(USE_AURA)
+ case IDC_BOOKMARK_THIS_TAB:
+ return !chrome::ShouldRemoveBookmarkThisTabUI(browser_->profile());
+ case IDC_BOOKMARK_ALL_TABS:
diff --git a/devel/electron7/files/patch-chrome_browser_ui_ui__features.cc b/devel/electron7/files/patch-chrome_browser_ui_ui__features.cc
new file mode 100644
index 000000000000..e6ee4d1ba4c8
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_ui__features.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/ui_features.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/ui_features.cc
+@@ -81,7 +81,7 @@ const base::Feature kWebFooterExperiment{"WebFooterExp
+ const base::Feature kWebUITabStrip{"WebUITabStrip",
+ base::FEATURE_DISABLED_BY_DEFAULT};
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ constexpr base::Feature kEnableDbusAndX11StatusIcons{
+ "EnableDbusAndX11StatusIcons", base::FEATURE_ENABLED_BY_DEFAULT};
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_ui__features.h b/devel/electron7/files/patch-chrome_browser_ui_ui__features.h
new file mode 100644
index 000000000000..623d1ee95dc0
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_ui__features.h
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/ui_features.h.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/ui_features.h
+@@ -46,7 +46,7 @@ extern const base::Feature kWebFooterExperiment;
+
+ extern const base::Feature kWebUITabStrip;
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ extern const base::Feature kEnableDbusAndX11StatusIcons;
+ #endif
+
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_accelerator__table.cc b/devel/electron7/files/patch-chrome_browser_ui_views_accelerator__table.cc
new file mode 100644
index 000000000000..39375875559b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_accelerator__table.cc
@@ -0,0 +1,46 @@
+--- chrome/browser/ui/views/accelerator_table.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/accelerator_table.cc
+@@ -51,7 +51,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
+ {ui::VKEY_S, ui::EF_PLATFORM_ACCELERATOR, IDC_SAVE_PAGE},
+ {ui::VKEY_9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NUMPAD9, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_LAST_TAB},
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ {ui::VKEY_9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NUMPAD9, ui::EF_ALT_DOWN, IDC_SELECT_LAST_TAB},
+ {ui::VKEY_NEXT, ui::EF_CONTROL_DOWN | ui::EF_SHIFT_DOWN, IDC_MOVE_TAB_NEXT},
+@@ -81,7 +81,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
+ {ui::VKEY_NUMPAD7, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_6},
+ {ui::VKEY_8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
+ {ui::VKEY_NUMPAD8, ui::EF_PLATFORM_ACCELERATOR, IDC_SELECT_TAB_7},
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ {ui::VKEY_1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+ {ui::VKEY_NUMPAD1, ui::EF_ALT_DOWN, IDC_SELECT_TAB_0},
+ {ui::VKEY_2, ui::EF_ALT_DOWN, IDC_SELECT_TAB_1},
+@@ -99,7 +99,7 @@ const AcceleratorMapping kAcceleratorMap[] = {
+ {ui::VKEY_8, ui::EF_ALT_DOWN, IDC_SELECT_TAB_7},
+ {ui::VKEY_NUMPAD8, ui::EF_ALT_DOWN, IDC_SELECT_TAB_7},
+ {ui::VKEY_BROWSER_FAVORITES, ui::EF_NONE, IDC_SHOW_BOOKMARK_BAR},
+-#endif // OS_LINUX && !OS_CHROMEOS
++#endif // (OS_LINUX || OS_BSD) && !OS_CHROMEOS
+ {ui::VKEY_B, ui::EF_SHIFT_DOWN | ui::EF_PLATFORM_ACCELERATOR,
+ IDC_SHOW_BOOKMARK_BAR},
+ {ui::VKEY_OEM_MINUS, ui::EF_PLATFORM_ACCELERATOR, IDC_ZOOM_MINUS},
+@@ -125,14 +125,14 @@ const AcceleratorMapping kAcceleratorMap[] = {
+ IDC_SHOW_AVATAR_MENU},
+
+ // Platform-specific key maps.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ {ui::VKEY_BROWSER_BACK, ui::EF_NONE, IDC_BACK},
+ {ui::VKEY_BROWSER_FORWARD, ui::EF_NONE, IDC_FORWARD},
+ {ui::VKEY_BROWSER_HOME, ui::EF_NONE, IDC_HOME},
+ {ui::VKEY_BROWSER_REFRESH, ui::EF_NONE, IDC_RELOAD},
+ {ui::VKEY_BROWSER_REFRESH, ui::EF_CONTROL_DOWN, IDC_RELOAD_BYPASSING_CACHE},
+ {ui::VKEY_BROWSER_REFRESH, ui::EF_SHIFT_DOWN, IDC_RELOAD_BYPASSING_CACHE},
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ // On Chrome OS, VKEY_BROWSER_SEARCH is handled in Ash.
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc b/devel/electron7/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc
new file mode 100644
index 000000000000..4db4e1857b8b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_chrome__browser__main__extra__parts__views.cc
@@ -0,0 +1,38 @@
+--- chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/chrome_browser_main_extra_parts_views.cc
+@@ -36,7 +36,7 @@
+ #include "ui/wm/core/wm_state.h"
+ #endif // defined(USE_AURA)
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <unistd.h>
+@@ -46,7 +46,7 @@
+ #include "chrome/grit/generated_resources.h"
+ #include "content/public/common/content_switches.h"
+ #include "ui/base/l10n/l10n_util.h"
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+
+ // This connector is used in ui_devtools's TracingAgent to hook up with the
+ // tracing service.
+@@ -109,7 +109,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit(
+ devtools_server_->tracing_agent());
+ }
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ // On the Linux desktop, we want to prevent the user from logging in as root,
+ // so that we don't destroy the profile. Now that we have some minimal ui
+ // initialized, check to see if we're running as root and bail if we are.
+@@ -140,7 +140,7 @@ void ChromeBrowserMainExtraPartsViews::PreProfileInit(
+ base::RunLoop().RunUntilIdle();
+
+ exit(EXIT_FAILURE);
+-#endif // defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#endif // (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ }
+
+ void ChromeBrowserMainExtraPartsViews::PostBrowserStart() {
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_chrome__views__delegate.h b/devel/electron7/files/patch-chrome_browser_ui_views_chrome__views__delegate.h
new file mode 100644
index 000000000000..24026f54982a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_chrome__views__delegate.h
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/chrome_views_delegate.h.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/chrome_views_delegate.h
+@@ -44,7 +44,7 @@ class ChromeViewsDelegate : public views::ViewsDelegat
+ HICON GetSmallWindowIcon() const override;
+ int GetAppbarAutohideEdges(HMONITOR monitor,
+ base::OnceClosure callback) override;
+-#elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#elif (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ gfx::ImageSkia* GetDefaultWindowIcon() const override;
+ bool WindowManagerProvidesTitleBar(bool maximized) override;
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_first__run__dialog.cc b/devel/electron7/files/patch-chrome_browser_ui_views_first__run__dialog.cc
new file mode 100644
index 000000000000..01566bbe0936
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_first__run__dialog.cc
@@ -0,0 +1,24 @@
+--- chrome/browser/ui/views/first_run_dialog.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/first_run_dialog.cc
+@@ -37,8 +37,10 @@
+ namespace {
+
+ void InitCrashReporterIfEnabled(bool enabled) {
++#if !defined(OS_BSD)
+ if (enabled)
+ breakpad::InitCrashReporter(std::string());
++#endif
+ }
+
+ } // namespace
+@@ -108,8 +110,10 @@ std::unique_ptr<views::View> FirstRunDialog::CreateExt
+ bool FirstRunDialog::Accept() {
+ GetWidget()->Hide();
+
++#if !defined(OS_BSD)
+ ChangeMetricsReportingStateWithReply(report_crashes_->GetChecked(),
+ base::Bind(&InitCrashReporterIfEnabled));
++#endif
+
+ if (make_default_->GetChecked())
+ shell_integration::SetAsDefaultBrowser();
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__frame.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__frame.cc
new file mode 100644
index 000000000000..1c46fc482d3b
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__frame.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/frame/browser_frame.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/browser_frame.cc
+@@ -46,7 +46,7 @@
+ namespace {
+
+ bool IsUsingGtkTheme(Profile* profile) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ return ThemeServiceFactory::GetForProfile(profile)->UsingSystemTheme();
+ #else
+ return false;
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc
new file mode 100644
index 000000000000..4c5dc67b00d2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__non__client__frame__view__factory__views.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/browser_non_client_frame_view_factory_views.cc
+@@ -13,7 +13,7 @@
+ #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
+ #endif
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ #include "ui/views/linux_ui/linux_ui.h"
+ #endif
+
+@@ -32,7 +32,7 @@ OpaqueBrowserFrameView* CreateOpaqueBrowserFrameView(
+ BrowserView* browser_view) {
+ #if BUILDFLAG(ENABLE_NATIVE_WINDOW_NAV_BUTTONS)
+ std::unique_ptr<views::NavButtonProvider> nav_button_provider;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ if (ThemeServiceFactory::GetForProfile(browser_view->browser()->profile())
+ ->UsingSystemTheme() &&
+ views::LinuxUI::instance()) {
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__view.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__view.cc
new file mode 100644
index 000000000000..9614c93134ff
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_browser__view.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/frame/browser_view.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/browser_view.cc
+@@ -1581,7 +1581,7 @@ void BrowserView::UserChangedTheme(BrowserThemeChangeT
+ const bool should_use_native_frame = frame_->ShouldUseNativeFrame();
+
+ bool must_regenerate_frame;
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // GTK and user theme changes can both change frame buttons, so the frame
+ // always needs to be regenerated on Linux.
+ must_regenerate_frame = true;
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
new file mode 100644
index 000000000000..3740da714edf
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+@@ -47,7 +47,7 @@
+ #include "ui/views/window/vector_icons/vector_icons.h"
+ #include "ui/views/window/window_shape.h"
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ #include "ui/views/controls/menu/menu_runner.h"
+ #endif
+
+@@ -352,7 +352,7 @@ void OpaqueBrowserFrameView::ButtonPressed(views::Butt
+ void OpaqueBrowserFrameView::OnMenuButtonClicked(views::Button* source,
+ const gfx::Point& point,
+ const ui::Event* event) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ views::MenuRunner menu_runner(frame()->GetSystemMenuModel(),
+ views::MenuRunner::HAS_MNEMONICS);
+ menu_runner.RunMenuAt(
+@@ -478,7 +478,7 @@ bool OpaqueBrowserFrameView::EverHasVisibleBackgroundT
+
+ OpaqueBrowserFrameView::FrameButtonStyle
+ OpaqueBrowserFrameView::GetFrameButtonStyle() const {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ return FrameButtonStyle::kMdButton;
+ #else
+ return FrameButtonStyle::kImageButton;
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
new file mode 100644
index 000000000000..17cf83c8020a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_opaque__browser__frame__view__platform__specific.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/opaque_browser_frame_view_platform_specific.cc
+@@ -6,7 +6,7 @@
+
+ #include "build/build_config.h"
+
+-#if !defined(OS_LINUX)
++#if !defined(OS_LINUX) && !defined(OS_FREEBSD)
+
+ // static
+ std::unique_ptr<OpaqueBrowserFrameViewPlatformSpecific>
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
new file mode 100644
index 000000000000..fbf8ea2f0ede
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__builder.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/ui/views/frame/system_menu_model_builder.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/system_menu_model_builder.cc
+@@ -80,7 +80,7 @@ void SystemMenuModelBuilder::BuildMenu(ui::SimpleMenuM
+
+ void SystemMenuModelBuilder::BuildSystemMenuForBrowserWindow(
+ ui::SimpleMenuModel* model) {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ model->AddItemWithStringId(IDC_MINIMIZE_WINDOW, IDS_MINIMIZE_WINDOW_MENU);
+ model->AddItemWithStringId(IDC_MAXIMIZE_WINDOW, IDS_MAXIMIZE_WINDOW_MENU);
+ model->AddItemWithStringId(IDC_RESTORE_WINDOW, IDS_RESTORE_WINDOW_MENU);
+@@ -93,7 +93,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForBrowser
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+ }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddCheckItemWithStringId(IDC_USE_SYSTEM_TITLE_BAR,
+ IDS_SHOW_WINDOW_DECORATIONS_MENU);
+@@ -131,7 +131,7 @@ void SystemMenuModelBuilder::BuildSystemMenuForAppOrPo
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddItemWithStringId(IDC_TASK_MANAGER, IDS_TASK_MANAGER);
+ }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ model->AddSeparator(ui::NORMAL_SEPARATOR);
+ model->AddItemWithStringId(IDC_CLOSE_WINDOW, IDS_CLOSE);
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc b/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
new file mode 100644
index 000000000000..a5520c3b0fe1
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_frame_system__menu__model__delegate.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/ui/views/frame/system_menu_model_delegate.cc.orig 2019-12-12 12:39:17 UTC
++++ chrome/browser/ui/views/frame/system_menu_model_delegate.cc
+@@ -15,7 +15,7 @@
+ #include "components/sessions/core/tab_restore_service.h"
+ #include "ui/base/l10n/l10n_util.h"
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ #include "chrome/common/pref_names.h"
+ #include "components/prefs/pref_service.h"
+ #endif
+@@ -30,7 +30,7 @@ SystemMenuModelDelegate::SystemMenuModelDelegate(
+ SystemMenuModelDelegate::~SystemMenuModelDelegate() {}
+
+ bool SystemMenuModelDelegate::IsCommandIdChecked(int command_id) const {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ if (command_id == IDC_USE_SYSTEM_TITLE_BAR) {
+ PrefService* prefs = browser_->profile()->GetPrefs();
+ return !prefs->GetBoolean(prefs::kUseCustomChromeFrame);
+@@ -44,7 +44,7 @@ bool SystemMenuModelDelegate::IsCommandIdEnabled(int c
+ }
+
+ bool SystemMenuModelDelegate::IsCommandIdVisible(int command_id) const {
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ bool is_maximized = browser_->window()->IsMaximized();
+ switch (command_id) {
+ case IDC_MAXIMIZE_WINDOW:
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_hung__renderer__view.cc b/devel/electron7/files/patch-chrome_browser_ui_views_hung__renderer__view.cc
new file mode 100644
index 000000000000..d3dc57392619
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_hung__renderer__view.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/hung_renderer_view.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/views/hung_renderer_view.cc
+@@ -390,7 +390,7 @@ bool HungRendererDialogView::Cancel() {
+ content::RenderProcessHost* rph =
+ hung_pages_table_model_->GetRenderWidgetHost()->GetProcess();
+ if (rph) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // A generic |CrashDumpHungChildProcess()| is not implemented for Linux.
+ // Instead we send an explicit IPC to crash on the renderer's IO thread.
+ rph->ForceCrash();
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_tabs_new__tab__button.cc b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_new__tab__button.cc
new file mode 100644
index 000000000000..7e89698d22f0
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_new__tab__button.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/views/tabs/new_tab_button.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/views/tabs/new_tab_button.cc
+@@ -69,7 +69,7 @@ const gfx::Size NewTabButton::kButtonSize{28, 28};
+ NewTabButton::NewTabButton(TabStrip* tab_strip, views::ButtonListener* listener)
+ : views::ImageButton(listener), tab_strip_(tab_strip) {
+ set_animate_on_state_change(true);
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(OS_CHROMEOS)
+ set_triggerable_event_flags(triggerable_event_flags() |
+ ui::EF_MIDDLE_MOUSE_BUTTON);
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab.cc b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab.cc
new file mode 100644
index 000000000000..ed744a5a634a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/views/tabs/tab.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/views/tabs/tab.cc
+@@ -512,7 +512,7 @@ void Tab::OnMouseCaptureLost() {
+ void Tab::OnMouseMoved(const ui::MouseEvent& event) {
+ tab_style_->SetHoverLocation(event.location());
+ controller_->OnMouseEventInTab(this, event);
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ MaybeUpdateHoverStatus(event);
+ #endif
+ }
+@@ -522,7 +522,7 @@ void Tab::OnMouseEntered(const ui::MouseEvent& event)
+ }
+
+ void Tab::MaybeUpdateHoverStatus(const ui::MouseEvent& event) {
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // Move the hit test area for hovering up so that it is not overlapped by tab
+ // hover cards when they are shown.
+ // TODO(crbug/978134): Once Linux/CrOS widget transparency is solved, remove
diff --git a/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
new file mode 100644
index 000000000000..7f4d37eedbed
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_views_tabs_tab__drag__controller.cc
@@ -0,0 +1,29 @@
+--- chrome/browser/ui/views/tabs/tab_drag_controller.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/views/tabs/tab_drag_controller.cc
+@@ -443,7 +443,7 @@ void TabDragController::Init(TabDragContext* source_co
+ // synchronous on desktop Linux, so use that.
+ // - Chrome OS
+ // Releasing capture on Ash cancels gestures so avoid it.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ can_release_capture_ = false;
+ #endif
+ start_point_in_screen_ = gfx::Point(source_tab_offset, mouse_offset.y());
+@@ -865,7 +865,7 @@ TabDragController::DragBrowserToNewTabStrip(TabDragCon
+ else
+ SetCapture(target_context);
+
+-#if !defined(OS_LINUX) || defined(OS_CHROMEOS)
++#if (!defined(OS_LINUX) || defined(OS_CHROMEOS)) && !defined(OS_BSD)
+ // EndMoveLoop is going to snap the window back to its original location.
+ // Hide it so users don't see this. Hiding a window in Linux aura causes
+ // it to lose capture so skip it.
+@@ -2003,7 +2003,7 @@ TabDragController::Liveness TabDragController::GetLoca
+ if (dragged_window)
+ exclude.insert(dragged_window);
+ }
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ // Exclude windows which are pending deletion via Browser::TabStripEmpty().
+ // These windows can be returned in the Linux Aura port because the browser
+ // window which was used for dragging is not hidden once all of its tabs are
diff --git a/devel/electron7/files/patch-chrome_browser_ui_webui_about__ui.cc b/devel/electron7/files/patch-chrome_browser_ui_webui_about__ui.cc
new file mode 100644
index 000000000000..21ecec66ae91
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_webui_about__ui.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/webui/about_ui.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/webui/about_ui.cc
+@@ -562,7 +562,7 @@ std::string ChromeURLs() {
+ return html;
+ }
+
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ std::string AboutLinuxProxyConfig() {
+ std::string data;
+ AppendHeader(&data, 0,
+@@ -617,7 +617,7 @@ void AboutUIHTMLSource::StartDataRequest(
+ .GetRawDataResource(idr)
+ .as_string();
+ }
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ } else if (source_name_ == chrome::kChromeUILinuxProxyConfigHost) {
+ response = AboutLinuxProxyConfig();
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc b/devel/electron7/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
new file mode 100644
index 000000000000..f852885b3037
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_webui_chrome__web__ui__controller__factory.cc
@@ -0,0 +1,55 @@
+--- chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/webui/chrome_web_ui_controller_factory.cc
+@@ -212,11 +212,11 @@
+ #include "chrome/browser/ui/webui/conflicts/conflicts_ui.h"
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ #include "chrome/browser/ui/webui/discards/discards_ui.h"
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ #include "chrome/browser/ui/webui/sandbox_internals_ui.h"
+ #endif
+
+@@ -338,7 +338,7 @@ bool IsAboutUI(const GURL& url) {
+ #if !defined(OS_ANDROID)
+ || url.host_piece() == chrome::kChromeUITermsHost
+ #endif
+-#if defined(OS_LINUX) || defined(OS_OPENBSD)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ || url.host_piece() == chrome::kChromeUILinuxProxyConfigHost
+ #endif
+ #if defined(OS_CHROMEOS)
+@@ -654,7 +654,7 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we
+ if (url.host_piece() == chrome::kChromeUINaClHost)
+ return &NewWebUI<NaClUI>;
+ #endif
+-#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA)
++#if (defined(OS_LINUX) && defined(TOOLKIT_VIEWS)) || defined(USE_AURA) || defined(OS_BSD)
+ if (url.host_piece() == chrome::kChromeUITabModalConfirmDialogHost)
+ return &NewWebUI<ConstrainedWebDialogUI>;
+ #endif
+@@ -702,17 +702,17 @@ WebUIFactoryFunction GetWebUIFactoryFunction(WebUI* we
+ return &NewWebUI<CastUI>;
+ }
+ #endif
+-#if defined(OS_LINUX) || defined(OS_ANDROID)
++#if defined(OS_LINUX) || defined(OS_ANDROID) || defined(OS_BSD)
+ if (url.host_piece() == chrome::kChromeUISandboxHost) {
+ return &NewWebUI<SandboxInternalsUI>;
+ }
+ #endif
+-#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_BSD)
+ if (url.host_piece() == chrome::kChromeUIDiscardsHost)
+ return &NewWebUI<DiscardsUI>;
+ #endif
+ #if defined(OS_WIN) || defined(OS_MACOSX) || \
+- (defined(OS_LINUX) && !defined(OS_CHROMEOS))
++ (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ if (url.host_piece() == chrome::kChromeUIBrowserSwitchHost)
+ return &NewWebUI<BrowserSwitchUI>;
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc
new file mode 100644
index 000000000000..0920412ba908
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/webui/settings/appearance_handler.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/webui/settings/appearance_handler.cc
+@@ -27,7 +27,7 @@ void AppearanceHandler::RegisterMessages() {
+ "useDefaultTheme",
+ base::BindRepeating(&AppearanceHandler::HandleUseDefaultTheme,
+ base::Unretained(this)));
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)
+ web_ui()->RegisterMessageCallback(
+ "useSystemTheme",
+ base::BindRepeating(&AppearanceHandler::HandleUseSystemTheme,
+@@ -39,7 +39,7 @@ void AppearanceHandler::HandleUseDefaultTheme(const ba
+ ThemeServiceFactory::GetForProfile(profile_)->UseDefaultTheme();
+ }
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if defined(OS_LINUX) || defined(OS_BSD) && !defined(OS_CHROMEOS)
+ void AppearanceHandler::HandleUseSystemTheme(const base::ListValue* args) {
+ if (profile_->IsSupervised())
+ NOTREACHED();
diff --git a/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h
new file mode 100644
index 000000000000..ebcf890b16dd
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_appearance__handler.h
@@ -0,0 +1,11 @@
+--- chrome/browser/ui/webui/settings/appearance_handler.h.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/webui/settings/appearance_handler.h
+@@ -36,7 +36,7 @@ class AppearanceHandler : public SettingsPageUIHandler
+ // Changes the UI theme of the browser to the default theme.
+ void HandleUseDefaultTheme(const base::ListValue* args);
+
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_BSD) || defined(OS_LINUX)) && !defined(OS_CHROMEOS)
+ // Changes the UI theme of the browser to the system (GTK+) theme.
+ void HandleUseSystemTheme(const base::ListValue* args);
+ #endif
diff --git a/devel/electron7/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
new file mode 100644
index 000000000000..641d3f836a1d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_ui_webui_settings_settings__localized__strings__provider.cc
@@ -0,0 +1,20 @@
+--- chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc.orig 2019-12-12 12:39:18 UTC
++++ chrome/browser/ui/webui/settings/settings_localized_strings_provider.cc
+@@ -702,7 +702,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht
+ {"enterCustomWebAddress", IDS_SETTINGS_ENTER_CUSTOM_WEB_ADDRESS},
+ {"homeButtonDisabled", IDS_SETTINGS_HOME_BUTTON_DISABLED},
+ {"themes", IDS_SETTINGS_THEMES},
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ {"systemTheme", IDS_SETTINGS_SYSTEM_THEME},
+ {"useSystemTheme", IDS_SETTINGS_USE_SYSTEM_THEME},
+ {"classicTheme", IDS_SETTINGS_CLASSIC_THEME},
+@@ -722,7 +722,7 @@ void AddAppearanceStrings(content::WebUIDataSource* ht
+ {"openWallpaperApp", IDS_OS_SETTINGS_OPEN_WALLPAPER_APP},
+ {"setWallpaper", IDS_OS_SETTINGS_SET_WALLPAPER},
+ #endif
+-#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_BSD)
+ {"showWindowDecorations", IDS_SHOW_WINDOW_DECORATIONS},
+ #endif
+ #if defined(OS_MACOSX)
diff --git a/devel/electron7/files/patch-chrome_browser_web__applications_extensions_bookmark__app__finalizer__utils.cc b/devel/electron7/files/patch-chrome_browser_web__applications_extensions_bookmark__app__finalizer__utils.cc
new file mode 100644
index 000000000000..a087bd74dae7
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_web__applications_extensions_bookmark__app__finalizer__utils.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/web_applications/extensions/bookmark_app_finalizer_utils.cc.orig 2019-12-12 12:39:19 UTC
++++ chrome/browser/web_applications/extensions/bookmark_app_finalizer_utils.cc
+@@ -15,7 +15,7 @@ namespace {
+
+ #if !defined(OS_CHROMEOS)
+ bool CanOsAddDesktopShortcuts() {
+-#if defined(OS_LINUX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_WIN) || defined(OS_BSD)
+ return true;
+ #else
+ return false;
diff --git a/devel/electron7/files/patch-chrome_browser_web__applications_extensions_web__app__extension__shortcut.cc b/devel/electron7/files/patch-chrome_browser_web__applications_extensions_web__app__extension__shortcut.cc
new file mode 100644
index 000000000000..3dd378aee8d2
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_browser_web__applications_extensions_web__app__extension__shortcut.cc
@@ -0,0 +1,11 @@
+--- chrome/browser/web_applications/extensions/web_app_extension_shortcut.cc.orig 2019-12-12 12:39:19 UTC
++++ chrome/browser/web_applications/extensions/web_app_extension_shortcut.cc
+@@ -50,7 +50,7 @@ namespace {
+ #if defined(OS_MACOSX)
+ const int kDesiredSizes[] = {16, 32, 128, 256, 512};
+ const size_t kNumDesiredSizes = base::size(kDesiredSizes);
+-#elif defined(OS_LINUX)
++#elif defined(OS_LINUX) || defined(OS_BSD)
+ // Linux supports icons of any size. FreeDesktop Icon Theme Specification states
+ // that "Minimally you should install a 48x48 icon in the hicolor theme."
+ const int kDesiredSizes[] = {16, 32, 48, 128, 256, 512};
diff --git a/devel/electron7/files/patch-chrome_common_BUILD.gn b/devel/electron7/files/patch-chrome_common_BUILD.gn
new file mode 100644
index 000000000000..5fc446c5e2d9
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_BUILD.gn
@@ -0,0 +1,13 @@
+--- chrome/common/BUILD.gn.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/BUILD.gn
+@@ -293,6 +293,10 @@ static_library("common") {
+ public_deps += [ "//ppapi/shared_impl" ]
+ }
+
++ if (is_bsd) {
++ sources -= [ "component_flash_hint_file_linux.cc" ]
++ }
++
+ if (enable_extensions) {
+ sources += [
+ "cast_messages.cc",
diff --git a/devel/electron7/files/patch-chrome_common_chrome__features.cc b/devel/electron7/files/patch-chrome_common_chrome__features.cc
new file mode 100644
index 000000000000..59255cea0d18
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__features.cc
@@ -0,0 +1,27 @@
+--- chrome/common/chrome_features.cc.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_features.cc
+@@ -84,13 +84,13 @@ const base::Feature kAutoFetchOnNetErrorPage{"AutoFetc
+ base::FEATURE_DISABLED_BY_DEFAULT};
+ #endif // defined(OS_ANDROID)
+
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ // Enables the Restart background mode optimization. When all Chrome UI is
+ // closed and it goes in the background, allows to restart the browser to
+ // discard memory.
+ const base::Feature kBackgroundModeAllowRestart{
+ "BackgroundModeAllowRestart", base::FEATURE_DISABLED_BY_DEFAULT};
+-#endif // defined(OS_WIN) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+
+ // Enables or disables whether permission prompts are automatically blocked
+ // after the user has explicitly dismissed them too many times.
+@@ -140,7 +140,7 @@ const base::Feature kThirdPartyModulesBlocking{
+ "ThirdPartyModulesBlocking", base::FEATURE_DISABLED_BY_DEFAULT};
+ #endif
+
+-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
+ // Enables the dual certificate verification trial feature.
+ // https://crbug.com/649026
+ const base::Feature kCertDualVerificationTrialFeature{
diff --git a/devel/electron7/files/patch-chrome_common_chrome__features.h b/devel/electron7/files/patch-chrome_common_chrome__features.h
new file mode 100644
index 000000000000..fd3c06fc0c7a
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__features.h
@@ -0,0 +1,24 @@
+--- chrome/common/chrome_features.h.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_features.h
+@@ -64,10 +64,10 @@ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::Feature kAutoFetchOnNetErrorPage;
+ #endif
+
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::Feature kBackgroundModeAllowRestart;
+-#endif // defined(OS_WIN) || defined(OS_LINUX)
++#endif // defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::Feature kBlockPromptsIfDismissedOften;
+@@ -86,7 +86,7 @@ extern const base::Feature kBundledConnectionHelpFeatu
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::Feature kCaptionSettings;
+
+-#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX)
++#if (defined(OS_LINUX) && !defined(OS_CHROMEOS)) || defined(OS_MACOSX) || defined(OS_BSD)
+ COMPONENT_EXPORT(CHROME_FEATURES)
+ extern const base::Feature kCertDualVerificationTrialFeature;
+ #endif
diff --git a/devel/electron7/files/patch-chrome_common_chrome__paths.cc b/devel/electron7/files/patch-chrome_common_chrome__paths.cc
new file mode 100644
index 000000000000..facf6eeb024d
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__paths.cc
@@ -0,0 +1,101 @@
+--- chrome/common/chrome_paths.cc.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_paths.cc
+@@ -52,21 +52,21 @@ const base::FilePath::CharType kPepperFlashSystemBaseD
+ FILE_PATH_LITERAL("Internet Plug-Ins/PepperFlashPlayer");
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ // The path to the external extension <id>.json files.
+ // /usr/share seems like a good choice, see: http://www.pathname.com/fhs/
+ const base::FilePath::CharType kFilepathSinglePrefExtensions[] =
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+- FILE_PATH_LITERAL("/usr/share/google-chrome/extensions");
++ FILE_PATH_LITERAL("/usr/local/share/google-chrome/extensions");
+ #else
+- FILE_PATH_LITERAL("/usr/share/chromium/extensions");
++ FILE_PATH_LITERAL("/usr/local/share/chromium/extensions");
+ #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
+
+ // The path to the hint file that tells the pepper plugin loader
+ // where it can find the latest component updated flash.
+ const base::FilePath::CharType kComponentUpdatedFlashHint[] =
+ FILE_PATH_LITERAL("latest-component-updated-flash");
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+
+ #if defined(OS_CHROMEOS)
+ const base::FilePath::CharType kChromeOSComponentFlash[] = FILE_PATH_LITERAL(
+@@ -197,7 +197,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ return false;
+ break;
+ case chrome::DIR_DEFAULT_DOWNLOADS_SAFE:
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ if (!GetUserDownloadsDirectorySafe(&cur))
+ return false;
+ break;
+@@ -489,7 +489,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ }
+ #endif
+ #if defined(OS_CHROMEOS) || \
+- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX)
++ ((defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX)
+ case chrome::DIR_USER_EXTERNAL_EXTENSIONS: {
+ if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur))
+ return false;
+@@ -497,7 +497,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ break;
+ }
+ #endif
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ case chrome::DIR_STANDALONE_EXTERNAL_EXTENSIONS: {
+ cur = base::FilePath(kFilepathSinglePrefExtensions);
+ break;
+@@ -532,7 +532,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ #endif
+ break;
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ case chrome::DIR_NATIVE_MESSAGING:
+ #if defined(OS_MACOSX)
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+@@ -546,6 +546,9 @@ bool PathProvider(int key, base::FilePath* result) {
+ #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
+ cur = base::FilePath(FILE_PATH_LITERAL(
+ "/etc/opt/chrome/native-messaging-hosts"));
++#elif defined(OS_BSD)
++ cur = base::FilePath(FILE_PATH_LITERAL(
++ "/usr/local/etc/chrome/native-messaging-hosts"));
+ #else
+ cur = base::FilePath(FILE_PATH_LITERAL(
+ "/etc/chromium/native-messaging-hosts"));
+@@ -558,7 +561,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ return false;
+ cur = cur.Append(FILE_PATH_LITERAL("NativeMessagingHosts"));
+ break;
+-#endif // defined(OS_LINUX) || defined(OS_MACOSX)
++#endif // defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ #if !defined(OS_ANDROID)
+ case chrome::DIR_GLOBAL_GCM_STORE:
+ if (!base::PathService::Get(chrome::DIR_USER_DATA, &cur))
+@@ -566,7 +569,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ cur = cur.Append(kGCMStoreDirname);
+ break;
+ #endif // !defined(OS_ANDROID)
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ case chrome::FILE_COMPONENT_FLASH_HINT:
+ if (!base::PathService::Get(
+ chrome::DIR_COMPONENT_UPDATED_PEPPER_FLASH_PLUGIN, &cur)) {
+@@ -574,7 +577,7 @@ bool PathProvider(int key, base::FilePath* result) {
+ }
+ cur = cur.Append(kComponentUpdatedFlashHint);
+ break;
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ #if defined(OS_CHROMEOS)
+ case chrome::FILE_CHROME_OS_COMPONENT_FLASH:
+ cur = base::FilePath(kChromeOSComponentFlash);
diff --git a/devel/electron7/files/patch-chrome_common_chrome__paths.h b/devel/electron7/files/patch-chrome_common_chrome__paths.h
new file mode 100644
index 000000000000..34ee5803883f
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__paths.h
@@ -0,0 +1,42 @@
+--- chrome/common/chrome_paths.h.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_paths.h
+@@ -53,7 +53,7 @@ enum {
+ // contains subdirectories.
+ #endif
+ #if defined(OS_CHROMEOS) || \
+- (defined(OS_LINUX) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX)
++ ((defined(OS_LINUX) || defined(OS_BSD)) && BUILDFLAG(CHROMIUM_BRANDING)) || defined(OS_MACOSX)
+ DIR_USER_EXTERNAL_EXTENSIONS, // Directory for per-user external extensions
+ // on Chrome Mac and Chromium Linux.
+ // On Chrome OS, this path is used for OEM
+@@ -61,7 +61,7 @@ enum {
+ // create it.
+ #endif
+
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ DIR_STANDALONE_EXTERNAL_EXTENSIONS, // Directory for 'per-extension'
+ // definition manifest files that
+ // describe extensions which are to be
+@@ -119,7 +119,7 @@ enum {
+ DIR_SUPERVISED_USER_INSTALLED_WHITELISTS, // Directory where sanitized
+ // supervised user whitelists are
+ // installed.
+-#if defined(OS_LINUX) || defined(OS_MACOSX)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_BSD)
+ DIR_NATIVE_MESSAGING, // System directory where native messaging host
+ // manifest files are stored.
+ DIR_USER_NATIVE_MESSAGING, // Directory with Native Messaging Hosts
+@@ -134,10 +134,10 @@ enum {
+ DIR_GEN_TEST_DATA, // Directory where generated test data resides.
+ DIR_TEST_DATA, // Directory where unit test data resides.
+ DIR_TEST_TOOLS, // Directory where unit test tools reside.
+-#if defined(OS_LINUX)
++#if defined(OS_LINUX) || defined(OS_BSD)
+ FILE_COMPONENT_FLASH_HINT, // A file in a known location that points to
+ // the component updated flash plugin.
+-#endif // defined(OS_LINUX)
++#endif // defined(OS_LINUX) || defined(OS_BSD)
+ #if defined(OS_CHROMEOS)
+ FILE_CHROME_OS_COMPONENT_FLASH, // The location of component updated Flash on
+ // Chrome OS.
diff --git a/devel/electron7/files/patch-chrome_common_chrome__paths__internal.h b/devel/electron7/files/patch-chrome_common_chrome__paths__internal.h
new file mode 100644
index 000000000000..747b86c64712
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__paths__internal.h
@@ -0,0 +1,11 @@
+--- chrome/common/chrome_paths_internal.h.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_paths_internal.h
+@@ -45,7 +45,7 @@ void GetUserCacheDirectory(const base::FilePath& profi
+ // Get the path to the user's documents directory.
+ bool GetUserDocumentsDirectory(base::FilePath* result);
+
+-#if defined(OS_WIN) || defined(OS_LINUX)
++#if defined(OS_WIN) || defined(OS_LINUX) || defined(OS_BSD)
+ // Gets the path to a safe default download directory for a user.
+ bool GetUserDownloadsDirectorySafe(base::FilePath* result);
+ #endif
diff --git a/devel/electron7/files/patch-chrome_common_chrome__switches.cc b/devel/electron7/files/patch-chrome_common_chrome__switches.cc
new file mode 100644
index 000000000000..c47b5a300596
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__switches.cc
@@ -0,0 +1,11 @@
+--- chrome/common/chrome_switches.cc.orig 2019-12-12 12:39:19 UTC
++++ chrome/common/chrome_switches.cc
+@@ -853,7 +853,7 @@ const char kAllowNaClFileHandleAPI[] = "allow-n
+ const char kAllowNaClSocketAPI[] = "allow-nacl-socket-api";
+ #endif
+
+-#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN)
++#if defined(OS_LINUX) || defined(OS_MACOSX) || defined(OS_WIN) || defined(OS_BSD)
+ const char kEnableNewAppMenuIcon[] = "enable-new-app-menu-icon";
+
+ // Causes the browser to launch directly in guest mode.
diff --git a/devel/electron7/files/patch-chrome_common_chrome__switches.h b/devel/electron7/files/patch-chrome_common_chrome__switches.h
new file mode 100644
index 000000000000..3ebc75416e1e
--- /dev/null
+++ b/devel/electron7/files/patch-chrome_common_chrome__switches.h
@@ -0,0 +1,11 @@
+--- chrome/common/chrome_switches.h.orig