├── .circleci ├── config.yml └── fix-known-hosts.sh ├── .clang-format ├── .dockerignore ├── .env.example ├── .eslintrc.json ├── .gitattributes ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── Bug_report.md │ ├── Feature_request.md │ ├── mac_app_store_private_api_rejection.md │ └── security_report.md ├── PULL_REQUEST_TEMPLATE.md └── config.yml ├── .gitignore ├── .gitmodules ├── .remarkrc ├── BUILD.gn ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── DEPS ├── Dockerfile ├── Dockerfile.arm32v7 ├── Dockerfile.arm64v8 ├── ELECTRON_VERSION ├── LICENSE ├── README.md ├── SECURITY.md ├── appveyor.yml ├── azure-pipelines-woa.yml ├── build ├── args │ ├── all.gn │ ├── debug.gn │ ├── ffmpeg.gn │ ├── native_tests.gn │ ├── release.gn │ └── testing.gn ├── asar.gni ├── config │ └── BUILD.gn ├── dump_syms.py ├── electron.def ├── extract_symbols.gni ├── generate-template.py ├── install-build-deps.sh ├── mac │ └── make_locale_dirs.py ├── node.gni ├── npm-run.py ├── npm.gni ├── run-in-dir.py ├── run-node.py ├── templated_file.gni ├── templates │ └── electron_version.tmpl ├── tsc.gni ├── webpack │ ├── get-outputs.js │ ├── run-compiler.js │ ├── webpack.config.base.js │ ├── webpack.config.browser.js │ ├── webpack.config.content_script.js │ ├── webpack.config.isolated_renderer.js │ ├── webpack.config.renderer.js │ ├── webpack.config.sandboxed_renderer.js │ ├── webpack.config.worker.js │ └── webpack.gni └── zip.py ├── buildflags ├── BUILD.gn └── buildflags.gni ├── chromium_src ├── BUILD.gn ├── LICENSE.chromium └── chrome │ └── browser │ ├── certificate_manager_model.cc │ ├── certificate_manager_model.h │ ├── process_singleton.h │ ├── process_singleton_posix.cc │ ├── process_singleton_win.cc │ └── ui │ └── views │ └── frame │ ├── global_menu_bar_registrar_x11.cc │ └── global_menu_bar_registrar_x11.h ├── components └── pepper_flash │ └── BUILD.gn ├── default_app ├── default_app.ts ├── icon.png ├── index.html ├── index.ts ├── main.ts ├── package.json ├── preload.ts └── styles.css ├── docs-translations └── README.md ├── docs ├── README.md ├── api │ ├── accelerator.md │ ├── app.md │ ├── auto-updater.md │ ├── breaking-changes-ns.md │ ├── breaking-changes.md │ ├── browser-view.md │ ├── browser-window-proxy.md │ ├── browser-window.md │ ├── chrome-command-line-switches.md │ ├── client-request.md │ ├── clipboard.md │ ├── command-line.md │ ├── content-tracing.md │ ├── cookies.md │ ├── crash-reporter.md │ ├── debugger.md │ ├── desktop-capturer.md │ ├── dialog.md │ ├── dock.md │ ├── download-item.md │ ├── environment-variables.md │ ├── file-object.md │ ├── frameless-window.md │ ├── global-shortcut.md │ ├── in-app-purchase.md │ ├── incoming-message.md │ ├── ipc-main.md │ ├── ipc-renderer.md │ ├── locales.md │ ├── menu-item.md │ ├── menu.md │ ├── modernization │ │ ├── overview.md │ │ ├── promisification.md │ │ └── property-updates.md │ ├── native-image.md │ ├── native-theme.md │ ├── net-log.md │ ├── net.md │ ├── notification.md │ ├── power-monitor.md │ ├── power-save-blocker.md │ ├── process.md │ ├── protocol-ns.md │ ├── protocol.md │ ├── remote.md │ ├── sandbox-option.md │ ├── screen.md │ ├── session.md │ ├── shell.md │ ├── structures │ │ ├── bluetooth-device.md │ │ ├── certificate-principal.md │ │ ├── certificate.md │ │ ├── cookie.md │ │ ├── cpu-usage.md │ │ ├── crash-report.md │ │ ├── custom-scheme.md │ │ ├── desktop-capturer-source.md │ │ ├── display.md │ │ ├── event.md │ │ ├── extension-info.md │ │ ├── file-filter.md │ │ ├── file-path-with-headers.md │ │ ├── gpu-feature-status.md │ │ ├── input-event.md │ │ ├── io-counters.md │ │ ├── ipc-main-event.md │ │ ├── ipc-main-invoke-event.md │ │ ├── ipc-renderer-event.md │ │ ├── jump-list-category.md │ │ ├── jump-list-item.md │ │ ├── keyboard-event.md │ │ ├── keyboard-input-event.md │ │ ├── memory-info.md │ │ ├── memory-usage-details.md │ │ ├── mime-typed-buffer.md │ │ ├── mouse-input-event.md │ │ ├── mouse-wheel-input-event.md │ │ ├── notification-action.md │ │ ├── point.md │ │ ├── printer-info.md │ │ ├── process-memory-info.md │ │ ├── process-metric.md │ │ ├── product.md │ │ ├── protocol-request.md │ │ ├── protocol-response-upload-data.md │ │ ├── protocol-response.md │ │ ├── rectangle.md │ │ ├── referrer.md │ │ ├── remove-client-certificate.md │ │ ├── remove-password.md │ │ ├── scrubber-item.md │ │ ├── segmented-control-segment.md │ │ ├── shared-worker-info.md │ │ ├── shortcut-details.md │ │ ├── size.md │ │ ├── stream-protocol-response.md │ │ ├── string-protocol-response.md │ │ ├── task.md │ │ ├── thumbar-button.md │ │ ├── trace-categories-and-options.md │ │ ├── trace-config.md │ │ ├── transaction.md │ │ ├── upload-blob.md │ │ ├── upload-data.md │ │ ├── upload-file.md │ │ ├── upload-raw-data.md │ │ └── web-source.md │ ├── synopsis.md │ ├── system-preferences.md │ ├── touch-bar-button.md │ ├── touch-bar-color-picker.md │ ├── touch-bar-group.md │ ├── touch-bar-label.md │ ├── touch-bar-popover.md │ ├── touch-bar-scrubber.md │ ├── touch-bar-segmented-control.md │ ├── touch-bar-slider.md │ ├── touch-bar-spacer.md │ ├── touch-bar.md │ ├── tray.md │ ├── web-contents.md │ ├── web-frame.md │ ├── web-request.md │ ├── webview-tag.md │ └── window-open.md ├── development │ ├── README.md │ ├── atom-shell-vs-node-webkit.md │ ├── azure-vm-setup.md │ ├── build-instructions-gn.md │ ├── build-instructions-linux.md │ ├── build-instructions-macos.md │ ├── build-instructions-windows.md │ ├── build-system-overview.md │ ├── chromium-development.md │ ├── clang-format.md │ ├── coding-style.md │ ├── debug-instructions-windows.md │ ├── debugging-instructions-macos-xcode.md │ ├── debugging-instructions-macos.md │ ├── issues.md │ ├── pull-requests.md │ ├── setting-up-symbol-server.md │ ├── source-code-directory-structure.md │ ├── testing.md │ ├── upgrading-chromium.md │ ├── upgrading-crashpad.md │ ├── upgrading-node.md │ └── v8-development.md ├── faq.md ├── fiddles │ └── screen │ │ └── fit-screen │ │ └── main.js ├── glossary.md ├── images │ ├── subpixel-rendering-screenshot.gif │ ├── tutorial-release-schedule.svg │ ├── versioning-sketch-0.png │ ├── versioning-sketch-1.png │ ├── versioning-sketch-2.png │ ├── versioning-sketch-3.png │ ├── versioning-sketch-4.png │ ├── versioning-sketch-5.png │ ├── versioning-sketch-6.png │ └── versioning-sketch-7.png ├── styleguide.md └── tutorial │ ├── about.md │ ├── accessibility.md │ ├── app-feedback-program.md │ ├── application-architecture.md │ ├── application-debugging.md │ ├── application-distribution.md │ ├── application-packaging.md │ ├── automated-testing-with-a-custom-driver.md │ ├── boilerplates-and-clis.md │ ├── code-signing.md │ ├── debugging-main-process-vscode.md │ ├── debugging-main-process.md │ ├── desktop-environment-integration.md │ ├── development-environment.md │ ├── devtools-extension.md │ ├── electron-timelines.md │ ├── electron-versioning.md │ ├── first-app.md │ ├── in-app-purchases.md │ ├── installation.md │ ├── keyboard-shortcuts.md │ ├── linux-desktop-actions.md │ ├── mac-app-store-submission-guide.md │ ├── macos-dock.md │ ├── mojave-dark-mode-guide.md │ ├── multithreading.md │ ├── native-file-drag-drop.md │ ├── notifications.md │ ├── offscreen-rendering.md │ ├── online-offline-events.md │ ├── progress-bar.md │ ├── quick-start.md │ ├── recent-documents.md │ ├── repl.md │ ├── represented-file.md │ ├── security.md │ ├── snapcraft.md │ ├── support.md │ ├── testing-on-headless-ci.md │ ├── testing-widevine-cdm.md │ ├── updates.md │ ├── using-native-node-modules.md │ ├── using-pepper-flash-plugin.md │ ├── using-selenium-and-webdriver.md │ ├── windows-store-guide.md │ └── windows-taskbar.md ├── electron_paks.gni ├── electron_resources.grd ├── electron_strings.grdp ├── filenames.auto.gni ├── filenames.gni ├── lib ├── browser │ ├── api │ │ ├── app.ts │ │ ├── auto-updater.js │ │ ├── auto-updater │ │ │ ├── auto-updater-native.js │ │ │ ├── auto-updater-win.js │ │ │ └── squirrel-update-win.js │ │ ├── browser-view.js │ │ ├── browser-window.js │ │ ├── content-tracing.js │ │ ├── crash-reporter.js │ │ ├── dialog.js │ │ ├── exports │ │ │ └── electron.ts │ │ ├── global-shortcut.js │ │ ├── in-app-purchase.js │ │ ├── ipc-main.ts │ │ ├── menu-item-roles.js │ │ ├── menu-item.js │ │ ├── menu-utils.js │ │ ├── menu.js │ │ ├── module-keys.js │ │ ├── module-list.ts │ │ ├── native-theme.ts │ │ ├── net-log.js │ │ ├── net.js │ │ ├── notification.js │ │ ├── power-monitor.ts │ │ ├── power-save-blocker.js │ │ ├── protocol.ts │ │ ├── screen.ts │ │ ├── session.js │ │ ├── system-preferences.ts │ │ ├── top-level-window.js │ │ ├── touch-bar.js │ │ ├── tray.js │ │ ├── view.js │ │ ├── views │ │ │ ├── box-layout.js │ │ │ ├── button.js │ │ │ ├── label-button.js │ │ │ ├── layout-manager.js │ │ │ ├── md-text-button.js │ │ │ ├── resize-area.js │ │ │ └── text-field.js │ │ ├── web-contents-view.js │ │ └── web-contents.js │ ├── chrome-extension.js │ ├── crash-reporter-init.js │ ├── default-menu.ts │ ├── desktop-capturer.ts │ ├── devtools.ts │ ├── guest-view-manager.js │ ├── guest-window-manager.js │ ├── init.ts │ ├── ipc-main-impl.ts │ ├── ipc-main-internal-utils.ts │ ├── ipc-main-internal.ts │ ├── navigation-controller.js │ ├── remote │ │ ├── objects-registry.ts │ │ └── server.ts │ ├── rpc-server.js │ └── utils.ts ├── common │ ├── api │ │ ├── clipboard.js │ │ ├── deprecate.ts │ │ ├── module-list.ts │ │ ├── native-image.js │ │ └── shell.js │ ├── asar.js │ ├── asar_init.js │ ├── clipboard-utils.ts │ ├── crash-reporter.js │ ├── define-properties.ts │ ├── electron-binding-setup.ts │ ├── error-utils.ts │ ├── init.ts │ ├── parse-features-string.js │ ├── remote │ │ ├── buffer-utils.ts │ │ └── is-promise.ts │ ├── reset-search-paths.ts │ └── web-view-methods.ts ├── content_script │ └── init.js ├── isolated_renderer │ └── init.js ├── renderer │ ├── api │ │ ├── crash-reporter.js │ │ ├── desktop-capturer.ts │ │ ├── exports │ │ │ └── electron.ts │ │ ├── ipc-renderer.ts │ │ ├── module-list.ts │ │ ├── remote.js │ │ └── web-frame.ts │ ├── chrome-api.ts │ ├── content-scripts-injector.ts │ ├── extensions │ │ ├── event.ts │ │ ├── i18n.ts │ │ ├── storage.ts │ │ └── web-navigation.ts │ ├── init.ts │ ├── inspector.ts │ ├── ipc-renderer-internal-utils.ts │ ├── ipc-renderer-internal.ts │ ├── remote │ │ └── callbacks-registry.ts │ ├── security-warnings.ts │ ├── web-frame-init.ts │ ├── web-view │ │ ├── guest-view-internal.ts │ │ ├── web-view-attributes.ts │ │ ├── web-view-constants.ts │ │ ├── web-view-element.ts │ │ ├── web-view-impl.ts │ │ └── web-view-init.ts │ ├── webpack-provider.ts │ └── window-setup.ts ├── sandboxed_renderer │ ├── api │ │ ├── exports │ │ │ └── electron.ts │ │ └── module-list.ts │ └── init.js └── worker │ └── init.js ├── native_mate ├── BUILD.gn ├── LICENSE.chromium ├── README.md └── native_mate │ ├── arguments.cc │ ├── arguments.h │ ├── constructor.h │ ├── converter.cc │ ├── converter.h │ ├── dictionary.cc │ ├── dictionary.h │ ├── function_template.cc │ ├── function_template.h │ ├── handle.h │ ├── object_template_builder.cc │ ├── object_template_builder_deprecated.h │ ├── persistent_dictionary.cc │ ├── persistent_dictionary.h │ ├── promise.cc │ ├── promise.h │ ├── scoped_persistent.h │ ├── wrappable.cc │ ├── wrappable.h │ └── wrappable_base.h ├── npm ├── cli.js ├── index.js ├── install.js └── package.json ├── package.json ├── patches ├── boringssl │ ├── .patches │ ├── expose_aes-cfb.patch │ └── expose_ripemd160.patch ├── chromium │ ├── .patches │ ├── accelerator.patch │ ├── add_contentgpuclient_precreatemessageloop_callback.patch │ ├── add_realloc.patch │ ├── allow_nested_error_trackers.patch │ ├── allow_new_privileges_in_unsandboxed_child_processes.patch │ ├── autofill_size_calculation.patch │ ├── blink-worker-enable-csp-in-file-scheme.patch │ ├── blink_file_path.patch │ ├── blink_fix_prototype_assert.patch │ ├── blink_initialization_order.patch │ ├── blink_local_frame.patch │ ├── blink_world_context.patch │ ├── boringssl_build_gn.patch │ ├── build_add_electron_tracing_category.patch │ ├── build_gn.patch │ ├── build_win_disable_zc_twophase.patch │ ├── can_create_window.patch │ ├── chrome_key_systems.patch │ ├── command-ismediakey.patch │ ├── content_browser_main_loop.patch │ ├── crashpad_pid_check.patch │ ├── dcheck.patch │ ├── desktop_media_list.patch │ ├── disable-redraw-lock.patch │ ├── disable_color_correct_rendering.patch │ ├── disable_compositor_recycling.patch │ ├── disable_custom_libcxx_on_windows.patch │ ├── disable_hidden.patch │ ├── disable_user_gesture_requirement_for_beforeunload_dialogs.patch │ ├── dom_storage_limits.patch │ ├── dump_syms.patch │ ├── exclude-a-few-test-files-from-build.patch │ ├── expose_setuseragent_on_networkcontext.patch │ ├── feat_add_set_theme_source_to_allow_apps_to.patch │ ├── fix_breakpad_symbol_generation_on_linux_arm.patch │ ├── fix_disable_usage_of_abort_report_np_in_mas_builds.patch │ ├── fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch │ ├── fix_disable_usage_of_setapplicationisdaemon_and.patch │ ├── fix_windows_build.patch │ ├── frame_host_manager.patch │ ├── gin_enable_disable_v8_platform.patch │ ├── gin_with_namespace.patch │ ├── gritsettings_resource_ids.patch │ ├── gtk_visibility.patch │ ├── ignore_rc_check.patch │ ├── isolate_holder.patch │ ├── libgtkui_export.patch │ ├── mas-audiodeviceduck.patch │ ├── mas-cfisobjc.patch │ ├── mas-cgdisplayusesforcetogray.patch │ ├── mas-lssetapplicationlaunchservicesserverconnectionstatus.patch │ ├── mas_blink_no_private_api.patch │ ├── mas_no_private_api.patch │ ├── network_service_allow_remote_certificate_verification_logic.patch │ ├── no_cache_storage_check.patch │ ├── notification_provenance.patch │ ├── out_of_process_instance.patch │ ├── patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch │ ├── pepper_flash.patch │ ├── picture-in-picture.patch │ ├── preconnect_feature.patch │ ├── printing.patch │ ├── proxy_config_monitor.patch │ ├── put_back_deleted_colors_for_autofill.patch │ ├── render_widget_host_view_base.patch │ ├── render_widget_host_view_mac.patch │ ├── resource_file_conflict.patch │ ├── revert_cleanup_remove_menu_subtitles_sublabels.patch │ ├── scroll_bounce_flag.patch │ ├── ssl_security_state_tab_helper.patch │ ├── support_mixed_sandbox_with_zygote.patch │ ├── sysroot.patch │ ├── thread_capabilities.patch │ ├── tts.patch │ ├── ui_views_fix_jumbo_build.patch │ ├── unsandboxed_ppapi_processes_skip_zygote.patch │ ├── v8_context_snapshot_generator.patch │ ├── verbose_generate_breakpad_symbols.patch │ ├── web_contents.patch │ ├── webview_cross_drag.patch │ └── worker_context_will_destroy.patch ├── config.json ├── node │ ├── .patches │ ├── add_openssl_is_boringssl_guard_to_oaep_hash_check.patch │ ├── build_add_gn_build_files.patch │ ├── build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch │ ├── call_process_log_from_fallback_stream_on_windows.patch │ ├── chore_add_ability_to_prevent_warn_non_context-aware_native_modules.patch │ ├── chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch │ ├── chore_handle_default_configuration_not_being_set_in_the_electron_env.patch │ ├── chore_re-add_compileandcall_this_should_be_added_as_a_helper_in.patch │ ├── chore_read_nobrowserglobals_from_global_not_process.patch │ ├── chore_split_createenvironment_into_createenvironment_and.patch │ ├── export_environment_knodecontexttagptr.patch │ ├── expose_get_builtin_module_function.patch │ ├── feat_add_flags_for_low-level_hooks_and_exceptions.patch │ ├── feat_add_new_built_with_electron_variable_to_config_gypi.patch │ ├── feat_add_uv_loop_watcher_queue_code.patch │ ├── feat_initialize_asar_support.patch │ ├── fix_add_default_values_for_enable_lto_and_build_v8_with_gn_in.patch │ ├── fix_build_and_expose_inspector_agent.patch │ ├── fix_do_not_define_debugoptions_s_constructors_in_header.patch │ ├── fix_don_t_create_console_window_when_creating_process.patch │ ├── fix_export_debugoptions.patch │ ├── fix_export_node_abort_and_assert.patch │ ├── fix_expose_internalcallbackscope.patch │ ├── fix_expose_tracing_agent_and_use_tracing_tracingcontroller_instead.patch │ ├── fix_extern_the_nativemoduleenv_and_options_parser_for_debug_builds.patch │ ├── fix_key_gen_apis_are_not_available_in_boringssl.patch │ ├── fix_microtasks.patch │ ├── fix_use_bssl_bn_bn2bin_padded_for_ossl_s_bn_bn2binpad.patch │ ├── fixme_comment_trace_event_macro.patch │ ├── fixme_remove_async_id_assertion_check.patch │ ├── fixme_revert_crypto_add_support_for_rsa-pss_keys.patch │ ├── fixme_use_redefined_version_of_internalmodulestat.patch │ ├── fsevents_fix_file_event_reporting.patch │ ├── inherit_electron_crashpad_pipe_name_in_child_process.patch │ ├── make_module_globalpaths_a_reference.patch │ ├── pass_all_globals_through_require.patch │ ├── refactor_allow_embedder_overriding_of_internal_fs_calls.patch │ ├── refactor_alter_child_process_fork_to_use_execute_script_with.patch │ ├── revert_crypto_add_outputlength_option_to_crypto_createhash.patch │ ├── src_disable_node_use_v8_platform_in_node_options.patch │ ├── src_expose_maybeinitializecontext_to_allow_existing_contexts.patch │ └── src_use_check_false_in_switch_default_case.patch ├── perfetto │ ├── .patches │ ├── revert_fix_chrome_roll_update_protoc_host_toolchain_rules.patch │ └── revert_make_trace_processor_a_host-only_target.patch └── v8 │ ├── .patches │ ├── README.md │ ├── add_realloc.patch │ ├── build_gn.patch │ ├── dcheck.patch │ ├── deps_provide_more_v8_backwards_compatibility.patch │ ├── do_not_export_private_v8_symbols_on_windows.patch │ ├── export_symbols_needed_for_windows_build.patch │ ├── expose_mksnapshot.patch │ ├── revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch │ └── workaround_an_undefined_symbol_error.patch ├── script ├── .electron.attributes ├── apply_all_patches.py ├── check-relative-doc-links.py ├── check-trailing-whitespace.py ├── codesign │ ├── get-trusted-identity.sh │ ├── import-testing-cert-ci.sh │ ├── signing.cer │ ├── signing.p12 │ ├── signing.pem │ └── trust-settings.plist ├── dbus_mock.py ├── download-circleci-artifacts.js ├── external-binaries.json ├── gen-filenames.js ├── generate-deps-hash.js ├── generate-version-json.js ├── generate-zip-manifest.py ├── git-export-patches ├── git-import-patches ├── gn-asar.js ├── gn-check.js ├── lib │ ├── __init__.py │ ├── config.py │ ├── env_util.py │ ├── git.py │ ├── gn.py │ ├── native_tests.py │ ├── npm.py │ ├── npx.py │ ├── patches.py │ ├── util.py │ └── utils.js ├── lint.js ├── nan-spec-runner.js ├── native-tests.py ├── node-disabled-tests.json ├── node-spec-runner.js ├── release │ ├── ci-release-build.js │ ├── find-github-release.js │ ├── merge-electron-checksums.py │ ├── notes │ │ ├── .gitignore │ │ ├── index.js │ │ └── notes.js │ ├── prepare-release.js │ ├── publish-to-npm.js │ ├── release-artifact-cleanup.js │ ├── release.js │ ├── uploaders │ │ ├── upload-index-json.py │ │ ├── upload-node-checksums.py │ │ ├── upload-node-headers.py │ │ ├── upload-symbols.py │ │ ├── upload-to-github.js │ │ └── upload.py │ ├── version-bumper.js │ └── version-utils.js ├── run-clang-format.py ├── run-gn-format.py ├── spec-runner.js ├── start.js ├── strip-binaries.py ├── sysroots.json ├── update-external-binaries.py ├── verify-ffmpeg.py ├── verify-mksnapshot.py ├── yarn.js ├── zip-symbols.py └── zip_manifests │ ├── check-zip-manifest.py │ ├── dist_zip.linux.arm.manifest │ ├── dist_zip.linux.arm64.manifest │ ├── dist_zip.linux.x64.manifest │ ├── dist_zip.linux.x86.manifest │ ├── dist_zip.mac.x64.manifest │ ├── dist_zip.mac_mas.x64.manifest │ ├── dist_zip.win.arm64.manifest │ ├── dist_zip.win.ia32.manifest │ └── dist_zip.win.x64.manifest ├── shell ├── app │ ├── BRANDING.json │ ├── atom_content_client.cc │ ├── atom_content_client.h │ ├── atom_library_main.h │ ├── atom_library_main.mm │ ├── atom_login_helper.mm │ ├── atom_main.cc │ ├── atom_main.h │ ├── atom_main_delegate.cc │ ├── atom_main_delegate.h │ ├── atom_main_delegate_mac.h │ ├── atom_main_delegate_mac.mm │ ├── command_line_args.cc │ ├── command_line_args.h │ ├── manifests.cc │ ├── manifests.h │ ├── node_main.cc │ ├── node_main.h │ ├── resources │ │ └── mac │ │ │ └── loginhelper-Info.plist │ ├── uv_task_runner.cc │ └── uv_task_runner.h ├── browser │ ├── api │ │ ├── atom_api_app.cc │ │ ├── atom_api_app.h │ │ ├── atom_api_app_mac.mm │ │ ├── atom_api_app_mas.mm │ │ ├── atom_api_auto_updater.cc │ │ ├── atom_api_auto_updater.h │ │ ├── atom_api_browser_view.cc │ │ ├── atom_api_browser_view.h │ │ ├── atom_api_browser_window.cc │ │ ├── atom_api_browser_window.h │ │ ├── atom_api_browser_window_mac.mm │ │ ├── atom_api_browser_window_views.cc │ │ ├── atom_api_content_tracing.cc │ │ ├── atom_api_cookies.cc │ │ ├── atom_api_cookies.h │ │ ├── atom_api_data_pipe_holder.cc │ │ ├── atom_api_data_pipe_holder.h │ │ ├── atom_api_debugger.cc │ │ ├── atom_api_debugger.h │ │ ├── atom_api_desktop_capturer.cc │ │ ├── atom_api_desktop_capturer.h │ │ ├── atom_api_dialog.cc │ │ ├── atom_api_download_item.cc │ │ ├── atom_api_download_item.h │ │ ├── atom_api_event.cc │ │ ├── atom_api_global_shortcut.cc │ │ ├── atom_api_global_shortcut.h │ │ ├── atom_api_in_app_purchase.cc │ │ ├── atom_api_in_app_purchase.h │ │ ├── atom_api_menu.cc │ │ ├── atom_api_menu.h │ │ ├── atom_api_menu_mac.h │ │ ├── atom_api_menu_mac.mm │ │ ├── atom_api_menu_views.cc │ │ ├── atom_api_menu_views.h │ │ ├── atom_api_native_theme.cc │ │ ├── atom_api_native_theme.h │ │ ├── atom_api_native_theme_mac.mm │ │ ├── atom_api_net.cc │ │ ├── atom_api_net.h │ │ ├── atom_api_net_log.cc │ │ ├── atom_api_net_log.h │ │ ├── atom_api_notification.cc │ │ ├── atom_api_notification.h │ │ ├── atom_api_power_monitor.cc │ │ ├── atom_api_power_monitor.h │ │ ├── atom_api_power_monitor_mac.mm │ │ ├── atom_api_power_monitor_win.cc │ │ ├── atom_api_power_save_blocker.cc │ │ ├── atom_api_power_save_blocker.h │ │ ├── atom_api_protocol_ns.cc │ │ ├── atom_api_protocol_ns.h │ │ ├── atom_api_screen.cc │ │ ├── atom_api_screen.h │ │ ├── atom_api_session.cc │ │ ├── atom_api_session.h │ │ ├── atom_api_system_preferences.cc │ │ ├── atom_api_system_preferences.h │ │ ├── atom_api_system_preferences_mac.mm │ │ ├── atom_api_system_preferences_win.cc │ │ ├── atom_api_top_level_window.cc │ │ ├── atom_api_top_level_window.h │ │ ├── atom_api_tray.cc │ │ ├── atom_api_tray.h │ │ ├── atom_api_url_request_ns.cc │ │ ├── atom_api_url_request_ns.h │ │ ├── atom_api_view.cc │ │ ├── atom_api_view.h │ │ ├── atom_api_web_contents.cc │ │ ├── atom_api_web_contents.h │ │ ├── atom_api_web_contents_impl.cc │ │ ├── atom_api_web_contents_mac.mm │ │ ├── atom_api_web_contents_view.cc │ │ ├── atom_api_web_contents_view.h │ │ ├── atom_api_web_request_ns.cc │ │ ├── atom_api_web_request_ns.h │ │ ├── atom_api_web_view_manager.cc │ │ ├── event.cc │ │ ├── event.h │ │ ├── event_emitter.cc │ │ ├── event_emitter.h │ │ ├── frame_subscriber.cc │ │ ├── frame_subscriber.h │ │ ├── gpu_info_enumerator.cc │ │ ├── gpu_info_enumerator.h │ │ ├── gpuinfo_manager.cc │ │ ├── gpuinfo_manager.h │ │ ├── process_metric.cc │ │ ├── process_metric.h │ │ ├── save_page_handler.cc │ │ ├── save_page_handler.h │ │ ├── trackable_object.cc │ │ ├── trackable_object.h │ │ └── views │ │ │ ├── atom_api_box_layout.cc │ │ │ ├── atom_api_box_layout.h │ │ │ ├── atom_api_button.cc │ │ │ ├── atom_api_button.h │ │ │ ├── atom_api_label_button.cc │ │ │ ├── atom_api_label_button.h │ │ │ ├── atom_api_layout_manager.cc │ │ │ ├── atom_api_layout_manager.h │ │ │ ├── atom_api_md_text_button.cc │ │ │ ├── atom_api_md_text_button.h │ │ │ ├── atom_api_resize_area.cc │ │ │ ├── atom_api_resize_area.h │ │ │ ├── atom_api_text_field.cc │ │ │ └── atom_api_text_field.h │ ├── atom_autofill_driver.cc │ ├── atom_autofill_driver.h │ ├── atom_autofill_driver_factory.cc │ ├── atom_autofill_driver_factory.h │ ├── atom_browser_client.cc │ ├── atom_browser_client.h │ ├── atom_browser_context.cc │ ├── atom_browser_context.h │ ├── atom_browser_main_parts.cc │ ├── atom_browser_main_parts.h │ ├── atom_browser_main_parts_mac.mm │ ├── atom_browser_main_parts_posix.cc │ ├── atom_download_manager_delegate.cc │ ├── atom_download_manager_delegate.h │ ├── atom_gpu_client.cc │ ├── atom_gpu_client.h │ ├── atom_javascript_dialog_manager.cc │ ├── atom_javascript_dialog_manager.h │ ├── atom_navigation_throttle.cc │ ├── atom_navigation_throttle.h │ ├── atom_paths.h │ ├── atom_permission_manager.cc │ ├── atom_permission_manager.h │ ├── atom_quota_permission_context.cc │ ├── atom_quota_permission_context.h │ ├── atom_speech_recognition_manager_delegate.cc │ ├── atom_speech_recognition_manager_delegate.h │ ├── atom_web_ui_controller_factory.cc │ ├── atom_web_ui_controller_factory.h │ ├── auto_updater.cc │ ├── auto_updater.h │ ├── auto_updater_mac.mm │ ├── browser.cc │ ├── browser.h │ ├── browser_linux.cc │ ├── browser_mac.mm │ ├── browser_observer.h │ ├── browser_process_impl.cc │ ├── browser_process_impl.h │ ├── browser_win.cc │ ├── child_web_contents_tracker.cc │ ├── child_web_contents_tracker.h │ ├── common_web_contents_delegate.cc │ ├── common_web_contents_delegate.h │ ├── common_web_contents_delegate_mac.mm │ ├── common_web_contents_delegate_views.cc │ ├── cookie_change_notifier.cc │ ├── cookie_change_notifier.h │ ├── extensions │ │ ├── api │ │ │ └── runtime │ │ │ │ ├── atom_runtime_api_delegate.cc │ │ │ │ └── atom_runtime_api_delegate.h │ │ ├── atom_browser_context_keyed_service_factories.cc │ │ ├── atom_browser_context_keyed_service_factories.h │ │ ├── atom_display_info_provider.cc │ │ ├── atom_display_info_provider.h │ │ ├── atom_extension_host_delegate.cc │ │ ├── atom_extension_host_delegate.h │ │ ├── atom_extension_loader.cc │ │ ├── atom_extension_loader.h │ │ ├── atom_extension_system.cc │ │ ├── atom_extension_system.h │ │ ├── atom_extension_system_factory.cc │ │ ├── atom_extension_system_factory.h │ │ ├── atom_extension_web_contents_observer.cc │ │ ├── atom_extension_web_contents_observer.h │ │ ├── atom_extensions_browser_client.cc │ │ ├── atom_extensions_browser_client.h │ │ ├── atom_navigation_ui_data.cc │ │ └── atom_navigation_ui_data.h │ ├── fake_location_provider.cc │ ├── fake_location_provider.h │ ├── feature_list.cc │ ├── feature_list.h │ ├── font_defaults.cc │ ├── font_defaults.h │ ├── javascript_environment.cc │ ├── javascript_environment.h │ ├── lib │ │ ├── bluetooth_chooser.cc │ │ ├── bluetooth_chooser.h │ │ ├── power_observer.h │ │ ├── power_observer_linux.cc │ │ └── power_observer_linux.h │ ├── login_handler.cc │ ├── login_handler.h │ ├── mac │ │ ├── atom_application.h │ │ ├── atom_application.mm │ │ ├── atom_application_delegate.h │ │ ├── atom_application_delegate.mm │ │ ├── dict_util.h │ │ ├── dict_util.mm │ │ ├── in_app_purchase.h │ │ ├── in_app_purchase.mm │ │ ├── in_app_purchase_observer.h │ │ ├── in_app_purchase_observer.mm │ │ ├── in_app_purchase_product.h │ │ └── in_app_purchase_product.mm │ ├── media │ │ ├── media_capture_devices_dispatcher.cc │ │ ├── media_capture_devices_dispatcher.h │ │ ├── media_device_id_salt.cc │ │ ├── media_device_id_salt.h │ │ ├── media_stream_devices_controller.cc │ │ └── media_stream_devices_controller.h │ ├── microtasks_runner.cc │ ├── microtasks_runner.h │ ├── native_browser_view.cc │ ├── native_browser_view.h │ ├── native_browser_view_mac.h │ ├── native_browser_view_mac.mm │ ├── native_browser_view_views.cc │ ├── native_browser_view_views.h │ ├── native_window.cc │ ├── native_window.h │ ├── native_window_mac.h │ ├── native_window_mac.mm │ ├── native_window_observer.h │ ├── native_window_views.cc │ ├── native_window_views.h │ ├── native_window_views_win.cc │ ├── net │ │ ├── asar │ │ │ ├── asar_url_loader.cc │ │ │ └── asar_url_loader.h │ │ ├── atom_url_loader_factory.cc │ │ ├── atom_url_loader_factory.h │ │ ├── cert_verifier_client.cc │ │ ├── cert_verifier_client.h │ │ ├── cookie_details.h │ │ ├── network_context_service.cc │ │ ├── network_context_service.h │ │ ├── network_context_service_factory.cc │ │ ├── network_context_service_factory.h │ │ ├── node_stream_loader.cc │ │ ├── node_stream_loader.h │ │ ├── proxying_url_loader_factory.cc │ │ ├── proxying_url_loader_factory.h │ │ ├── resolve_proxy_helper.cc │ │ ├── resolve_proxy_helper.h │ │ ├── system_network_context_manager.cc │ │ ├── system_network_context_manager.h │ │ ├── url_pipe_loader.cc │ │ └── url_pipe_loader.h │ ├── node_debugger.cc │ ├── node_debugger.h │ ├── notifications │ │ ├── linux │ │ │ ├── libnotify_notification.cc │ │ │ ├── libnotify_notification.h │ │ │ ├── notification_presenter_linux.cc │ │ │ └── notification_presenter_linux.h │ │ ├── mac │ │ │ ├── cocoa_notification.h │ │ │ ├── cocoa_notification.mm │ │ │ ├── notification_center_delegate.h │ │ │ ├── notification_center_delegate.mm │ │ │ ├── notification_presenter_mac.h │ │ │ └── notification_presenter_mac.mm │ │ ├── notification.cc │ │ ├── notification.h │ │ ├── notification_delegate.h │ │ ├── notification_presenter.cc │ │ ├── notification_presenter.h │ │ ├── platform_notification_service.cc │ │ ├── platform_notification_service.h │ │ └── win │ │ │ ├── notification_presenter_win.cc │ │ │ ├── notification_presenter_win.h │ │ │ ├── notification_presenter_win7.cc │ │ │ ├── notification_presenter_win7.h │ │ │ ├── win32_desktop_notifications │ │ │ ├── common.h │ │ │ ├── desktop_notification_controller.cc │ │ │ ├── desktop_notification_controller.h │ │ │ ├── toast.cc │ │ │ ├── toast.h │ │ │ ├── toast_uia.cc │ │ │ └── toast_uia.h │ │ │ ├── win32_notification.cc │ │ │ ├── win32_notification.h │ │ │ ├── windows_toast_notification.cc │ │ │ └── windows_toast_notification.h │ ├── osr │ │ ├── osr_host_display_client.cc │ │ ├── osr_host_display_client.h │ │ ├── osr_host_display_client_mac.mm │ │ ├── osr_render_widget_host_view.cc │ │ ├── osr_render_widget_host_view.h │ │ ├── osr_video_consumer.cc │ │ ├── osr_video_consumer.h │ │ ├── osr_view_proxy.cc │ │ ├── osr_view_proxy.h │ │ ├── osr_web_contents_view.cc │ │ ├── osr_web_contents_view.h │ │ └── osr_web_contents_view_mac.mm │ ├── pref_store_delegate.cc │ ├── pref_store_delegate.h │ ├── printing │ │ ├── print_preview_message_handler.cc │ │ └── print_preview_message_handler.h │ ├── relauncher.cc │ ├── relauncher.h │ ├── relauncher_linux.cc │ ├── relauncher_mac.cc │ ├── relauncher_win.cc │ ├── renderer_host │ │ ├── electron_render_message_filter.cc │ │ └── electron_render_message_filter.h │ ├── resources │ │ ├── mac │ │ │ ├── Info.plist │ │ │ └── electron.icns │ │ └── win │ │ │ ├── atom.ico │ │ │ ├── atom.rc │ │ │ ├── disable_window_filtering.manifest │ │ │ ├── dpi_aware.manifest │ │ │ └── resource.h │ ├── session_preferences.cc │ ├── session_preferences.h │ ├── special_storage_policy.cc │ ├── special_storage_policy.h │ ├── ui │ │ ├── accelerator_util.cc │ │ ├── accelerator_util.h │ │ ├── atom_menu_model.cc │ │ ├── atom_menu_model.h │ │ ├── autofill_popup.cc │ │ ├── autofill_popup.h │ │ ├── certificate_trust.h │ │ ├── certificate_trust_mac.mm │ │ ├── certificate_trust_win.cc │ │ ├── cocoa │ │ │ ├── NSColor+Hex.h │ │ │ ├── NSColor+Hex.mm │ │ │ ├── NSString+ANSI.h │ │ │ ├── NSString+ANSI.mm │ │ │ ├── atom_bundle_mover.h │ │ │ ├── atom_bundle_mover.mm │ │ │ ├── atom_inspectable_web_contents_view.h │ │ │ ├── atom_inspectable_web_contents_view.mm │ │ │ ├── atom_menu_controller.h │ │ │ ├── atom_menu_controller.mm │ │ │ ├── atom_native_widget_mac.h │ │ │ ├── atom_native_widget_mac.mm │ │ │ ├── atom_ns_window.h │ │ │ ├── atom_ns_window.mm │ │ │ ├── atom_ns_window_delegate.h │ │ │ ├── atom_ns_window_delegate.mm │ │ │ ├── atom_preview_item.h │ │ │ ├── atom_preview_item.mm │ │ │ ├── atom_touch_bar.h │ │ │ ├── atom_touch_bar.mm │ │ │ ├── delayed_native_view_host.cc │ │ │ ├── delayed_native_view_host.h │ │ │ ├── event_dispatching_window.h │ │ │ ├── event_dispatching_window.mm │ │ │ ├── root_view_mac.h │ │ │ ├── root_view_mac.mm │ │ │ ├── views_delegate_mac.h │ │ │ └── views_delegate_mac.mm │ │ ├── devtools_manager_delegate.cc │ │ ├── devtools_manager_delegate.h │ │ ├── devtools_ui.cc │ │ ├── devtools_ui.h │ │ ├── drag_util.h │ │ ├── drag_util_mac.mm │ │ ├── drag_util_views.cc │ │ ├── file_dialog.h │ │ ├── file_dialog_gtk.cc │ │ ├── file_dialog_mac.mm │ │ ├── file_dialog_win.cc │ │ ├── inspectable_web_contents.cc │ │ ├── inspectable_web_contents.h │ │ ├── inspectable_web_contents_delegate.h │ │ ├── inspectable_web_contents_impl.cc │ │ ├── inspectable_web_contents_impl.h │ │ ├── inspectable_web_contents_view.h │ │ ├── inspectable_web_contents_view_delegate.cc │ │ ├── inspectable_web_contents_view_delegate.h │ │ ├── inspectable_web_contents_view_mac.h │ │ ├── inspectable_web_contents_view_mac.mm │ │ ├── message_box.h │ │ ├── message_box_gtk.cc │ │ ├── message_box_mac.mm │ │ ├── message_box_win.cc │ │ ├── tray_icon.cc │ │ ├── tray_icon.h │ │ ├── tray_icon_cocoa.h │ │ ├── tray_icon_cocoa.mm │ │ ├── tray_icon_gtk.cc │ │ ├── tray_icon_gtk.h │ │ ├── tray_icon_observer.h │ │ ├── tray_icon_win.cc │ │ ├── util_gtk.cc │ │ ├── util_gtk.h │ │ ├── views │ │ │ ├── atom_views_delegate.cc │ │ │ ├── atom_views_delegate.h │ │ │ ├── autofill_popup_view.cc │ │ │ ├── autofill_popup_view.h │ │ │ ├── frameless_view.cc │ │ │ ├── frameless_view.h │ │ │ ├── global_menu_bar_x11.cc │ │ │ ├── global_menu_bar_x11.h │ │ │ ├── inspectable_web_contents_view_views.cc │ │ │ ├── inspectable_web_contents_view_views.h │ │ │ ├── menu_bar.cc │ │ │ ├── menu_bar.h │ │ │ ├── menu_delegate.cc │ │ │ ├── menu_delegate.h │ │ │ ├── menu_model_adapter.cc │ │ │ ├── menu_model_adapter.h │ │ │ ├── native_frame_view.cc │ │ │ ├── native_frame_view.h │ │ │ ├── root_view.cc │ │ │ ├── root_view.h │ │ │ ├── submenu_button.cc │ │ │ ├── submenu_button.h │ │ │ ├── win_frame_view.cc │ │ │ └── win_frame_view.h │ │ ├── win │ │ │ ├── atom_desktop_native_widget_aura.cc │ │ │ ├── atom_desktop_native_widget_aura.h │ │ │ ├── atom_desktop_window_tree_host_win.cc │ │ │ ├── atom_desktop_window_tree_host_win.h │ │ │ ├── jump_list.cc │ │ │ ├── jump_list.h │ │ │ ├── notify_icon.cc │ │ │ ├── notify_icon.h │ │ │ ├── notify_icon_host.cc │ │ │ ├── notify_icon_host.h │ │ │ ├── taskbar_host.cc │ │ │ └── taskbar_host.h │ │ └── x │ │ │ ├── event_disabler.cc │ │ │ ├── event_disabler.h │ │ │ ├── window_state_watcher.cc │ │ │ ├── window_state_watcher.h │ │ │ ├── x_window_utils.cc │ │ │ └── x_window_utils.h │ ├── unresponsive_suppressor.cc │ ├── unresponsive_suppressor.h │ ├── web_contents_permission_helper.cc │ ├── web_contents_permission_helper.h │ ├── web_contents_preferences.cc │ ├── web_contents_preferences.h │ ├── web_contents_zoom_controller.cc │ ├── web_contents_zoom_controller.h │ ├── web_dialog_helper.cc │ ├── web_dialog_helper.h │ ├── web_view_guest_delegate.cc │ ├── web_view_guest_delegate.h │ ├── web_view_manager.cc │ ├── web_view_manager.h │ ├── win │ │ ├── scoped_hstring.cc │ │ └── scoped_hstring.h │ ├── window_list.cc │ ├── window_list.h │ ├── window_list_observer.h │ ├── zoom_level_delegate.cc │ └── zoom_level_delegate.h ├── common │ ├── api │ │ ├── BUILD.gn │ │ ├── api.mojom │ │ ├── atom_api_asar.cc │ │ ├── atom_api_clipboard.cc │ │ ├── atom_api_clipboard.h │ │ ├── atom_api_clipboard_mac.mm │ │ ├── atom_api_command_line.cc │ │ ├── atom_api_crash_reporter.cc │ │ ├── atom_api_key_weak_map.h │ │ ├── atom_api_native_image.cc │ │ ├── atom_api_native_image.h │ │ ├── atom_api_native_image_mac.mm │ │ ├── atom_api_shell.cc │ │ ├── atom_api_v8_util.cc │ │ ├── constructor.h │ │ ├── electron_bindings.cc │ │ ├── electron_bindings.h │ │ ├── event_emitter_caller_deprecated.cc │ │ ├── event_emitter_caller_deprecated.h │ │ ├── features.cc │ │ ├── locker.cc │ │ ├── locker.h │ │ └── remote │ │ │ ├── object_life_monitor.cc │ │ │ ├── object_life_monitor.h │ │ │ ├── remote_callback_freer.cc │ │ │ ├── remote_callback_freer.h │ │ │ ├── remote_object_freer.cc │ │ │ └── remote_object_freer.h │ ├── application_info.cc │ ├── application_info.h │ ├── application_info_linux.cc │ ├── application_info_mac.mm │ ├── application_info_win.cc │ ├── asar │ │ ├── archive.cc │ │ ├── archive.h │ │ ├── asar_util.cc │ │ ├── asar_util.h │ │ ├── scoped_temporary_file.cc │ │ └── scoped_temporary_file.h │ ├── atom_command_line.cc │ ├── atom_command_line.h │ ├── atom_constants.cc │ ├── atom_constants.h │ ├── color_util.cc │ ├── color_util.h │ ├── crash_reporter │ │ ├── crash_reporter.cc │ │ ├── crash_reporter.h │ │ ├── crash_reporter_crashpad.cc │ │ ├── crash_reporter_crashpad.h │ │ ├── crash_reporter_linux.cc │ │ ├── crash_reporter_linux.h │ │ ├── crash_reporter_mac.h │ │ ├── crash_reporter_mac.mm │ │ ├── crash_reporter_win.cc │ │ ├── crash_reporter_win.h │ │ ├── linux │ │ │ ├── crash_dump_handler.cc │ │ │ └── crash_dump_handler.h │ │ └── win │ │ │ ├── crash_service.cc │ │ │ ├── crash_service.h │ │ │ ├── crash_service_main.cc │ │ │ └── crash_service_main.h │ ├── deprecate_util.cc │ ├── deprecate_util.h │ ├── extensions │ │ ├── api │ │ │ ├── BUILD.gn │ │ │ └── _manifest_features.json │ │ ├── atom_extensions_api_provider.cc │ │ ├── atom_extensions_api_provider.h │ │ ├── atom_extensions_client.cc │ │ └── atom_extensions_client.h │ ├── gin_converters │ │ ├── callback_converter.h │ │ ├── file_dialog_converter.cc │ │ ├── file_dialog_converter.h │ │ ├── file_path_converter.h │ │ ├── gurl_converter.h │ │ ├── image_converter.cc │ │ ├── image_converter.h │ │ ├── message_box_converter.cc │ │ ├── message_box_converter.h │ │ ├── native_mate_handle_converter.h │ │ ├── native_window_converter.h │ │ ├── net_converter.cc │ │ ├── net_converter.h │ │ ├── std_converter.h │ │ └── value_converter_gin_adapter.h │ ├── gin_helper │ │ ├── callback.cc │ │ ├── callback.h │ │ ├── destroyable.cc │ │ ├── destroyable.h │ │ ├── dictionary.h │ │ ├── error_thrower.cc │ │ ├── error_thrower.h │ │ ├── event_emitter_caller.cc │ │ ├── event_emitter_caller.h │ │ ├── function_template.cc │ │ ├── function_template.h │ │ ├── object_template_builder.cc │ │ └── object_template_builder.h │ ├── heap_snapshot.cc │ ├── heap_snapshot.h │ ├── key_weak_map.h │ ├── keyboard_util.cc │ ├── keyboard_util.h │ ├── mac │ │ ├── main_application_bundle.h │ │ └── main_application_bundle.mm │ ├── mouse_util.cc │ ├── mouse_util.h │ ├── native_mate_converters │ │ ├── accelerator_converter.cc │ │ ├── accelerator_converter.h │ │ ├── blink_converter.cc │ │ ├── blink_converter.h │ │ ├── callback_converter_deprecated.cc │ │ ├── callback_converter_deprecated.h │ │ ├── content_converter.cc │ │ ├── content_converter.h │ │ ├── file_dialog_converter.h │ │ ├── file_path_converter.h │ │ ├── gfx_converter.cc │ │ ├── gfx_converter.h │ │ ├── gurl_converter.h │ │ ├── image_converter.h │ │ ├── map_converter.h │ │ ├── native_window_converter.h │ │ ├── net_converter.h │ │ ├── network_converter.cc │ │ ├── network_converter.h │ │ ├── once_callback.h │ │ ├── string16_converter.h │ │ ├── ui_base_types_converter.h │ │ ├── v8_value_converter.cc │ │ ├── v8_value_converter.h │ │ ├── value_converter.cc │ │ └── value_converter.h │ ├── node_bindings.cc │ ├── node_bindings.h │ ├── node_bindings_linux.cc │ ├── node_bindings_linux.h │ ├── node_bindings_mac.cc │ ├── node_bindings_mac.h │ ├── node_bindings_win.cc │ ├── node_bindings_win.h │ ├── node_includes.h │ ├── options_switches.cc │ ├── options_switches.h │ ├── platform_util.h │ ├── platform_util_linux.cc │ ├── platform_util_mac.mm │ ├── platform_util_win.cc │ ├── promise_util.cc │ ├── promise_util.h │ ├── resources │ │ └── mac │ │ │ └── Info.plist │ ├── skia_util.cc │ └── skia_util.h ├── renderer │ ├── api │ │ ├── atom_api_renderer_ipc.cc │ │ ├── atom_api_spell_check_client.cc │ │ ├── atom_api_spell_check_client.h │ │ └── atom_api_web_frame.cc │ ├── atom_autofill_agent.cc │ ├── atom_autofill_agent.h │ ├── atom_render_frame_observer.cc │ ├── atom_render_frame_observer.h │ ├── atom_renderer_client.cc │ ├── atom_renderer_client.h │ ├── atom_sandboxed_renderer_client.cc │ ├── atom_sandboxed_renderer_client.h │ ├── content_settings_observer.cc │ ├── content_settings_observer.h │ ├── electron_api_service_impl.cc │ ├── electron_api_service_impl.h │ ├── extensions │ │ ├── atom_extensions_renderer_client.cc │ │ └── atom_extensions_renderer_client.h │ ├── guest_view_container.cc │ ├── guest_view_container.h │ ├── printing │ │ ├── print_render_frame_helper_delegate.cc │ │ └── print_render_frame_helper_delegate.h │ ├── renderer_client_base.cc │ ├── renderer_client_base.h │ ├── resources │ │ └── mac │ │ │ └── Info.plist │ ├── web_worker_observer.cc │ └── web_worker_observer.h └── utility │ ├── atom_content_utility_client.cc │ └── atom_content_utility_client.h ├── spec-main ├── .eslintrc ├── .gitignore ├── ambient.d.ts ├── api-app-spec.ts ├── api-auto-updater-spec.ts ├── api-autoupdater-darwin-spec.ts ├── api-browser-view-spec.ts ├── api-browser-window-affinity-spec.ts ├── api-browser-window-spec.ts ├── api-callbacks-registry-spec.ts ├── api-content-tracing-spec.ts ├── api-deprecate-spec.ts ├── api-desktop-capturer-spec.ts ├── api-dialog-spec.ts ├── api-global-shortcut-spec.ts ├── api-in-app-purchase-spec.ts ├── api-ipc-main-spec.ts ├── api-ipc-renderer-spec.ts ├── api-ipc-spec.ts ├── api-menu-item-spec.ts ├── api-menu-spec.ts ├── api-native-theme-spec.ts ├── api-net-log-spec.ts ├── api-net-spec.ts ├── api-notification-dbus-spec.ts ├── api-notification-spec.ts ├── api-power-monitor-spec.ts ├── api-power-save-blocker-spec.ts ├── api-protocol-spec.ts ├── api-remote-spec.ts ├── api-screen-spec.ts ├── api-session-spec.ts ├── api-shell-spec.ts ├── api-subframe-spec.ts ├── api-system-preferences-spec.ts ├── api-touch-bar-spec.ts ├── api-tray-spec.ts ├── api-view-spec.ts ├── api-web-contents-spec.ts ├── api-web-contents-view-spec.ts ├── api-web-request-spec.ts ├── chromium-spec.ts ├── content-script-spec.ts ├── events-helpers.ts ├── extensions-spec.ts ├── fixtures │ ├── api │ │ ├── leak-exit-webcontentsview.js │ │ └── net-log │ │ │ ├── main.js │ │ │ └── package.json │ ├── blank.html │ ├── chromium │ │ ├── other-window.js │ │ └── visibilitystate.html │ ├── extensions │ │ ├── chrome-runtime │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── chrome-storage │ │ │ ├── main.js │ │ │ └── manifest.json │ │ └── red-bg │ │ │ ├── main.js │ │ │ └── manifest.json │ └── sub-frames │ │ ├── frame-container-webview.html │ │ ├── frame-container.html │ │ ├── frame-with-frame-container-webview.html │ │ ├── frame-with-frame-container.html │ │ ├── frame-with-frame.html │ │ ├── frame.html │ │ ├── preload.js │ │ └── webview-iframe-preload.js ├── index.js ├── internal-spec.ts ├── node-spec.ts ├── package.json ├── security-warnings-spec.ts ├── spec-helpers.ts ├── types-spec.ts ├── version-bump-spec.ts ├── visibility-state-spec.ts ├── webview-spec.ts └── window-helpers.ts ├── spec ├── .eslintrc ├── BUILD.gn ├── api-clipboard-spec.js ├── api-crash-reporter-spec.js ├── api-debugger-spec.js ├── api-native-image-spec.js ├── api-process-spec.js ├── api-remote-spec.js ├── api-shell-spec.js ├── api-web-frame-spec.js ├── asar-spec.js ├── chromium-spec.js ├── configs │ ├── browsertests.yml │ └── unittests.yml ├── events-helpers.js ├── expect-helpers.js ├── fixtures │ ├── api │ │ ├── allocate-memory.html │ │ ├── app-path │ │ │ ├── lib │ │ │ │ └── index.js │ │ │ └── package.json │ │ ├── beforeunload-false-prevent3.html │ │ ├── beforeunload-false.html │ │ ├── blank.html │ │ ├── close-beforeunload-empty-string.html │ │ ├── close-beforeunload-false.html │ │ ├── close-beforeunload-undefined.html │ │ ├── close.html │ │ ├── command-line │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── cookie-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── crash-restart.html │ │ ├── crash.html │ │ ├── crash_child.html │ │ ├── default-menu │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── did-fail-load-iframe.html │ │ ├── electron-main-module │ │ │ ├── app.asar │ │ │ └── app │ │ │ │ ├── index.js │ │ │ │ └── node_modules │ │ │ │ └── some-module │ │ │ │ ├── main2.js │ │ │ │ └── package.json │ │ ├── electron-module-app │ │ │ ├── index.html │ │ │ └── node_modules │ │ │ │ ├── electron │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ │ │ └── foo │ │ │ │ ├── index.js │ │ │ │ └── package.json │ │ ├── execute-javascript.html │ │ ├── exit-closes-all-windows-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── frame-subscriber.html │ │ ├── gpu-info.js │ │ ├── ipc-main-listeners │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── isolated-fetch-preload.js │ │ ├── isolated-preload.js │ │ ├── isolated.html │ │ ├── leak-exit-browserview.js │ │ ├── leak-exit-webcontents.js │ │ ├── loaded-from-dataurl.js │ │ ├── locale-check │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── localstorage.html │ │ ├── mixed-sandbox-app │ │ │ ├── electron-app-mixed-sandbox-preload.js │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── native-window-open-argv.html │ │ ├── native-window-open-blank.html │ │ ├── native-window-open-child.html │ │ ├── native-window-open-cross-origin.html │ │ ├── native-window-open-file.html │ │ ├── native-window-open-iframe.html │ │ ├── native-window-open-isolated-preload.js │ │ ├── native-window-open-isolated.html │ │ ├── native-window-open-native-addon.html │ │ ├── native-window-open-no-allowpopups.html │ │ ├── new-window-preload.js │ │ ├── new-window-webview-preload.js │ │ ├── new-window-webview.html │ │ ├── new-window.html │ │ ├── no-leak.html │ │ ├── offscreen-rendering.html │ │ ├── picture-in-picture.html │ │ ├── preload.html │ │ ├── quit-app │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── relaunch │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── remote-event-handler.html │ │ ├── render-view-deleted.html │ │ ├── sandbox.html │ │ ├── send-sync-message.html │ │ ├── service-worker │ │ │ ├── service-worker.html │ │ │ └── service-worker.js │ │ ├── shared-worker │ │ │ ├── shared-worker.html │ │ │ ├── shared-worker1.js │ │ │ └── shared-worker2.js │ │ ├── singleton │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── site-instance-overrides │ │ │ ├── index.html │ │ │ ├── main.js │ │ │ ├── package.json │ │ │ └── preload.js │ │ ├── unload.html │ │ ├── window-all-closed │ │ │ ├── main.js │ │ │ └── package.json │ │ ├── window-open-location-change.html │ │ ├── window-open-location-final.html │ │ ├── window-open-location-open.html │ │ └── window-open-preload.js │ ├── assets │ │ ├── 1x1.png │ │ ├── 2x2.jpg │ │ ├── 3x3.png │ │ ├── LICENSE │ │ ├── cat.pdf │ │ ├── icon.ico │ │ ├── logo.png │ │ ├── logo_Template.png │ │ ├── shortcut.lnk │ │ └── tone.wav │ ├── auto-update │ │ ├── check │ │ │ ├── index.js │ │ │ └── package.json │ │ ├── initial │ │ │ ├── index.js │ │ │ └── package.json │ │ └── update │ │ │ ├── index.js │ │ │ └── package.json │ ├── certificates │ │ ├── certs.cnf │ │ ├── client.p12 │ │ ├── generate_certs.sh │ │ ├── intermediateCA.pem │ │ ├── rootCA.pem │ │ ├── server.key │ │ └── server.pem │ ├── crash-app │ │ ├── main.js │ │ └── package.json │ ├── devtools-extensions │ │ ├── bad-manifest │ │ │ └── manifest.json │ │ └── foo │ │ │ ├── _locales │ │ │ └── en │ │ │ │ └── messages.json │ │ │ ├── foo.html │ │ │ ├── index.html │ │ │ └── manifest.json │ ├── extensions │ │ ├── chrome-api │ │ │ ├── background.js │ │ │ ├── main.js │ │ │ └── manifest.json │ │ ├── content-script-document-end │ │ │ ├── end.js │ │ │ └── manifest.json │ │ ├── content-script-document-idle │ │ │ ├── idle.js │ │ │ └── manifest.json │ │ ├── content-script-document-start │ │ │ ├── manifest.json │ │ │ └── start.js │ │ └── content-script │ │ │ ├── all_frames-disabled.css │ │ │ ├── all_frames-enabled.css │ │ │ ├── all_frames-preload.js │ │ │ ├── frame-with-frame.html │ │ │ ├── frame.html │ │ │ └── manifest.json │ ├── module │ │ ├── access-blink-apis.js │ │ ├── answer.js │ │ ├── asar.js │ │ ├── call.js │ │ ├── check-arguments.js │ │ ├── circular.js │ │ ├── class.js │ │ ├── crash.js │ │ ├── create_socket.js │ │ ├── declare-buffer.js │ │ ├── declare-global.js │ │ ├── declare-process.js │ │ ├── delay-exit.js │ │ ├── delete-buffer.js │ │ ├── echo-renamed.js │ │ ├── echo.js │ │ ├── empty.js │ │ ├── error-properties.js │ │ ├── exception.js │ │ ├── export-function-with-properties.js │ │ ├── fork_ping.js │ │ ├── function-with-args.js │ │ ├── function-with-missing-properties.js │ │ ├── function-with-properties.js │ │ ├── function.js │ │ ├── get-global-preload.js │ │ ├── hello-child.js │ │ ├── hello.js │ │ ├── id.js │ │ ├── inspector-binding.js │ │ ├── isolated-ping.js │ │ ├── locale-compare.js │ │ ├── no-asar.js │ │ ├── no-prototype.js │ │ ├── noop.js │ │ ├── original-fs.js │ │ ├── ping.js │ │ ├── preload-context.js │ │ ├── preload-disable-remote.js │ │ ├── preload-error-exception.js │ │ ├── preload-error-syntax.js │ │ ├── preload-ipc-ping-pong.js │ │ ├── preload-ipc.js │ │ ├── preload-node-off-wrapper.js │ │ ├── preload-node-off.js │ │ ├── preload-pdf-loaded-in-nested-subframe.js │ │ ├── preload-pdf-loaded-in-subframe.js │ │ ├── preload-pdf-loaded.js │ │ ├── preload-remote-function.js │ │ ├── preload-remote.js │ │ ├── preload-required-module.js │ │ ├── preload-sandbox.js │ │ ├── preload-sandboxæø åü.js │ │ ├── preload-set-global.js │ │ ├── preload-webview.js │ │ ├── preload.js │ │ ├── print_name.js │ │ ├── process-stdout.js │ │ ├── process_args.js │ │ ├── promise.js │ │ ├── property.js │ │ ├── rejected-promise.js │ │ ├── remote-object-set.js │ │ ├── remote-static.js │ │ ├── run-as-node.js │ │ ├── send-later.js │ │ ├── set-global-preload-1.js │ │ ├── set-global-preload-2.js │ │ ├── set-global-preload-3.js │ │ ├── set-global.js │ │ ├── set-immediate.js │ │ ├── test.coffee │ │ ├── to-string-non-function.js │ │ └── unhandled-rejection.js │ ├── native-addon │ │ └── echo │ │ │ ├── binding.cc │ │ │ ├── binding.gyp │ │ │ ├── lib │ │ │ └── echo.js │ │ │ └── package.json │ ├── no-proprietary-codecs.js │ ├── pages │ │ ├── a.html │ │ ├── b.html │ │ ├── base-page-security-onload-message.html │ │ ├── base-page-security.html │ │ ├── base-page.html │ │ ├── basic-auth.html │ │ ├── beforeunload-false.html │ │ ├── blank.html │ │ ├── c.html │ │ ├── cache-storage.html │ │ ├── close.html │ │ ├── content.html │ │ ├── d.html │ │ ├── did-get-response-details.html │ │ ├── dom-ready.html │ │ ├── e.html │ │ ├── external-string.html │ │ ├── filesystem.html │ │ ├── focus-web-contents.html │ │ ├── fullscreen.html │ │ ├── geolocation │ │ │ └── index.html │ │ ├── history-replace.html │ │ ├── history.html │ │ ├── insecure-resources.html │ │ ├── ipc-message.html │ │ ├── jquery.html │ │ ├── key-events.html │ │ ├── media-id-reset.html │ │ ├── native-module.html │ │ ├── onkeyup.html │ │ ├── onmouseup.html │ │ ├── partition │ │ │ └── one.html │ │ ├── pdf-in-iframe.html │ │ ├── pdf-in-nested-iframe.html │ │ ├── permissions │ │ │ ├── geolocation.html │ │ │ ├── media.html │ │ │ ├── midi-sysex.html │ │ │ ├── midi.html │ │ │ └── notification.html │ │ ├── ping.html │ │ ├── post.html │ │ ├── process-exit.html │ │ ├── referrer.html │ │ ├── resize.html │ │ ├── save_page │ │ │ ├── index.html │ │ │ ├── test.css │ │ │ └── test.js │ │ ├── send-after-node.html │ │ ├── service-worker │ │ │ ├── index.html │ │ │ └── service-worker.js │ │ ├── set-global.html │ │ ├── shared_worker.html │ │ ├── storage │ │ │ ├── cookie.html │ │ │ ├── indexed_db.html │ │ │ ├── local_storage.html │ │ │ ├── session_storage.html │ │ │ └── web_sql.html │ │ ├── tab-focus-loop-elements-wv.html │ │ ├── tab-focus-loop-elements.html │ │ ├── target-name.html │ │ ├── theme-color.html │ │ ├── useragent.html │ │ ├── visibilitychange.html │ │ ├── webframe-spell-check.html │ │ ├── webframe-zoom.html │ │ ├── webview-allowpopups.html │ │ ├── webview-custom-zoom-level.html │ │ ├── webview-devtools.html │ │ ├── webview-did-attach-event.html │ │ ├── webview-did-navigate-in-page-with-hash.html │ │ ├── webview-did-navigate-in-page-with-history.html │ │ ├── webview-did-navigate-in-page.html │ │ ├── webview-guest-resize.html │ │ ├── webview-in-page-navigate.html │ │ ├── webview-isolated.html │ │ ├── webview-no-node-integration-on-window.html │ │ ├── webview-no-script.html │ │ ├── webview-opener-no-node-integration.html │ │ ├── webview-opener-postMessage.html │ │ ├── webview-origin-zoom-level.html │ │ ├── webview-stripped-preload.html │ │ ├── webview-visibilitychange.html │ │ ├── webview-will-navigate.html │ │ ├── webview-zoom-factor.html │ │ ├── will-navigate.html │ │ ├── window-no-javascript.html │ │ ├── window-open-hide.html │ │ ├── window-open-postMessage-driver.html │ │ ├── window-open-postMessage.html │ │ ├── window-open-size.html │ │ ├── window-open.html │ │ ├── window-opener-location.html │ │ ├── window-opener-no-node-integration.html │ │ ├── window-opener-no-web-view-tag.html │ │ ├── window-opener-no-webview-tag.html │ │ ├── window-opener-node.html │ │ ├── window-opener-postMessage.html │ │ ├── window-opener-targetOrigin.html │ │ ├── window-opener-web-view.html │ │ ├── window-opener-webview.html │ │ ├── window-opener.html │ │ ├── window-print.html │ │ ├── worker.html │ │ └── zoom-factor.html │ ├── snapshot-items-available │ │ ├── main.js │ │ └── package.json │ ├── test.asar │ │ ├── a.asar │ │ ├── echo.asar │ │ ├── empty.asar │ │ ├── file │ │ ├── logo.asar │ │ ├── script.asar │ │ ├── unpack.asar │ │ ├── unpack.asar.unpacked │ │ │ ├── a.txt │ │ │ └── atom.png │ │ ├── video.asar │ │ └── web.asar │ ├── testsnap.js │ ├── workers │ │ ├── shared_worker.js │ │ ├── shared_worker_node.js │ │ ├── worker.js │ │ └── worker_node.js │ └── zip │ │ └── a.zip ├── modules-spec.js ├── node-spec.js ├── package.json ├── spec-helpers.js ├── static │ ├── index.html │ ├── jquery-2.0.3.min.js │ └── main.js ├── ts-smoke │ ├── electron │ │ ├── main.ts │ │ └── renderer.ts │ ├── runner.js │ └── tsconfig.json ├── webview-spec.js ├── window-helpers.js └── yarn.lock ├── tools ├── js2c.py ├── run-if-exists.js └── xvfb-init.sh ├── tsconfig.default_app.json ├── tsconfig.electron.json ├── tsconfig.json ├── tsconfig.spec.json ├── typings ├── internal-ambient.d.ts └── internal-electron.d.ts ├── vendor └── third_party │ └── lss │ └── linux_syscall_support.h ├── vsts-arm-test-steps.yml ├── vsts-arm32v7.yml ├── vsts-arm64v8.yml └── yarn.lock /.dockerignore: -------------------------------------------------------------------------------- 1 | * 2 | !tools/xvfb-init.sh 3 | !build/install-build-deps.sh 4 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | # These env vars are only necessary for creating Electron releases. 2 | # See docs/development/releasing.md 3 | 4 | APPVEYOR_CLOUD_TOKEN= 5 | CIRCLE_TOKEN= 6 | ELECTRON_GITHUB_TOKEN= 7 | VSTS_TOKEN= -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # `git apply` and friends don't understand CRLF, even on windows. Force those 2 | # files to be checked out with LF endings even if core.autocrlf is true. 3 | *.patch text eol=lf 4 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/security_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Security report 3 | about: Do not create an issue for security reports, send an email to security@electronjs.org 4 | 5 | --- 6 | 7 | ### Notice 8 | 9 | **DO NOT** create an issue for security reports. 10 | Send an email to: **security@electronjs.org**. 11 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "vendor/requests"] 2 | path = vendor/requests 3 | url = https://github.com/kennethreitz/requests 4 | [submodule "vendor/boto"] 5 | path = vendor/boto 6 | url = https://github.com/boto/boto.git 7 | -------------------------------------------------------------------------------- /.remarkrc: -------------------------------------------------------------------------------- 1 | { 2 | "plugins": [ 3 | ["remark-lint-code-block-style", "fenced"], 4 | ["remark-lint-fenced-code-flag"] 5 | ] 6 | } -------------------------------------------------------------------------------- /ELECTRON_VERSION: -------------------------------------------------------------------------------- 1 | 8.0.0-nightly.20191002 -------------------------------------------------------------------------------- /build/args/debug.gn: -------------------------------------------------------------------------------- 1 | import("all.gn") 2 | is_debug = true 3 | is_component_build = true 4 | 5 | # This may be guarded behind is_chrome_branded alongside 6 | # proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321, 7 | # explicitly override here to build OpenH264 encoder/FFmpeg decoder. 8 | # The initialization of the decoder depends on whether ffmpeg has 9 | # been built with H.264 support. 10 | rtc_use_h264 = proprietary_codecs 11 | -------------------------------------------------------------------------------- /build/args/ffmpeg.gn: -------------------------------------------------------------------------------- 1 | import("all.gn") 2 | is_component_build = false 3 | is_component_ffmpeg = true 4 | is_official_build = true 5 | proprietary_codecs = false 6 | ffmpeg_branding = "Chromium" 7 | enable_dsyms = false 8 | -------------------------------------------------------------------------------- /build/args/native_tests.gn: -------------------------------------------------------------------------------- 1 | root_extra_deps = [ "//electron/spec" ] 2 | 3 | dcheck_always_on = true 4 | is_debug = false 5 | is_component_build = false 6 | is_component_ffmpeg = false 7 | symbol_level = 1 8 | use_jumbo_build = true 9 | -------------------------------------------------------------------------------- /build/args/testing.gn: -------------------------------------------------------------------------------- 1 | import("all.gn") 2 | is_debug = false 3 | is_component_build = false 4 | is_component_ffmpeg = true 5 | is_official_build = false 6 | dcheck_always_on = true 7 | symbol_level = 1 8 | 9 | # This may be guarded behind is_chrome_branded alongside 10 | # proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321, 11 | # explicitly override here to build OpenH264 encoder/FFmpeg decoder. 12 | # The initialization of the decoder depends on whether ffmpeg has 13 | # been built with H.264 support. 14 | rtc_use_h264 = proprietary_codecs 15 | -------------------------------------------------------------------------------- /build/electron.def: -------------------------------------------------------------------------------- 1 | ; This is to support renaming of electron.exe. node-gyp has hard-coded 2 | ; executable names which it will recognise as node. This module definition 3 | ; file claims that the electron executable is in fact named "node.exe", 4 | ; which is one of the executable names that node-gyp recognizes. 5 | ; See https://github.com/nodejs/node-gyp/commit/52ceec3a6d15de3a8f385f43dbe5ecf5456ad07a 6 | NAME node.exe 7 | -------------------------------------------------------------------------------- /build/generate-template.py: -------------------------------------------------------------------------------- 1 | import json 2 | import sys 3 | from string import Template 4 | 5 | inpath = sys.argv[1] 6 | outpath = sys.argv[2] 7 | argpaths = sys.argv[3:] 8 | 9 | with open(inpath, 'r') as infile, open(outpath, 'w') as outfile: 10 | data = {} 11 | for argpath in argpaths: 12 | with open(argpath, 'r') as argfile: 13 | data.update(json.load(argfile)) 14 | 15 | s = Template(infile.read()).substitute(data) 16 | outfile.write(s) 17 | -------------------------------------------------------------------------------- /build/npm-run.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from __future__ import print_function 3 | import os 4 | import subprocess 5 | import sys 6 | 7 | SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) 8 | cmd = "npm" 9 | if sys.platform == "win32": 10 | cmd += ".cmd" 11 | args = [cmd, "run", 12 | "--prefix", 13 | SOURCE_ROOT 14 | ] + sys.argv[1:] 15 | try: 16 | subprocess.check_output(args, stderr=subprocess.STDOUT) 17 | except subprocess.CalledProcessError as e: 18 | print("NPM script '" + sys.argv[2] + "' failed with code '" + str(e.returncode) + "':\n" + e.output) 19 | sys.exit(e.returncode) 20 | -------------------------------------------------------------------------------- /build/run-in-dir.py: -------------------------------------------------------------------------------- 1 | import sys 2 | import os 3 | import subprocess 4 | 5 | def main(argv): 6 | cwd = argv[1] 7 | os.chdir(cwd) 8 | os.execv(sys.executable, [sys.executable] + argv[2:]) 9 | 10 | if __name__ == '__main__': 11 | main(sys.argv) 12 | -------------------------------------------------------------------------------- /build/run-node.py: -------------------------------------------------------------------------------- 1 | import os 2 | import subprocess 3 | import sys 4 | 5 | 6 | SOURCE_ROOT = os.path.dirname(os.path.dirname(__file__)) 7 | 8 | def main(): 9 | # Proxy all args to node script 10 | script = os.path.join(SOURCE_ROOT, sys.argv[1]) 11 | subprocess.check_call(['node', script] + [str(x) for x in sys.argv[2:]]) 12 | 13 | if __name__ == '__main__': 14 | sys.exit(main()) 15 | -------------------------------------------------------------------------------- /build/webpack/get-outputs.js: -------------------------------------------------------------------------------- 1 | process.env.PRINT_WEBPACK_GRAPH = true 2 | require('./run-compiler') 3 | -------------------------------------------------------------------------------- /build/webpack/run-compiler.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const webpack = require('webpack') 3 | 4 | const configPath = process.argv[2] 5 | const outPath = path.resolve(process.argv[3]) 6 | const config = require(configPath) 7 | config.output = { 8 | path: path.dirname(outPath), 9 | filename: path.basename(outPath) 10 | } 11 | 12 | webpack(config, (err, stats) => { 13 | if (err) { 14 | console.error(err) 15 | process.exit(1) 16 | } else if (stats.hasErrors()) { 17 | console.error(stats.toString('normal')) 18 | process.exit(1) 19 | } else { 20 | process.exit(0) 21 | } 22 | }) 23 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.browser.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'browser', 3 | alwaysHasNode: true 4 | }) 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.content_script.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'content_script', 3 | alwaysHasNode: false 4 | }) 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.isolated_renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'isolated_renderer', 3 | alwaysHasNode: false 4 | }) 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'renderer', 3 | alwaysHasNode: true, 4 | targetDeletesNodeGlobals: true 5 | }) 6 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.sandboxed_renderer.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'sandboxed_renderer', 3 | alwaysHasNode: false 4 | }) 5 | -------------------------------------------------------------------------------- /build/webpack/webpack.config.worker.js: -------------------------------------------------------------------------------- 1 | module.exports = require('./webpack.config.base')({ 2 | target: 'worker', 3 | loadElectronFromAlternateTarget: 'renderer', 4 | alwaysHasNode: true, 5 | targetDeletesNodeGlobals: true 6 | }) 7 | -------------------------------------------------------------------------------- /default_app/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/default_app/icon.png -------------------------------------------------------------------------------- /default_app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "productName": "Electron", 4 | "main": "main.js" 5 | } 6 | -------------------------------------------------------------------------------- /docs/api/structures/bluetooth-device.md: -------------------------------------------------------------------------------- 1 | # BluetoothDevice Object 2 | 3 | * `deviceName` String 4 | * `deviceId` String 5 | -------------------------------------------------------------------------------- /docs/api/structures/certificate-principal.md: -------------------------------------------------------------------------------- 1 | # CertificatePrincipal Object 2 | 3 | * `commonName` String - Common Name. 4 | * `organizations` String[] - Organization names. 5 | * `organizationUnits` String[] - Organization Unit names. 6 | * `locality` String - Locality. 7 | * `state` String - State or province. 8 | * `country` String - Country or region. 9 | -------------------------------------------------------------------------------- /docs/api/structures/certificate.md: -------------------------------------------------------------------------------- 1 | # Certificate Object 2 | 3 | * `data` String - PEM encoded data 4 | * `issuer` [CertificatePrincipal](certificate-principal.md) - Issuer principal 5 | * `issuerName` String - Issuer's Common Name 6 | * `issuerCert` Certificate - Issuer certificate (if not self-signed) 7 | * `subject` [CertificatePrincipal](certificate-principal.md) - Subject principal 8 | * `subjectName` String - Subject's Common Name 9 | * `serialNumber` String - Hex value represented string 10 | * `validStart` Number - Start date of the certificate being valid in seconds 11 | * `validExpiry` Number - End date of the certificate being valid in seconds 12 | * `fingerprint` String - Fingerprint of the certificate 13 | -------------------------------------------------------------------------------- /docs/api/structures/cpu-usage.md: -------------------------------------------------------------------------------- 1 | # CPUUsage Object 2 | 3 | * `percentCPUUsage` Number - Percentage of CPU used since the last call to getCPUUsage. 4 | First call returns 0. 5 | * `idleWakeupsPerSecond` Number - The number of average idle CPU wakeups per second 6 | since the last call to getCPUUsage. First call returns 0. Will always return 0 on 7 | Windows. 8 | -------------------------------------------------------------------------------- /docs/api/structures/crash-report.md: -------------------------------------------------------------------------------- 1 | # CrashReport Object 2 | 3 | * `date` Date 4 | * `id` String 5 | -------------------------------------------------------------------------------- /docs/api/structures/custom-scheme.md: -------------------------------------------------------------------------------- 1 | # CustomScheme Object 2 | 3 | * `scheme` String - Custom schemes to be registered with options. 4 | * `privileges` Object (optional) 5 | * `standard` Boolean (optional) - Default false. 6 | * `secure` Boolean (optional) - Default false. 7 | * `bypassCSP` Boolean (optional) - Default false. 8 | * `allowServiceWorkers` Boolean (optional) - Default false. 9 | * `supportFetchAPI` Boolean (optional) - Default false. 10 | * `corsEnabled` Boolean (optional) - Default false. 11 | -------------------------------------------------------------------------------- /docs/api/structures/event.md: -------------------------------------------------------------------------------- 1 | # Event Object extends `GlobalEvent` 2 | 3 | * `preventDefault` VoidFunction 4 | -------------------------------------------------------------------------------- /docs/api/structures/extension-info.md: -------------------------------------------------------------------------------- 1 | # ExtensionInfo Object 2 | 3 | * `name` String 4 | * `version` String 5 | -------------------------------------------------------------------------------- /docs/api/structures/file-filter.md: -------------------------------------------------------------------------------- 1 | # FileFilter Object 2 | 3 | * `name` String 4 | * `extensions` String[] 5 | -------------------------------------------------------------------------------- /docs/api/structures/file-path-with-headers.md: -------------------------------------------------------------------------------- 1 | # FilePathWithHeaders Object 2 | 3 | * `path` String - The path to the file to send. 4 | * `headers` Record (optional) - Additional headers to be sent. 5 | -------------------------------------------------------------------------------- /docs/api/structures/input-event.md: -------------------------------------------------------------------------------- 1 | # InputEvent Object 2 | 3 | * `modifiers` String[] (optional) - An array of modifiers of the event, can 4 | be `shift`, `control`, `ctrl`, `alt`, `meta`, `command`, `cmd`, `isKeypad`, 5 | `isAutoRepeat`, `leftButtonDown`, `middleButtonDown`, `rightButtonDown`, 6 | `capsLock`, `numLock`, `left`, `right`. 7 | -------------------------------------------------------------------------------- /docs/api/structures/io-counters.md: -------------------------------------------------------------------------------- 1 | # IOCounters Object 2 | 3 | * `readOperationCount` Number - The number of I/O read operations. 4 | * `writeOperationCount` Number - The number of I/O write operations. 5 | * `otherOperationCount` Number - Then number of I/O other operations. 6 | * `readTransferCount` Number - The number of I/O read transfers. 7 | * `writeTransferCount` Number - The number of I/O write transfers. 8 | * `otherTransferCount` Number - Then number of I/O other transfers. 9 | -------------------------------------------------------------------------------- /docs/api/structures/ipc-main-event.md: -------------------------------------------------------------------------------- 1 | # IpcMainEvent Object extends `Event` 2 | 3 | * `frameId` Integer - The ID of the renderer frame that sent this message 4 | * `returnValue` any - Set this to the value to be returned in a synchronous message 5 | * `sender` WebContents - Returns the `webContents` that sent the message 6 | * `reply` Function - A function that will send an IPC message to the renderer frame that sent the original message that you are currently handling. You should use this method to "reply" to the sent message in order to guarantee the reply will go to the correct process and frame. 7 | * `...args` any[] 8 | -------------------------------------------------------------------------------- /docs/api/structures/ipc-main-invoke-event.md: -------------------------------------------------------------------------------- 1 | # IpcMainInvokeEvent Object extends `Event` 2 | 3 | * `frameId` Integer - The ID of the renderer frame that sent this message 4 | * `sender` WebContents - Returns the `webContents` that sent the message 5 | -------------------------------------------------------------------------------- /docs/api/structures/ipc-renderer-event.md: -------------------------------------------------------------------------------- 1 | # IpcRendererEvent Object extends `Event` 2 | 3 | * `sender` IpcRenderer - The `IpcRenderer` instance that emitted the event originally 4 | * `senderId` Integer - The `webContents.id` that sent the message, you can call `event.sender.sendTo(event.senderId, ...)` to reply to the message, see [ipcRenderer.sendTo][ipc-renderer-sendto] for more information. This only applies to messages sent from a different renderer. Messages sent directly from the main process set `event.senderId` to `0`. 5 | 6 | [ipc-renderer-sendto]: #ipcrenderersendtowindowid-channel--arg1-arg2- 7 | -------------------------------------------------------------------------------- /docs/api/structures/keyboard-event.md: -------------------------------------------------------------------------------- 1 | # KeyboardEvent Object extends `Event` 2 | 3 | * `ctrlKey` Boolean (optional) - whether the Control key was used in an accelerator to trigger the Event 4 | * `metaKey` Boolean (optional) - whether a meta key was used in an accelerator to trigger the Event 5 | * `shiftKey` Boolean (optional) - whether a Shift key was used in an accelerator to trigger the Event 6 | * `altKey` Boolean (optional) - whether an Alt key was used in an accelerator to trigger the Event 7 | * `triggeredByAccelerator` Boolean (optional) - whether an accelerator was used to trigger the event as opposed to another user gesture like mouse click 8 | -------------------------------------------------------------------------------- /docs/api/structures/keyboard-input-event.md: -------------------------------------------------------------------------------- 1 | # KeyboardInputEvent Object extends `InputEvent` 2 | 3 | * `type` String - The type of the event, can be `keyDown`, `keyUp` or `char`. 4 | * `keyCode` String - The character that will be sent 5 | as the keyboard event. Should only use the valid key codes in 6 | [Accelerator](../accelerator.md). 7 | -------------------------------------------------------------------------------- /docs/api/structures/memory-info.md: -------------------------------------------------------------------------------- 1 | # MemoryInfo Object 2 | 3 | * `workingSetSize` Integer - The amount of memory currently pinned to actual physical RAM. 4 | * `peakWorkingSetSize` Integer - The maximum amount of memory that has ever been pinned 5 | to actual physical RAM. 6 | * `privateBytes` Integer (optional) _Windows_ - The amount of memory not shared by other processes, such as 7 | JS heap or HTML content. 8 | 9 | Note that all statistics are reported in Kilobytes. 10 | -------------------------------------------------------------------------------- /docs/api/structures/memory-usage-details.md: -------------------------------------------------------------------------------- 1 | # MemoryUsageDetails Object 2 | 3 | * `count` Number 4 | * `size` Number 5 | * `liveSize` Number 6 | -------------------------------------------------------------------------------- /docs/api/structures/mime-typed-buffer.md: -------------------------------------------------------------------------------- 1 | # MimeTypedBuffer Object 2 | 3 | * `mimeType` String - The mimeType of the Buffer that you are sending. 4 | * `data` Buffer - The actual Buffer content. 5 | -------------------------------------------------------------------------------- /docs/api/structures/mouse-input-event.md: -------------------------------------------------------------------------------- 1 | # MouseInputEvent Object extends `InputEvent` 2 | 3 | * `type` String - The type of the event, can be `mouseDown`, 4 | `mouseUp`, `mouseEnter`, `mouseLeave`, `contextMenu`, `mouseWheel` or `mouseMove`. 5 | * `x` Integer 6 | * `y` Integer 7 | * `button` String (optional) - The button pressed, can be `left`, `middle`, `right`. 8 | * `globalX` Integer (optional) 9 | * `globalY` Integer (optional) 10 | * `movementX` Integer (optional) 11 | * `movementY` Integer (optional) 12 | * `clickCount` Integer (optional) 13 | -------------------------------------------------------------------------------- /docs/api/structures/mouse-wheel-input-event.md: -------------------------------------------------------------------------------- 1 | # MouseWheelInputEvent Object extends `MouseInputEvent` 2 | 3 | * `type` String - The type of the event, can be `mouseWheel`. 4 | * `deltaX` Integer (optional) 5 | * `deltaY` Integer (optional) 6 | * `wheelTicksX` Integer (optional) 7 | * `wheelTicksY` Integer (optional) 8 | * `accelerationRatioX` Integer (optional) 9 | * `accelerationRatioY` Integer (optional) 10 | * `hasPreciseScrollingDeltas` Boolean (optional) 11 | * `canScroll` Boolean (optional) 12 | -------------------------------------------------------------------------------- /docs/api/structures/point.md: -------------------------------------------------------------------------------- 1 | # Point Object 2 | 3 | * `x` Number 4 | * `y` Number 5 | 6 | **Note:** Both `x` and `y` must be whole integers, when providing a point object 7 | as input to an Electron API we will automatically round your `x` and `y` values 8 | to the nearest whole integer. 9 | -------------------------------------------------------------------------------- /docs/api/structures/process-memory-info.md: -------------------------------------------------------------------------------- 1 | # ProcessMemoryInfo Object 2 | 3 | * `residentSet` Integer _Linux_ _Windows_ - The amount of memory 4 | currently pinned to actual physical RAM in Kilobytes. 5 | * `private` Integer - The amount of memory not shared by other processes, such as JS heap or HTML content in Kilobytes. 6 | * `shared` Integer - The amount of memory shared between processes, typically 7 | memory consumed by the Electron code itself in Kilobytes. 8 | -------------------------------------------------------------------------------- /docs/api/structures/protocol-request.md: -------------------------------------------------------------------------------- 1 | # ProtocolRequest Object 2 | 3 | * `url` String 4 | * `referrer` String 5 | * `method` String 6 | * `uploadData` [UploadData[]](upload-data.md) (optional) 7 | -------------------------------------------------------------------------------- /docs/api/structures/protocol-response-upload-data.md: -------------------------------------------------------------------------------- 1 | # ProtocolResponseUploadData Object 2 | 3 | * `contentType` String - MIME type of the content. 4 | * `data` String - Content to be sent. 5 | -------------------------------------------------------------------------------- /docs/api/structures/rectangle.md: -------------------------------------------------------------------------------- 1 | # Rectangle Object 2 | 3 | * `x` Number - The x coordinate of the origin of the rectangle (must be an integer). 4 | * `y` Number - The y coordinate of the origin of the rectangle (must be an integer). 5 | * `width` Number - The width of the rectangle (must be an integer). 6 | * `height` Number - The height of the rectangle (must be an integer). 7 | -------------------------------------------------------------------------------- /docs/api/structures/referrer.md: -------------------------------------------------------------------------------- 1 | # Referrer Object 2 | 3 | * `url` String - HTTP Referrer URL. 4 | * `policy` String - Can be `default`, `unsafe-url`, 5 | `no-referrer-when-downgrade`, `no-referrer`, `origin`, 6 | `strict-origin-when-cross-origin`, `same-origin` or `strict-origin`. 7 | See the [Referrer-Policy spec][1] for more details on the 8 | meaning of these values. 9 | 10 | [1]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referrer-Policy 11 | -------------------------------------------------------------------------------- /docs/api/structures/remove-client-certificate.md: -------------------------------------------------------------------------------- 1 | # RemoveClientCertificate Object 2 | 3 | * `type` String - `clientCertificate`. 4 | * `origin` String - Origin of the server whose associated client certificate 5 | must be removed from the cache. 6 | -------------------------------------------------------------------------------- /docs/api/structures/scrubber-item.md: -------------------------------------------------------------------------------- 1 | # ScrubberItem Object 2 | 3 | * `label` String (optional) - The text to appear in this item. 4 | * `icon` NativeImage (optional) - The image to appear in this item. 5 | -------------------------------------------------------------------------------- /docs/api/structures/segmented-control-segment.md: -------------------------------------------------------------------------------- 1 | # SegmentedControlSegment Object 2 | 3 | * `label` String (optional) - The text to appear in this segment. 4 | * `icon` NativeImage (optional) - The image to appear in this segment. 5 | * `enabled` Boolean (optional) - Whether this segment is selectable. Default: true. 6 | -------------------------------------------------------------------------------- /docs/api/structures/shared-worker-info.md: -------------------------------------------------------------------------------- 1 | # SharedWorkerInfo Object 2 | 3 | * `id` String - The unique id of the shared worker. 4 | * `url` String - The url of the shared worker. 5 | -------------------------------------------------------------------------------- /docs/api/structures/size.md: -------------------------------------------------------------------------------- 1 | # Size Object 2 | 3 | * `width` Number 4 | * `height` Number 5 | -------------------------------------------------------------------------------- /docs/api/structures/stream-protocol-response.md: -------------------------------------------------------------------------------- 1 | # StreamProtocolResponse Object 2 | 3 | * `statusCode` Number (optional) - The HTTP response code. 4 | * `headers` Record (optional) - An object containing the response headers. 5 | * `data` ReadableStream | null - A Node.js readable stream representing the response body. 6 | -------------------------------------------------------------------------------- /docs/api/structures/string-protocol-response.md: -------------------------------------------------------------------------------- 1 | # StringProtocolResponse Object 2 | 3 | * `mimeType` String (optional) - MIME type of the response. 4 | * `charset` String (optional) - Charset of the response. 5 | * `data` String | null - A string representing the response body. 6 | -------------------------------------------------------------------------------- /docs/api/structures/upload-blob.md: -------------------------------------------------------------------------------- 1 | # UploadBlob Object 2 | 3 | * `type` String - `blob`. 4 | * `blobUUID` String - UUID of blob data to upload. 5 | -------------------------------------------------------------------------------- /docs/api/structures/upload-data.md: -------------------------------------------------------------------------------- 1 | # UploadData Object 2 | 3 | * `bytes` Buffer - Content being sent. 4 | * `file` String (optional) - Path of file being uploaded. 5 | * `blobUUID` String (optional) - UUID of blob data. Use [ses.getBlobData](../session.md#sesgetblobdataidentifier) method 6 | to retrieve the data. 7 | -------------------------------------------------------------------------------- /docs/api/structures/upload-file.md: -------------------------------------------------------------------------------- 1 | # UploadFile Object 2 | 3 | * `type` String - `file`. 4 | * `filePath` String - Path of file to be uploaded. 5 | * `offset` Integer - Defaults to `0`. 6 | * `length` Integer - Number of bytes to read from `offset`. 7 | Defaults to `0`. 8 | * `modificationTime` Double - Last Modification time in 9 | number of seconds since the UNIX epoch. 10 | -------------------------------------------------------------------------------- /docs/api/structures/upload-raw-data.md: -------------------------------------------------------------------------------- 1 | # UploadRawData Object 2 | 3 | * `type` String - `rawData`. 4 | * `bytes` Buffer - Data to be uploaded. 5 | -------------------------------------------------------------------------------- /docs/api/structures/web-source.md: -------------------------------------------------------------------------------- 1 | # WebSource Object 2 | 3 | * `code` String 4 | * `url` String (optional) 5 | * `startLine` Integer (optional) - Default is 1. 6 | -------------------------------------------------------------------------------- /docs/api/touch-bar-group.md: -------------------------------------------------------------------------------- 1 | ## Class: TouchBarGroup 2 | 3 | > Create a group in the touch bar for native macOS applications 4 | 5 | Process: [Main](../tutorial/application-architecture.md#main-and-renderer-processes) 6 | 7 | ### `new TouchBarGroup(options)` _Experimental_ 8 | 9 | * `options` Object 10 | * `items` [TouchBar](touch-bar.md) - Items to display as a group. 11 | -------------------------------------------------------------------------------- /docs/api/touch-bar-spacer.md: -------------------------------------------------------------------------------- 1 | ## Class: TouchBarSpacer 2 | 3 | > Create a spacer between two items in the touch bar for native macOS applications 4 | 5 | Process: [Main](../tutorial/application-architecture.md#main-and-renderer-processes) 6 | 7 | ### `new TouchBarSpacer(options)` _Experimental_ 8 | 9 | * `options` Object 10 | * `size` String (optional) - Size of spacer, possible values are: 11 | * `small` - Small space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceSmall`. This is the default. 12 | * `large` - Large space between items. Maps to `NSTouchBarItemIdentifierFixedSpaceLarge`. 13 | * `flexible` - Take up all available space. Maps to `NSTouchBarItemIdentifierFlexibleSpace`. 14 | -------------------------------------------------------------------------------- /docs/development/chromium-development.md: -------------------------------------------------------------------------------- 1 | # Chromium Development 2 | 3 | > A collection of resources for learning about Chromium and tracking its development 4 | 5 | - [@ChromiumDev](https://twitter.com/ChromiumDev) on Twitter 6 | - [@googlechrome](https://twitter.com/googlechrome) on Twitter 7 | - [Blog](https://blog.chromium.org) 8 | - [Code Search](https://cs.chromium.org/) 9 | - [Source Code](https://cs.chromium.org/chromium/src/) 10 | - [Development Calendar and Release Info](https://www.chromium.org/developers/calendar) 11 | - [Discussion Groups](http://www.chromium.org/developers/discussion-groups) 12 | 13 | See also [V8 Development](v8-development.md) 14 | -------------------------------------------------------------------------------- /docs/images/subpixel-rendering-screenshot.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/subpixel-rendering-screenshot.gif -------------------------------------------------------------------------------- /docs/images/versioning-sketch-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-0.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-1.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-2.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-3.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-4.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-5.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-6.png -------------------------------------------------------------------------------- /docs/images/versioning-sketch-7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/docs/images/versioning-sketch-7.png -------------------------------------------------------------------------------- /docs/tutorial/app-feedback-program.md: -------------------------------------------------------------------------------- 1 | # Electron App Feedback Program 2 | 3 | Electron is working on building a streamlined release process and having faster releases. To help with that, we have the App Feedback Program for large-scale Electron apps to test our beta releases and report app-specific issues to the Electron team. We use this program to help us prioritize work and get applications upgraded to the next stable release as soon as possible. There are a few requirements we expect from participants, such as attending short, online weekly check-ins. Please visit the [blog post](https://electronjs.org/blog/app-feedback-program) for details and sign-up. 4 | -------------------------------------------------------------------------------- /lib/browser/api/auto-updater.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | if (process.platform === 'win32') { 4 | module.exports = require('@electron/internal/browser/api/auto-updater/auto-updater-win') 5 | } else { 6 | module.exports = require('@electron/internal/browser/api/auto-updater/auto-updater-native') 7 | } 8 | -------------------------------------------------------------------------------- /lib/browser/api/auto-updater/auto-updater-native.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const EventEmitter = require('events').EventEmitter 4 | const { autoUpdater, AutoUpdater } = process.electronBinding('auto_updater') 5 | 6 | // AutoUpdater is an EventEmitter. 7 | Object.setPrototypeOf(AutoUpdater.prototype, EventEmitter.prototype) 8 | EventEmitter.call(autoUpdater) 9 | 10 | module.exports = autoUpdater 11 | -------------------------------------------------------------------------------- /lib/browser/api/browser-view.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { EventEmitter } = require('events') 4 | const { BrowserView } = process.electronBinding('browser_view') 5 | 6 | Object.setPrototypeOf(BrowserView.prototype, EventEmitter.prototype) 7 | 8 | BrowserView.fromWebContents = (webContents) => { 9 | for (const view of BrowserView.getAllViews()) { 10 | if (view.webContents.equal(webContents)) return view 11 | } 12 | 13 | return null 14 | } 15 | 16 | module.exports = BrowserView 17 | -------------------------------------------------------------------------------- /lib/browser/api/content-tracing.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | module.exports = process.electronBinding('content_tracing') 3 | -------------------------------------------------------------------------------- /lib/browser/api/crash-reporter.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const CrashReporter = require('@electron/internal/common/crash-reporter') 4 | const { crashReporterInit } = require('@electron/internal/browser/crash-reporter-init') 5 | 6 | class CrashReporterMain extends CrashReporter { 7 | init (options) { 8 | return crashReporterInit(options) 9 | } 10 | } 11 | 12 | module.exports = new CrashReporterMain() 13 | -------------------------------------------------------------------------------- /lib/browser/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties' 2 | import { commonModuleList } from '@electron/internal/common/api/module-list' 3 | import { browserModuleList } from '@electron/internal/browser/api/module-list' 4 | 5 | defineProperties(exports, commonModuleList) 6 | defineProperties(exports, browserModuleList) 7 | -------------------------------------------------------------------------------- /lib/browser/api/global-shortcut.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = process.electronBinding('global_shortcut').globalShortcut 4 | -------------------------------------------------------------------------------- /lib/browser/api/ipc-main.ts: -------------------------------------------------------------------------------- 1 | import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl' 2 | 3 | const ipcMain = new IpcMainImpl() 4 | 5 | // Do not throw exception when channel name is "error". 6 | ipcMain.on('error', () => {}) 7 | 8 | export default ipcMain 9 | -------------------------------------------------------------------------------- /lib/browser/api/native-theme.ts: -------------------------------------------------------------------------------- 1 | import { EventEmitter } from 'events' 2 | 3 | const { NativeTheme, nativeTheme } = process.electronBinding('native_theme') 4 | 5 | Object.setPrototypeOf(NativeTheme.prototype, EventEmitter.prototype) 6 | EventEmitter.call(nativeTheme as any) 7 | 8 | module.exports = nativeTheme 9 | -------------------------------------------------------------------------------- /lib/browser/api/notification.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { EventEmitter } = require('events') 4 | const { Notification, isSupported } = process.electronBinding('notification') 5 | 6 | Object.setPrototypeOf(Notification.prototype, EventEmitter.prototype) 7 | 8 | Notification.isSupported = isSupported 9 | 10 | module.exports = Notification 11 | -------------------------------------------------------------------------------- /lib/browser/api/power-save-blocker.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = process.electronBinding('power_save_blocker').powerSaveBlocker 4 | -------------------------------------------------------------------------------- /lib/browser/api/screen.ts: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | import { createLazyInstance } from '../utils' 4 | const { EventEmitter } = require('events') 5 | const { Screen, createScreen } = process.electronBinding('screen') 6 | 7 | // Screen is an EventEmitter. 8 | Object.setPrototypeOf(Screen.prototype, EventEmitter.prototype) 9 | 10 | module.exports = createLazyInstance(createScreen, Screen, true) 11 | -------------------------------------------------------------------------------- /lib/browser/api/tray.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { EventEmitter } = require('events') 4 | const { deprecate } = require('electron') 5 | const { Tray } = process.electronBinding('tray') 6 | 7 | Object.setPrototypeOf(Tray.prototype, EventEmitter.prototype) 8 | 9 | module.exports = Tray 10 | -------------------------------------------------------------------------------- /lib/browser/api/view.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { EventEmitter } = require('events') 4 | const { View } = process.electronBinding('view') 5 | 6 | Object.setPrototypeOf(View.prototype, EventEmitter.prototype) 7 | 8 | View.prototype._init = function () { 9 | } 10 | 11 | module.exports = View 12 | -------------------------------------------------------------------------------- /lib/browser/api/views/box-layout.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { LayoutManager } = electron 6 | const { BoxLayout } = process.electronBinding('box_layout') 7 | 8 | Object.setPrototypeOf(BoxLayout.prototype, LayoutManager.prototype) 9 | 10 | BoxLayout.prototype._init = function () { 11 | // Call parent class's _init. 12 | LayoutManager.prototype._init.call(this) 13 | } 14 | 15 | module.exports = BoxLayout 16 | -------------------------------------------------------------------------------- /lib/browser/api/views/button.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { View } = electron 6 | const { Button } = process.electronBinding('button') 7 | 8 | Object.setPrototypeOf(Button.prototype, View.prototype) 9 | 10 | Button.prototype._init = function () { 11 | // Call parent class's _init. 12 | View.prototype._init.call(this) 13 | } 14 | 15 | module.exports = Button 16 | -------------------------------------------------------------------------------- /lib/browser/api/views/label-button.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { Button } = electron 6 | const { LabelButton } = process.electronBinding('label_button') 7 | 8 | Object.setPrototypeOf(LabelButton.prototype, Button.prototype) 9 | 10 | LabelButton.prototype._init = function () { 11 | // Call parent class's _init. 12 | Button.prototype._init.call(this) 13 | } 14 | 15 | module.exports = LabelButton 16 | -------------------------------------------------------------------------------- /lib/browser/api/views/layout-manager.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { LayoutManager } = process.electronBinding('layout_manager') 4 | 5 | LayoutManager.prototype._init = function () { 6 | } 7 | 8 | module.exports = LayoutManager 9 | -------------------------------------------------------------------------------- /lib/browser/api/views/md-text-button.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { LabelButton } = electron 6 | const { MdTextButton } = process.electronBinding('md_text_button') 7 | 8 | Object.setPrototypeOf(MdTextButton.prototype, LabelButton.prototype) 9 | 10 | MdTextButton.prototype._init = function () { 11 | // Call parent class's _init. 12 | LabelButton.prototype._init.call(this) 13 | } 14 | 15 | module.exports = MdTextButton 16 | -------------------------------------------------------------------------------- /lib/browser/api/views/resize-area.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { View } = electron 6 | const { ResizeArea } = process.electronBinding('resize_area') 7 | 8 | Object.setPrototypeOf(ResizeArea.prototype, View.prototype) 9 | 10 | ResizeArea.prototype._init = function () { 11 | // Call parent class's _init. 12 | View.prototype._init.call(this) 13 | } 14 | 15 | module.exports = ResizeArea 16 | -------------------------------------------------------------------------------- /lib/browser/api/views/text-field.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { View } = electron 6 | const { TextField } = process.electronBinding('text_field') 7 | 8 | Object.setPrototypeOf(TextField.prototype, View.prototype) 9 | 10 | TextField.prototype._init = function () { 11 | // Call parent class's _init. 12 | View.prototype._init.call(this) 13 | } 14 | 15 | module.exports = TextField 16 | -------------------------------------------------------------------------------- /lib/browser/api/web-contents-view.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const electron = require('electron') 4 | 5 | const { View } = electron 6 | const { WebContentsView } = process.electronBinding('web_contents_view') 7 | 8 | Object.setPrototypeOf(WebContentsView.prototype, View.prototype) 9 | 10 | WebContentsView.prototype._init = function () { 11 | // Call parent class's _init. 12 | View.prototype._init.call(this) 13 | } 14 | 15 | module.exports = WebContentsView 16 | -------------------------------------------------------------------------------- /lib/browser/ipc-main-internal.ts: -------------------------------------------------------------------------------- 1 | import { IpcMainImpl } from '@electron/internal/browser/ipc-main-impl' 2 | 3 | export const ipcMainInternal = new IpcMainImpl() as ElectronInternal.IpcMainInternal 4 | 5 | // Do not throw exception when channel name is "error". 6 | ipcMainInternal.on('error', () => {}) 7 | -------------------------------------------------------------------------------- /lib/common/api/module-list.ts: -------------------------------------------------------------------------------- 1 | // Common modules, please sort alphabetically 2 | export const commonModuleList: ElectronInternal.ModuleEntry[] = [ 3 | { name: 'clipboard', loader: () => require('./clipboard') }, 4 | { name: 'nativeImage', loader: () => require('./native-image') }, 5 | { name: 'shell', loader: () => require('./shell') }, 6 | // The internal modules, invisible unless you know their names. 7 | { name: 'deprecate', loader: () => require('./deprecate'), private: true } 8 | ] 9 | -------------------------------------------------------------------------------- /lib/common/api/native-image.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const { deprecate } = require('electron') 4 | const { NativeImage, nativeImage } = process.electronBinding('native_image') 5 | 6 | deprecate.fnToProperty(NativeImage.prototype, 'isMacTemplateImage', '_isTemplateImage', '_setTemplateImage') 7 | 8 | module.exports = nativeImage 9 | -------------------------------------------------------------------------------- /lib/common/api/shell.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | module.exports = process.electronBinding('shell') 4 | -------------------------------------------------------------------------------- /lib/common/asar_init.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | /* global require */ 4 | 5 | // Monkey-patch the fs module. 6 | require('electron/js2c/asar').wrapFsWithAsar(require('fs')) 7 | -------------------------------------------------------------------------------- /lib/common/define-properties.ts: -------------------------------------------------------------------------------- 1 | const handleESModule = (loader: ElectronInternal.ModuleLoader) => () => { 2 | const value = loader() 3 | if (value.__esModule && value.default) return value.default 4 | return value 5 | } 6 | 7 | // Attaches properties to |targetExports|. 8 | export function defineProperties (targetExports: Object, moduleList: ElectronInternal.ModuleEntry[]) { 9 | const descriptors: PropertyDescriptorMap = {} 10 | for (const module of moduleList) { 11 | descriptors[module.name] = { 12 | enumerable: !module.private, 13 | get: handleESModule(module.loader) 14 | } 15 | } 16 | return Object.defineProperties(targetExports, descriptors) 17 | } 18 | -------------------------------------------------------------------------------- /lib/common/electron-binding-setup.ts: -------------------------------------------------------------------------------- 1 | export function electronBindingSetup (binding: typeof process['_linkedBinding'], processType: typeof process['type']): typeof process['electronBinding'] { 2 | return function electronBinding (name: string) { 3 | try { 4 | return binding(`atom_${processType}_${name}`) 5 | } catch (error) { 6 | if (/No such module/.test(error.message)) { 7 | return binding(`atom_common_${name}`) 8 | } else { 9 | throw error 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/common/remote/is-promise.ts: -------------------------------------------------------------------------------- 1 | export function isPromise (val: any) { 2 | return ( 3 | val && 4 | val.then && 5 | val.then instanceof Function && 6 | val.constructor && 7 | val.constructor.reject && 8 | val.constructor.reject instanceof Function && 9 | val.constructor.resolve && 10 | val.constructor.resolve instanceof Function 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /lib/renderer/api/crash-reporter.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | const CrashReporter = require('@electron/internal/common/crash-reporter') 4 | const ipcRendererUtils = require('@electron/internal/renderer/ipc-renderer-internal-utils') 5 | 6 | class CrashReporterRenderer extends CrashReporter { 7 | init (options) { 8 | return ipcRendererUtils.invokeSync('ELECTRON_CRASH_REPORTER_INIT', options) 9 | } 10 | } 11 | 12 | module.exports = new CrashReporterRenderer() 13 | -------------------------------------------------------------------------------- /lib/renderer/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties' 2 | import { commonModuleList } from '@electron/internal/common/api/module-list' 3 | import { rendererModuleList } from '@electron/internal/renderer/api/module-list' 4 | 5 | defineProperties(exports, commonModuleList) 6 | defineProperties(exports, rendererModuleList) 7 | -------------------------------------------------------------------------------- /lib/renderer/extensions/event.ts: -------------------------------------------------------------------------------- 1 | export class Event { 2 | private listeners: Function[] = [] 3 | 4 | addListener (callback: Function) { 5 | this.listeners.push(callback) 6 | } 7 | 8 | removeListener (callback: Function) { 9 | const index = this.listeners.indexOf(callback) 10 | if (index !== -1) { 11 | this.listeners.splice(index, 1) 12 | } 13 | } 14 | 15 | emit (...args: any[]) { 16 | for (const listener of this.listeners) { 17 | listener(...args) 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/sandboxed_renderer/api/exports/electron.ts: -------------------------------------------------------------------------------- 1 | import { defineProperties } from '@electron/internal/common/define-properties' 2 | import { moduleList } from '@electron/internal/sandboxed_renderer/api/module-list' 3 | 4 | defineProperties(exports, moduleList) 5 | -------------------------------------------------------------------------------- /npm/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | var electron = require('./') 4 | 5 | var proc = require('child_process') 6 | 7 | var child = proc.spawn(electron, process.argv.slice(2), { stdio: 'inherit', windowsHide: false }) 8 | child.on('close', function (code) { 9 | process.exit(code) 10 | }) 11 | 12 | const handleTerminationSignal = function (signal) { 13 | process.on(signal, function signalHandler () { 14 | if (!child.killed) { 15 | child.kill(signal) 16 | } 17 | }) 18 | } 19 | 20 | handleTerminationSignal('SIGINT') 21 | handleTerminationSignal('SIGTERM') 22 | -------------------------------------------------------------------------------- /npm/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var path = require('path') 3 | 4 | var pathFile = path.join(__dirname, 'path.txt') 5 | 6 | function getElectronPath () { 7 | if (fs.existsSync(pathFile)) { 8 | var executablePath = fs.readFileSync(pathFile, 'utf-8') 9 | if (process.env.ELECTRON_OVERRIDE_DIST_PATH) { 10 | return path.join(process.env.ELECTRON_OVERRIDE_DIST_PATH, executablePath) 11 | } 12 | return path.join(__dirname, 'dist', executablePath) 13 | } else { 14 | throw new Error('Electron failed to install correctly, please delete node_modules/electron and try installing again') 15 | } 16 | } 17 | 18 | module.exports = getElectronPath() 19 | -------------------------------------------------------------------------------- /npm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "main": "index.js", 3 | "types": "electron.d.ts", 4 | "bin": { 5 | "electron": "cli.js" 6 | }, 7 | "scripts": { 8 | "postinstall": "node install.js" 9 | }, 10 | "dependencies": { 11 | "@electron/get": "^1.0.1", 12 | "@types/node": "^12.0.12", 13 | "extract-zip": "^1.0.3" 14 | }, 15 | "engines": { 16 | "node": ">= 8.6" 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /patches/boringssl/.patches: -------------------------------------------------------------------------------- 1 | expose_ripemd160.patch 2 | expose_aes-cfb.patch 3 | -------------------------------------------------------------------------------- /patches/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "src/electron/patches/chromium": "src", 3 | 4 | "src/electron/patches/boringssl": "src/third_party/boringssl/src", 5 | 6 | "src/electron/patches/perfetto": "src/third_party/perfetto", 7 | 8 | "src/electron/patches/v8": "src/v8", 9 | 10 | "src/electron/patches/node": "src/third_party/electron_node" 11 | } 12 | -------------------------------------------------------------------------------- /patches/perfetto/.patches: -------------------------------------------------------------------------------- 1 | revert_fix_chrome_roll_update_protoc_host_toolchain_rules.patch 2 | revert_make_trace_processor_a_host-only_target.patch 3 | -------------------------------------------------------------------------------- /patches/v8/.patches: -------------------------------------------------------------------------------- 1 | add_realloc.patch 2 | build_gn.patch 3 | expose_mksnapshot.patch 4 | deps_provide_more_v8_backwards_compatibility.patch 5 | dcheck.patch 6 | export_symbols_needed_for_windows_build.patch 7 | workaround_an_undefined_symbol_error.patch 8 | do_not_export_private_v8_symbols_on_windows.patch 9 | revert_cleanup_switch_offset_of_to_offsetof_where_possible.patch 10 | -------------------------------------------------------------------------------- /script/.electron.attributes: -------------------------------------------------------------------------------- 1 | *.mm diff=objc 2 | *.m diff=objc 3 | -------------------------------------------------------------------------------- /script/codesign/get-trusted-identity.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | 5 | valid_certs=$(security find-identity -p codesigning -v) 6 | if [[ $valid_certs == *"1)"* ]]; then 7 | first_valid_cert=$(echo $valid_certs | sed 's/ \".*//' | sed 's/.* //') 8 | echo $first_valid_cert 9 | exit 0 10 | else 11 | # No Certificate 12 | exit 0 13 | fi 14 | -------------------------------------------------------------------------------- /script/codesign/signing.cer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/script/codesign/signing.cer -------------------------------------------------------------------------------- /script/codesign/signing.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/script/codesign/signing.p12 -------------------------------------------------------------------------------- /script/codesign/signing.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PUBLIC KEY----- 2 | MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw91mumcVpai94X7PASje 3 | R9+meqEHsavRsKQmtVV5JkJk9ZZbWTdpXgOjy1hhGQURrbp3li9lmi3MFHVqZjuQ 4 | H8omufj0iFiUD0bBY9EZeQjmcXd/ZgP8SoFfMS3BSAeRzXI5UQ5zFq86CWyzBh4k 5 | lgRN+iuhmxxZ/8PUcuEQ49fzNWVtRskkX+ZDwj8mn9YYRQMm3nl+bB+lYbpgVnkX 6 | WztXvSdRxCMjvjzLtoSJQhG36DEz6Sv7XeEAfYi70diQIwr/yCtgCpYUTadjOdzO 7 | h0W/rpC2DTVE/yC3xZxg2uVjEa9siC8+DX9F6luAytkx2TgUGF6KdVblPVVCYkxW 8 | QQIDAQAB 9 | -----END RSA PUBLIC KEY----- 10 | -------------------------------------------------------------------------------- /script/generate-zip-manifest.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import zipfile 4 | import sys 5 | 6 | def main(zip_path, manifest_out): 7 | with open(manifest_out, 'w') as manifest, \ 8 | zipfile.ZipFile(zip_path, 'r', allowZip64=True) as z: 9 | for name in sorted(z.namelist()): 10 | manifest.write(name + '\n') 11 | return 0 12 | 13 | if __name__ == '__main__': 14 | sys.exit(main(*sys.argv[1:])) 15 | -------------------------------------------------------------------------------- /script/lib/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/script/lib/__init__.py -------------------------------------------------------------------------------- /script/lib/npm.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import sys 3 | 4 | 5 | def npm(*npm_args): 6 | call_args = [__get_executable_name()] + list(npm_args) 7 | subprocess.check_call(call_args) 8 | 9 | 10 | def __get_executable_name(): 11 | executable = 'npm' 12 | if sys.platform == 'win32': 13 | executable += '.cmd' 14 | return executable 15 | 16 | 17 | if __name__ == '__main__': 18 | npm(*sys.argv[1:]) 19 | -------------------------------------------------------------------------------- /script/lib/npx.py: -------------------------------------------------------------------------------- 1 | import subprocess 2 | import sys 3 | 4 | 5 | def npx(*npx_args): 6 | call_args = [__get_executable_name()] + list(npx_args) 7 | subprocess.check_call(call_args) 8 | 9 | 10 | def __get_executable_name(): 11 | executable = 'npx' 12 | if sys.platform == 'win32': 13 | executable += '.cmd' 14 | return executable 15 | 16 | 17 | if __name__ == '__main__': 18 | npx(*sys.argv[1:]) 19 | -------------------------------------------------------------------------------- /script/release/notes/.gitignore: -------------------------------------------------------------------------------- 1 | .cache -------------------------------------------------------------------------------- /script/start.js: -------------------------------------------------------------------------------- 1 | const cp = require('child_process') 2 | const utils = require('./lib/utils') 3 | const electronPath = utils.getAbsoluteElectronExec() 4 | 5 | const child = cp.spawn(electronPath, process.argv.slice(2), { stdio: 'inherit' }) 6 | child.on('close', (code) => process.exit(code)) 7 | 8 | const handleTerminationSignal = (signal) => 9 | process.on(signal, () => { 10 | if (!child.killed) { 11 | child.kill(signal) 12 | } 13 | }) 14 | 15 | handleTerminationSignal('SIGINT') 16 | handleTerminationSignal('SIGTERM') 17 | -------------------------------------------------------------------------------- /script/yarn.js: -------------------------------------------------------------------------------- 1 | const cp = require('child_process') 2 | const fs = require('fs') 3 | const path = require('path') 4 | 5 | const YARN_VERSION = /'yarn_version': '(.+?)'/.exec(fs.readFileSync(path.resolve(__dirname, '../DEPS'), 'utf8'))[1] 6 | 7 | exports.YARN_VERSION = YARN_VERSION 8 | 9 | // If we are running "node script/yarn" run as the yarn CLI 10 | if (process.mainModule === module) { 11 | const NPX_CMD = process.platform === 'win32' ? 'npx.cmd' : 'npx' 12 | 13 | const child = cp.spawn(NPX_CMD, [`yarn@${YARN_VERSION}`, ...process.argv.slice(2)], { 14 | stdio: 'inherit' 15 | }) 16 | 17 | child.on('exit', code => process.exit(code)) 18 | } 19 | -------------------------------------------------------------------------------- /shell/app/BRANDING.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "electron", 3 | "product_name": "Electron", 4 | "mac_bundle_id": "com.github.Electron" 5 | } 6 | -------------------------------------------------------------------------------- /shell/app/atom_login_helper.mm: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2017 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | int main(int argc, char* argv[]) { 8 | NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; 9 | NSArray* pathComponents = [[[NSBundle mainBundle] bundlePath] pathComponents]; 10 | pathComponents = [pathComponents 11 | subarrayWithRange:NSMakeRange(0, [pathComponents count] - 4)]; 12 | NSString* path = [NSString pathWithComponents:pathComponents]; 13 | [[NSWorkspace sharedWorkspace] launchApplication:path]; 14 | [pool drain]; 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /shell/app/atom_main.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_APP_ATOM_MAIN_H_ 6 | #define SHELL_APP_ATOM_MAIN_H_ 7 | 8 | #include "content/public/app/content_main.h" 9 | 10 | #endif // SHELL_APP_ATOM_MAIN_H_ 11 | -------------------------------------------------------------------------------- /shell/app/atom_main_delegate_mac.h: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Slack Technologies, Inc. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ 6 | #define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ 7 | 8 | namespace electron { 9 | 10 | // Initializes NSApplication. 11 | void RegisterAtomCrApp(); 12 | 13 | } // namespace electron 14 | 15 | #endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ 16 | -------------------------------------------------------------------------------- /shell/app/command_line_args.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_APP_COMMAND_LINE_ARGS_H_ 6 | #define SHELL_APP_COMMAND_LINE_ARGS_H_ 7 | 8 | #include "base/command_line.h" 9 | 10 | namespace electron { 11 | 12 | bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv); 13 | 14 | } // namespace electron 15 | 16 | #endif // SHELL_APP_COMMAND_LINE_ARGS_H_ 17 | -------------------------------------------------------------------------------- /shell/app/manifests.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_APP_MANIFESTS_H_ 6 | #define SHELL_APP_MANIFESTS_H_ 7 | 8 | #include 9 | 10 | #include "services/service_manager/public/cpp/manifest.h" 11 | 12 | const service_manager::Manifest& GetElectronContentBrowserOverlayManifest(); 13 | 14 | #endif // SHELL_APP_MANIFESTS_H_ 15 | -------------------------------------------------------------------------------- /shell/app/node_main.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_APP_NODE_MAIN_H_ 6 | #define SHELL_APP_NODE_MAIN_H_ 7 | 8 | namespace electron { 9 | 10 | int NodeMain(int argc, char* argv[]); 11 | 12 | } // namespace electron 13 | 14 | #endif // SHELL_APP_NODE_MAIN_H_ 15 | -------------------------------------------------------------------------------- /shell/app/resources/mac/loginhelper-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | ${ELECTRON_BUNDLE_ID} 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${PRODUCT_NAME} 11 | CFBundlePackageType 12 | APPL 13 | LSBackgroundOnly 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /shell/browser/atom_gpu_client.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/atom_gpu_client.h" 6 | 7 | #include "base/environment.h" 8 | 9 | #if defined(OS_WIN) 10 | #include 11 | #endif 12 | 13 | namespace electron { 14 | 15 | AtomGpuClient::AtomGpuClient() = default; 16 | 17 | void AtomGpuClient::PreCreateMessageLoop() { 18 | #if defined(OS_WIN) 19 | auto env = base::Environment::Create(); 20 | if (env->HasVar("ELECTRON_DEFAULT_ERROR_MODE")) 21 | SetErrorMode(GetErrorMode() & ~SEM_NOGPFAULTERRORBOX); 22 | #endif 23 | } 24 | 25 | } // namespace electron 26 | -------------------------------------------------------------------------------- /shell/browser/atom_gpu_client.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_ATOM_GPU_CLIENT_H_ 6 | #define SHELL_BROWSER_ATOM_GPU_CLIENT_H_ 7 | 8 | #include "content/public/gpu/content_gpu_client.h" 9 | 10 | namespace electron { 11 | 12 | class AtomGpuClient : public content::ContentGpuClient { 13 | public: 14 | AtomGpuClient(); 15 | 16 | // content::ContentGpuClient: 17 | void PreCreateMessageLoop() override; 18 | 19 | private: 20 | DISALLOW_COPY_AND_ASSIGN(AtomGpuClient); 21 | }; 22 | 23 | } // namespace electron 24 | 25 | #endif // SHELL_BROWSER_ATOM_GPU_CLIENT_H_ 26 | -------------------------------------------------------------------------------- /shell/browser/child_web_contents_tracker.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/child_web_contents_tracker.h" 6 | 7 | namespace electron { 8 | 9 | ChildWebContentsTracker::ChildWebContentsTracker( 10 | content::WebContents* web_contents) {} 11 | 12 | WEB_CONTENTS_USER_DATA_KEY_IMPL(ChildWebContentsTracker) 13 | 14 | } // namespace electron 15 | -------------------------------------------------------------------------------- /shell/browser/extensions/atom_display_info_provider.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/extensions/atom_display_info_provider.h" 6 | 7 | namespace extensions { 8 | 9 | AtomDisplayInfoProvider::AtomDisplayInfoProvider() = default; 10 | 11 | } // namespace extensions 12 | -------------------------------------------------------------------------------- /shell/browser/feature_list.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_FEATURE_LIST_H_ 6 | #define SHELL_BROWSER_FEATURE_LIST_H_ 7 | 8 | namespace electron { 9 | void InitializeFeatureList(); 10 | } 11 | 12 | #endif // SHELL_BROWSER_FEATURE_LIST_H_ 13 | -------------------------------------------------------------------------------- /shell/browser/font_defaults.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 Slack Technologies, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_FONT_DEFAULTS_H_ 6 | #define SHELL_BROWSER_FONT_DEFAULTS_H_ 7 | 8 | namespace content { 9 | struct WebPreferences; 10 | } // namespace content 11 | 12 | namespace electron { 13 | 14 | void SetFontDefaults(content::WebPreferences* prefs); 15 | 16 | } // namespace electron 17 | 18 | #endif // SHELL_BROWSER_FONT_DEFAULTS_H_ 19 | -------------------------------------------------------------------------------- /shell/browser/mac/atom_application_delegate.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #import 6 | 7 | #import "shell/browser/ui/cocoa/atom_menu_controller.h" 8 | 9 | @interface AtomApplicationDelegate : NSObject { 10 | @private 11 | base::scoped_nsobject menu_controller_; 12 | } 13 | 14 | // Sets the menu that will be returned in "applicationDockMenu:". 15 | - (void)setApplicationDockMenu:(electron::AtomMenuModel*)model; 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /shell/browser/microtasks_runner.cc: -------------------------------------------------------------------------------- 1 | 2 | // Copyright (c) 2018 GitHub, Inc. 3 | // Use of this source code is governed by the MIT license that can be 4 | // found in the LICENSE file. 5 | 6 | #include "shell/browser/microtasks_runner.h" 7 | #include "v8/include/v8.h" 8 | 9 | namespace electron { 10 | 11 | MicrotasksRunner::MicrotasksRunner(v8::Isolate* isolate) : isolate_(isolate) {} 12 | 13 | void MicrotasksRunner::WillProcessTask(const base::PendingTask& pending_task) {} 14 | 15 | void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) { 16 | v8::Isolate::Scope scope(isolate_); 17 | v8::MicrotasksScope::PerformCheckpoint(isolate_); 18 | } 19 | 20 | } // namespace electron 21 | -------------------------------------------------------------------------------- /shell/browser/resources/mac/electron.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/shell/browser/resources/mac/electron.icns -------------------------------------------------------------------------------- /shell/browser/resources/win/atom.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/shell/browser/resources/win/atom.ico -------------------------------------------------------------------------------- /shell/browser/resources/win/disable_window_filtering.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /shell/browser/resources/win/dpi_aware.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | true/pm 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /shell/browser/resources/win/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | 4 | #define IDR_MAINFRAME 1 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1001 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /shell/browser/ui/cocoa/NSColor+Hex.h: -------------------------------------------------------------------------------- 1 | // Created by Mathias Leppich on 03/02/14. 2 | // Copyright (c) 2014 Bit Bar. All rights reserved. 3 | // Copyright (c) 2017 GitHub, Inc. 4 | // Use of this source code is governed by the MIT license that can be 5 | // found in the LICENSE file. 6 | 7 | #ifndef SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ 8 | #define SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ 9 | 10 | #import 11 | 12 | @interface NSColor (Hex) 13 | - (NSString*)hexadecimalValue; 14 | - (NSString*)RGBAValue; 15 | + (NSColor*)colorWithHexColorString:(NSString*)hex; 16 | @end 17 | 18 | #endif // SHELL_BROWSER_UI_COCOA_NSCOLOR_HEX_H_ 19 | -------------------------------------------------------------------------------- /shell/browser/ui/cocoa/NSString+ANSI.h: -------------------------------------------------------------------------------- 1 | // Created by Kent Karlsson on 3/11/16. 2 | // Copyright (c) 2016 Bit Bar. All rights reserved. 3 | // Copyright (c) 2017 GitHub, Inc. 4 | // Use of this source code is governed by the MIT license that can be 5 | // found in the LICENSE file. 6 | 7 | #ifndef SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ 8 | #define SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ 9 | 10 | #import 11 | 12 | @interface NSString (ANSI) 13 | - (BOOL)containsANSICodes; 14 | - (NSMutableAttributedString*)attributedStringParsingANSICodes; 15 | @end 16 | 17 | #endif // SHELL_BROWSER_UI_COCOA_NSSTRING_ANSI_H_ 18 | -------------------------------------------------------------------------------- /shell/browser/ui/cocoa/atom_preview_item.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_UI_COCOA_ATOM_PREVIEW_ITEM_H_ 6 | #define SHELL_BROWSER_UI_COCOA_ATOM_PREVIEW_ITEM_H_ 7 | 8 | #import 9 | #import 10 | 11 | @interface AtomPreviewItem : NSObject 12 | @property(nonatomic, retain) NSURL* previewItemURL; 13 | @property(nonatomic, retain) NSString* previewItemTitle; 14 | - (id)initWithURL:(NSURL*)url title:(NSString*)title; 15 | @end 16 | 17 | #endif // SHELL_BROWSER_UI_COCOA_ATOM_PREVIEW_ITEM_H_ 18 | -------------------------------------------------------------------------------- /shell/browser/ui/cocoa/atom_preview_item.mm: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/ui/cocoa/atom_preview_item.h" 6 | 7 | @implementation AtomPreviewItem 8 | 9 | @synthesize previewItemURL; 10 | @synthesize previewItemTitle; 11 | 12 | - (id)initWithURL:(NSURL*)url title:(NSString*)title { 13 | self = [super init]; 14 | if (self) { 15 | self.previewItemURL = url; 16 | self.previewItemTitle = title; 17 | } 18 | return self; 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /shell/browser/ui/cocoa/event_dispatching_window.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ 6 | #define SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ 7 | 8 | #import "ui/base/cocoa/underlay_opengl_hosting_window.h" 9 | 10 | @interface EventDispatchingWindow : UnderlayOpenGLHostingWindow { 11 | @private 12 | BOOL redispatchingEvent_; 13 | } 14 | 15 | - (void)redispatchKeyEvent:(NSEvent*)event; 16 | 17 | @end 18 | 19 | #endif // SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_ 20 | -------------------------------------------------------------------------------- /shell/browser/ui/drag_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_UI_DRAG_UTIL_H_ 6 | #define SHELL_BROWSER_UI_DRAG_UTIL_H_ 7 | 8 | #include 9 | 10 | #include "ui/gfx/image/image.h" 11 | 12 | namespace base { 13 | class FilePath; 14 | } 15 | 16 | namespace electron { 17 | 18 | void DragFileItems(const std::vector& files, 19 | const gfx::Image& icon, 20 | gfx::NativeView view); 21 | 22 | } // namespace electron 23 | 24 | #endif // SHELL_BROWSER_UI_DRAG_UTIL_H_ 25 | -------------------------------------------------------------------------------- /shell/browser/ui/inspectable_web_contents_view_delegate.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Copyright (c) 2013 Adam Roben . All rights reserved. 3 | // Use of this source code is governed by a BSD-style license that can be 4 | // found in the LICENSE-CHROMIUM file. 5 | 6 | #include "shell/browser/ui/inspectable_web_contents_view_delegate.h" 7 | 8 | namespace electron { 9 | 10 | gfx::ImageSkia InspectableWebContentsViewDelegate::GetDevToolsWindowIcon() { 11 | return gfx::ImageSkia(); 12 | } 13 | 14 | } // namespace electron 15 | -------------------------------------------------------------------------------- /shell/browser/ui/tray_icon_win.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2014 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/ui/win/notify_icon.h" 6 | #include "shell/browser/ui/win/notify_icon_host.h" 7 | 8 | namespace electron { 9 | 10 | // static 11 | TrayIcon* TrayIcon::Create() { 12 | static NotifyIconHost host; 13 | return host.CreateNotifyIcon(); 14 | } 15 | 16 | } // namespace electron 17 | -------------------------------------------------------------------------------- /shell/browser/unresponsive_suppressor.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/browser/unresponsive_suppressor.h" 6 | 7 | namespace electron { 8 | 9 | namespace { 10 | 11 | int g_suppress_level = 0; 12 | 13 | } // namespace 14 | 15 | bool IsUnresponsiveEventSuppressed() { 16 | return g_suppress_level > 0; 17 | } 18 | 19 | UnresponsiveSuppressor::UnresponsiveSuppressor() { 20 | g_suppress_level++; 21 | } 22 | 23 | UnresponsiveSuppressor::~UnresponsiveSuppressor() { 24 | g_suppress_level--; 25 | } 26 | 27 | } // namespace electron 28 | -------------------------------------------------------------------------------- /shell/browser/unresponsive_suppressor.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ 6 | #define SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ 7 | 8 | #include "base/macros.h" 9 | 10 | namespace electron { 11 | 12 | bool IsUnresponsiveEventSuppressed(); 13 | 14 | class UnresponsiveSuppressor { 15 | public: 16 | UnresponsiveSuppressor(); 17 | ~UnresponsiveSuppressor(); 18 | 19 | private: 20 | DISALLOW_COPY_AND_ASSIGN(UnresponsiveSuppressor); 21 | }; 22 | 23 | } // namespace electron 24 | 25 | #endif // SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ 26 | -------------------------------------------------------------------------------- /shell/common/api/BUILD.gn: -------------------------------------------------------------------------------- 1 | import("//mojo/public/tools/bindings/mojom.gni") 2 | 3 | mojom("mojo") { 4 | sources = [ 5 | "api.mojom", 6 | ] 7 | 8 | public_deps = [ 9 | "//mojo/public/mojom/base", 10 | "//ui/gfx/geometry/mojom", 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /shell/common/api/locker.cc: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE.chromium file. 4 | 5 | #include "shell/common/api/locker.h" 6 | 7 | #include 8 | 9 | namespace mate { 10 | 11 | Locker::Locker(v8::Isolate* isolate) { 12 | if (IsBrowserProcess()) 13 | locker_ = std::make_unique(isolate); 14 | } 15 | 16 | Locker::~Locker() = default; 17 | 18 | } // namespace mate 19 | -------------------------------------------------------------------------------- /shell/common/color_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2016 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_COMMON_COLOR_UTIL_H_ 6 | #define SHELL_COMMON_COLOR_UTIL_H_ 7 | 8 | #include 9 | 10 | #include "third_party/skia/include/core/SkColor.h" 11 | 12 | namespace electron { 13 | 14 | // Parse hex color like "#FFF" or "#EFEFEF" 15 | SkColor ParseHexColor(const std::string& name); 16 | 17 | // Convert color to RGB hex value like "#ABCDEF" 18 | std::string ToRGBHex(SkColor color); 19 | 20 | } // namespace electron 21 | 22 | #endif // SHELL_COMMON_COLOR_UTIL_H_ 23 | -------------------------------------------------------------------------------- /shell/common/crash_reporter/win/crash_service_main.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2013 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_COMMON_CRASH_REPORTER_WIN_CRASH_SERVICE_MAIN_H_ 6 | #define SHELL_COMMON_CRASH_REPORTER_WIN_CRASH_SERVICE_MAIN_H_ 7 | 8 | #include 9 | 10 | namespace crash_service { 11 | 12 | // Program entry, should be called by main(); 13 | int Main(std::vector* args); 14 | 15 | } // namespace crash_service 16 | 17 | #endif // SHELL_COMMON_CRASH_REPORTER_WIN_CRASH_SERVICE_MAIN_H_ 18 | -------------------------------------------------------------------------------- /shell/common/deprecate_util.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2019 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_COMMON_DEPRECATE_UTIL_H_ 6 | #define SHELL_COMMON_DEPRECATE_UTIL_H_ 7 | 8 | #include 9 | 10 | #include "shell/common/node_includes.h" 11 | 12 | namespace electron { 13 | 14 | void EmitDeprecationWarning(node::Environment* env, 15 | const std::string& warning_msg, 16 | const std::string& warning_type); 17 | 18 | } // namespace electron 19 | 20 | #endif // SHELL_COMMON_DEPRECATE_UTIL_H_ 21 | -------------------------------------------------------------------------------- /shell/common/extensions/api/_manifest_features.json: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | // This features file defines manifest keys implemented under src/chrome. 6 | // See chrome/common/extensions/api/_features.md to understand this file, as 7 | // well as feature.h, simple_feature.h, and feature_provider.h. 8 | 9 | { 10 | "content_scripts": { 11 | "channel": "stable", 12 | "extension_types": ["extension", "legacy_packaged_app"] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /shell/common/heap_snapshot.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #ifndef SHELL_COMMON_HEAP_SNAPSHOT_H_ 6 | #define SHELL_COMMON_HEAP_SNAPSHOT_H_ 7 | 8 | #include "base/files/file.h" 9 | #include "v8/include/v8.h" 10 | 11 | namespace electron { 12 | 13 | bool TakeHeapSnapshot(v8::Isolate* isolate, base::File* file); 14 | 15 | } // namespace electron 16 | 17 | #endif // SHELL_COMMON_HEAP_SNAPSHOT_H_ 18 | -------------------------------------------------------------------------------- /shell/common/promise_util.cc: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2018 GitHub, Inc. 2 | // Use of this source code is governed by the MIT license that can be 3 | // found in the LICENSE file. 4 | 5 | #include "shell/common/promise_util.h" 6 | 7 | namespace mate { 8 | 9 | template 10 | v8::Local mate::Converter>::ToV8( 11 | v8::Isolate*, 12 | const electron::util::Promise& val) { 13 | return val.GetHandle(); 14 | } 15 | 16 | template <> 17 | v8::Local mate::Converter>::ToV8( 18 | v8::Isolate*, 19 | const electron::util::Promise& val) { 20 | return val.GetHandle(); 21 | } 22 | 23 | } // namespace mate 24 | -------------------------------------------------------------------------------- /shell/common/resources/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | ${ELECTRON_BUNDLE_ID} 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${PRODUCT_NAME} 11 | CFBundlePackageType 12 | FMWK 13 | NSSupportsAutomaticGraphicsSwitching 14 | 15 | CFBundleVersion 16 | ${ELECTRON_VERSION} 17 | 18 | 19 | -------------------------------------------------------------------------------- /shell/renderer/resources/mac/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleIdentifier 6 | ${ELECTRON_BUNDLE_ID} 7 | CFBundleName 8 | ${PRODUCT_NAME} 9 | CFBundlePackageType 10 | APPL 11 | LSUIElement 12 | 13 | NSSupportsAutomaticGraphicsSwitching 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spec-main/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "mocha": true, 5 | "jquery": true, 6 | "serviceworker": true 7 | }, 8 | "globals": { 9 | "Bindings": true, 10 | "Components": true, 11 | "UI": true, 12 | "WebView": true 13 | }, 14 | "plugins": [ 15 | "mocha" 16 | ], 17 | "rules": { 18 | "mocha/no-exclusive-tests": "error" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spec-main/.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /spec-main/api-power-save-blocker-spec.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai' 2 | import { powerSaveBlocker } from 'electron' 3 | 4 | describe('powerSaveBlocker module', () => { 5 | it('can be started and stopped', () => { 6 | expect(powerSaveBlocker.isStarted(-1)).to.be.false('is started') 7 | const id = powerSaveBlocker.start('prevent-app-suspension') 8 | expect(id).to.to.be.a('number') 9 | expect(powerSaveBlocker.isStarted(id)).to.be.true('is started') 10 | powerSaveBlocker.stop(id) 11 | expect(powerSaveBlocker.isStarted(id)).to.be.false('is started') 12 | }) 13 | }) 14 | -------------------------------------------------------------------------------- /spec-main/api-view-spec.ts: -------------------------------------------------------------------------------- 1 | import { closeWindow } from './window-helpers' 2 | import { TopLevelWindow, View } from 'electron' 3 | 4 | describe('View', () => { 5 | let w: TopLevelWindow 6 | afterEach(async () => { 7 | await closeWindow(w as any) 8 | w = null as unknown as TopLevelWindow 9 | }) 10 | 11 | it('can be used as content view', () => { 12 | w = new TopLevelWindow({ show: false }) 13 | w.setContentView(new View()) 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /spec-main/fixtures/api/leak-exit-webcontentsview.js: -------------------------------------------------------------------------------- 1 | const { WebContentsView, app, webContents } = require('electron') 2 | app.on('ready', function () { 3 | const web = webContents.create({}) 4 | new WebContentsView(web) // eslint-disable-line 5 | 6 | process.nextTick(() => app.quit()) 7 | }) 8 | -------------------------------------------------------------------------------- /spec-main/fixtures/api/net-log/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "net-log", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec-main/fixtures/blank.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec-main/fixtures/blank.html -------------------------------------------------------------------------------- /spec-main/fixtures/chromium/other-window.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron') 2 | 3 | const ints = (...args) => args.map(a => parseInt(a, 10)) 4 | 5 | const [x, y, width, height] = ints(...process.argv.slice(2)) 6 | 7 | let w 8 | 9 | app.whenReady().then(() => { 10 | w = new BrowserWindow({ 11 | x, 12 | y, 13 | width, 14 | height 15 | }) 16 | console.log('__ready__') 17 | }) 18 | 19 | process.on('SIGTERM', () => { 20 | process.exit(0) 21 | }) 22 | -------------------------------------------------------------------------------- /spec-main/fixtures/chromium/visibilitystate.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | 18 | 19 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/chrome-runtime/main.js: -------------------------------------------------------------------------------- 1 | document.documentElement.textContent = JSON.stringify({ 2 | manifest: chrome.runtime.getManifest(), 3 | id: chrome.runtime.id, 4 | url: chrome.runtime.getURL('main.js'), 5 | }) 6 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/chrome-runtime/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-runtime", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "manifest_version": 2 12 | } 13 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/chrome-storage/main.js: -------------------------------------------------------------------------------- 1 | chrome.storage.local.set({key: 'value'}, () => { 2 | chrome.storage.local.get(['key'], ({key}) => { 3 | const script = document.createElement('script') 4 | script.textContent = `require('electron').ipcRenderer.send('storage-success', ${JSON.stringify(key)})` 5 | document.documentElement.appendChild(script) 6 | }) 7 | }) 8 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/chrome-storage/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-storage", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "permissions": [ 12 | "storage" 13 | ], 14 | "manifest_version": 2 15 | } 16 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/red-bg/main.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red' 2 | -------------------------------------------------------------------------------- /spec-main/fixtures/extensions/red-bg/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "red-bg", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "manifest_version": 2 12 | } 13 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame-container-webview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page with a webview 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame-with-frame-container-webview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page with a webview 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame-with-frame-container.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is the root page 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame-with-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is a frame, is has one child 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is a frame, it has no children 11 | 12 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer, webFrame } = require('electron') 2 | 3 | window.isolatedGlobal = true 4 | 5 | ipcRenderer.send('preload-ran', window.location.href, webFrame.routingId) 6 | 7 | ipcRenderer.on('preload-ping', () => { 8 | ipcRenderer.send('preload-pong', webFrame.routingId) 9 | }) 10 | -------------------------------------------------------------------------------- /spec-main/fixtures/sub-frames/webview-iframe-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | if (process.isMainFrame) { 4 | window.addEventListener('DOMContentLoaded', () => { 5 | const webview = document.createElement('webview') 6 | webview.src = 'about:blank' 7 | webview.addEventListener('did-finish-load', () => { 8 | ipcRenderer.send('webview-loaded') 9 | }, { once: true }) 10 | document.body.appendChild(webview) 11 | }) 12 | } else { 13 | ipcRenderer.send('preload-in-frame') 14 | } 15 | -------------------------------------------------------------------------------- /spec-main/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-test-main", 3 | "productName": "Electron Test Main", 4 | "main": "index.js", 5 | "version": "0.1.0" 6 | } 7 | -------------------------------------------------------------------------------- /spec-main/spec-helpers.ts: -------------------------------------------------------------------------------- 1 | export const ifit = (condition: boolean) => (condition ? it : it.skip) 2 | export const ifdescribe = (condition: boolean) => (condition ? describe : describe.skip) 3 | 4 | export const delay = (time: number) => new Promise(r => setTimeout(r, time)) 5 | -------------------------------------------------------------------------------- /spec-main/types-spec.ts: -------------------------------------------------------------------------------- 1 | import { expect } from 'chai' 2 | 3 | describe('bundled @types/node', () => { 4 | it('should match the major version of bundled node', () => { 5 | expect(require('../npm/package.json').dependencies).to.have.property('@types/node') 6 | const range = require('../npm/package.json').dependencies['@types/node'] 7 | expect(range).to.match(/^\^.+/, 'should allow any type dep in a major range') 8 | expect(range.slice(1).split('.')[0]).to.equal(process.versions.node.split('.')[0]) 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /spec/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "browser": true, 4 | "mocha": true, 5 | "jquery": true, 6 | "serviceworker": true 7 | }, 8 | "globals": { 9 | "Bindings": true, 10 | "Components": true, 11 | "UI": true, 12 | "WebView": true 13 | }, 14 | "plugins": [ 15 | "mocha" 16 | ], 17 | "rules": { 18 | "mocha/no-exclusive-tests": "error" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /spec/configs/browsertests.yml: -------------------------------------------------------------------------------- 1 | tests: 2 | - content_browsertests 3 | -------------------------------------------------------------------------------- /spec/expect-helpers.js: -------------------------------------------------------------------------------- 1 | function resolveSingleObjectGetters (object) { 2 | if (object && typeof object === 'object') { 3 | const newObject = {} 4 | for (const key in object) { 5 | newObject[key] = resolveGetters(object[key])[0] 6 | } 7 | return newObject 8 | } 9 | return object 10 | } 11 | 12 | function resolveGetters (...args) { 13 | return args.map(resolveSingleObjectGetters) 14 | } 15 | 16 | module.exports = { 17 | resolveGetters 18 | } 19 | -------------------------------------------------------------------------------- /spec/fixtures/api/allocate-memory.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/app-path/lib/index.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | const payload = { 4 | appPath: app.getAppPath() 5 | } 6 | 7 | process.stdout.write(JSON.stringify(payload)) 8 | process.stdout.end() 9 | 10 | process.exit() 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/app-path/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "app-path", 3 | "main": "lib/index.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/beforeunload-false-prevent3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures/api/beforeunload-false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /spec/fixtures/api/blank.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/close-beforeunload-empty-string.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /spec/fixtures/api/close-beforeunload-false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /spec/fixtures/api/close-beforeunload-undefined.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/api/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/command-line/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.on('ready', () => { 4 | const payload = { 5 | hasSwitch: app.commandLine.hasSwitch('foobar'), 6 | getSwitchValue: app.commandLine.getSwitchValue('foobar') 7 | } 8 | 9 | process.stdout.write(JSON.stringify(payload)) 10 | process.stdout.end() 11 | 12 | setImmediate(() => { 13 | app.quit() 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /spec/fixtures/api/command-line/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "command-line", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/cookie-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-cookie-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/crash_child.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /spec/fixtures/api/default-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "default-menu", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/did-fail-load-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app.asar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/api/electron-main-module/app.asar -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app/index.js: -------------------------------------------------------------------------------- 1 | try { 2 | require('some-module') 3 | } catch (err) { 4 | console.error(err) 5 | process.exit(1) 6 | } 7 | 8 | process.exit(0) 9 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app/node_modules/some-module/main2.js: -------------------------------------------------------------------------------- 1 | // Nothing to do here 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-main-module/app/node_modules/some-module/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "some-module", 3 | "main": "./main2.js" 4 | } -------------------------------------------------------------------------------- /spec/fixtures/api/electron-module-app/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-module-app/node_modules/electron/index.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/api/electron-module-app/node_modules/electron/index.js -------------------------------------------------------------------------------- /spec/fixtures/api/electron-module-app/node_modules/electron/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron", 3 | "main": "index.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-module-app/node_modules/foo/index.js: -------------------------------------------------------------------------------- 1 | exports.bar = function () {} 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/electron-module-app/node_modules/foo/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "foo", 3 | "main": "index.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/execute-javascript.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/api/execute-javascript.html -------------------------------------------------------------------------------- /spec/fixtures/api/exit-closes-all-windows-app/main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron') 2 | 3 | const windows = [] 4 | 5 | function createWindow (id) { 6 | const window = new BrowserWindow({ show: false }) 7 | window.loadURL(`data:,window${id}`) 8 | windows.push(window) 9 | } 10 | 11 | app.once('ready', () => { 12 | for (let i = 1; i <= 5; i++) { 13 | createWindow(i) 14 | } 15 | 16 | setImmediate(function () { 17 | app.exit(123) 18 | }) 19 | }) 20 | -------------------------------------------------------------------------------- /spec/fixtures/api/exit-closes-all-windows-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-exit-closes-all-windows", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/frame-subscriber.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/gpu-info.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.commandLine.appendSwitch('--disable-software-rasterizer') 4 | 5 | app.on('ready', () => { 6 | const infoType = process.argv.pop() 7 | app.getGPUInfo(infoType).then( 8 | (gpuInfo) => { 9 | console.log(JSON.stringify(gpuInfo)) 10 | app.exit(0) 11 | }, 12 | (error) => { 13 | console.error(error) 14 | app.exit(1) 15 | } 16 | ) 17 | }) 18 | -------------------------------------------------------------------------------- /spec/fixtures/api/ipc-main-listeners/main.js: -------------------------------------------------------------------------------- 1 | const { app, ipcMain } = require('electron') 2 | 3 | app.on('ready', () => { 4 | process.stdout.write(JSON.stringify(ipcMain.eventNames())) 5 | process.stdout.end() 6 | 7 | setImmediate(() => { 8 | app.quit() 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/ipc-main-listeners/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ipc-main-listeners", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/isolated-fetch-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | // Ensure fetch works from isolated world origin 4 | fetch('https://localhost:1234').catch(err => { 5 | ipcRenderer.send('isolated-fetch-error', err.message) 6 | }) 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/leak-exit-browserview.js: -------------------------------------------------------------------------------- 1 | const { BrowserView, app } = require('electron') 2 | app.on('ready', function () { 3 | new BrowserView({}) // eslint-disable-line 4 | 5 | process.nextTick(() => app.quit()) 6 | }) 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/leak-exit-webcontents.js: -------------------------------------------------------------------------------- 1 | const { app, webContents } = require('electron') 2 | app.on('ready', function () { 3 | webContents.create({}) 4 | 5 | process.nextTick(() => app.quit()) 6 | }) 7 | -------------------------------------------------------------------------------- /spec/fixtures/api/loaded-from-dataurl.js: -------------------------------------------------------------------------------- 1 | require('electron').ipcRenderer.send('answer', 'test') 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/locale-check/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.on('ready', () => { 4 | process.stdout.write(app.getLocale()) 5 | process.stdout.end() 6 | 7 | setImmediate(() => { 8 | app.quit() 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/locale-check/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "locale-check", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/localstorage.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/api/mixed-sandbox-app/electron-app-mixed-sandbox-preload.js: -------------------------------------------------------------------------------- 1 | require('electron').ipcRenderer.send('argv', process.argv) 2 | -------------------------------------------------------------------------------- /spec/fixtures/api/mixed-sandbox-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-app-mixed-sandbox", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-argv.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-blank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-child.html: -------------------------------------------------------------------------------- 1 |

Hello

2 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-cross-origin.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-file.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-isolated-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | window.addEventListener('message', (event) => { 4 | ipcRenderer.send('answer', event.data) 5 | }) 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-isolated.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-native-addon.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /spec/fixtures/api/native-window-open-no-allowpopups.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer, remote } = require('electron') 2 | 3 | ipcRenderer.send('answer', process.argv, remote.getCurrentWindow().webContents.getWebPreferences()) 4 | window.close() 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window-webview-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | window.ipcRenderer = ipcRenderer 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window-webview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /spec/fixtures/api/new-window.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/api/no-leak.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Document 5 | 6 | 7 | 16 | 17 | -------------------------------------------------------------------------------- /spec/fixtures/api/offscreen-rendering.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/api/preload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /spec/fixtures/api/quit-app/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.on('ready', function () { 4 | // This setImmediate call gets the spec passing on Linux 5 | setImmediate(function () { 6 | app.exit(123) 7 | }) 8 | }) 9 | 10 | process.on('exit', function (code) { 11 | console.log('Exit event with code: ' + code) 12 | }) 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/quit-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-quit-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/relaunch/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-app-relaunch", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/remote-event-handler.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /spec/fixtures/api/send-sync-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-worker/service-worker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/service-worker/service-worker.js: -------------------------------------------------------------------------------- 1 | console.log('Service worker startups.') 2 | 3 | self.addEventListener('install', (event) => { 4 | console.log('Service worker installed.') 5 | }) 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/shared-worker/shared-worker.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /spec/fixtures/api/shared-worker/shared-worker1.js: -------------------------------------------------------------------------------- 1 | self.onconnect = function (e) { 2 | const port = e.ports[0] 3 | port.postMessage('ready') 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/shared-worker/shared-worker2.js: -------------------------------------------------------------------------------- 1 | self.onconnect = function (e) { 2 | const port = e.ports[0] 3 | port.postMessage('ready') 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/singleton/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.once('ready', () => { 4 | console.log('started') // ping parent 5 | }) 6 | 7 | const gotTheLock = app.requestSingleInstanceLock() 8 | 9 | app.on('second-instance', (event, args) => { 10 | setImmediate(() => { 11 | console.log(JSON.stringify(args)) 12 | app.exit(0) 13 | }) 14 | }) 15 | 16 | if (!gotTheLock) { 17 | app.exit(1) 18 | } 19 | -------------------------------------------------------------------------------- /spec/fixtures/api/singleton/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-app-singleton", 3 | "main": "main.js" 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/api/site-instance-overrides/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/api/site-instance-overrides/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "site-instance-overrides", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/site-instance-overrides/preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | ipcRenderer.send('pid', process.pid) 4 | -------------------------------------------------------------------------------- /spec/fixtures/api/unload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-all-closed/main.js: -------------------------------------------------------------------------------- 1 | const { app, BrowserWindow } = require('electron') 2 | 3 | let handled = false 4 | 5 | if (app.commandLine.hasSwitch('handle-event')) { 6 | app.on('window-all-closed', () => { 7 | handled = true 8 | app.quit() 9 | }) 10 | } 11 | 12 | app.on('quit', () => { 13 | process.stdout.write(JSON.stringify(handled)) 14 | process.stdout.end() 15 | }) 16 | 17 | app.on('ready', () => { 18 | const win = new BrowserWindow() 19 | win.close() 20 | }) 21 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-all-closed/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "window-all-closed", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-change.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | foo 9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-final.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | bar 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-location-open.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/api/window-open-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | setImmediate(function () { 4 | if (window.location.toString() === 'bar://page') { 5 | const windowOpenerIsNull = window.opener == null 6 | ipcRenderer.send('answer', process.argv, typeof global.process, windowOpenerIsNull) 7 | window.close() 8 | } 9 | }) 10 | -------------------------------------------------------------------------------- /spec/fixtures/assets/1x1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/1x1.png -------------------------------------------------------------------------------- /spec/fixtures/assets/2x2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/2x2.jpg -------------------------------------------------------------------------------- /spec/fixtures/assets/3x3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/3x3.png -------------------------------------------------------------------------------- /spec/fixtures/assets/LICENSE: -------------------------------------------------------------------------------- 1 | tone.wav 2 | http://soundbible.com/1815-A-Tone.html 3 | License: Public Domain 4 | -------------------------------------------------------------------------------- /spec/fixtures/assets/cat.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/cat.pdf -------------------------------------------------------------------------------- /spec/fixtures/assets/icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/icon.ico -------------------------------------------------------------------------------- /spec/fixtures/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/logo.png -------------------------------------------------------------------------------- /spec/fixtures/assets/logo_Template.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/logo_Template.png -------------------------------------------------------------------------------- /spec/fixtures/assets/shortcut.lnk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/shortcut.lnk -------------------------------------------------------------------------------- /spec/fixtures/assets/tone.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/assets/tone.wav -------------------------------------------------------------------------------- /spec/fixtures/auto-update/check/index.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', (err) => { 2 | console.error(err) 3 | process.exit(1) 4 | }) 5 | 6 | const { autoUpdater } = require('electron') 7 | 8 | autoUpdater.on('error', (err) => { 9 | console.error(err) 10 | process.exit(1) 11 | }) 12 | 13 | const feedUrl = process.argv[1] 14 | 15 | autoUpdater.setFeedURL({ 16 | url: feedUrl 17 | }) 18 | 19 | autoUpdater.checkForUpdates() 20 | 21 | autoUpdater.on('update-not-available', () => { 22 | process.exit(0) 23 | }) 24 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/check/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "initial-app", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } -------------------------------------------------------------------------------- /spec/fixtures/auto-update/initial/index.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', (err) => { 2 | console.error(err) 3 | process.exit(1) 4 | }) 5 | 6 | const { autoUpdater } = require('electron') 7 | 8 | const feedUrl = process.argv[1] 9 | 10 | console.log('Setting Feed URL') 11 | 12 | autoUpdater.setFeedURL({ 13 | url: feedUrl 14 | }) 15 | 16 | console.log('Feed URL Set:', feedUrl) 17 | 18 | process.exit(0) 19 | -------------------------------------------------------------------------------- /spec/fixtures/auto-update/initial/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "initial-app", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } -------------------------------------------------------------------------------- /spec/fixtures/auto-update/update/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "initial-app", 3 | "version": "1.0.0", 4 | "main": "./index.js" 5 | } -------------------------------------------------------------------------------- /spec/fixtures/certificates/client.p12: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/certificates/client.p12 -------------------------------------------------------------------------------- /spec/fixtures/crash-app/main.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | app.on('ready', () => { 4 | process.crash() 5 | }) 6 | -------------------------------------------------------------------------------- /spec/fixtures/crash-app/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "electron-crash-app", 3 | "main": "main.js" 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/bad-manifest/manifest.json: -------------------------------------------------------------------------------- 1 | } 2 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/_locales/en/messages.json: -------------------------------------------------------------------------------- 1 | { 2 | "foo": { 3 | "message": "foo - $BAZ$ ($2)", 4 | "placeholders": { 5 | "baz": { 6 | "content": "$1" 7 | } 8 | } 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/foo.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | foo 6 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/devtools-extensions/foo/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "foo", 3 | "version": "1.0", 4 | "devtools_page": "foo.html", 5 | "default_locale": "en" 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-api/background.js: -------------------------------------------------------------------------------- 1 | /* global chrome */ 2 | 3 | chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { 4 | const { method, args = [] } = message 5 | const tabId = sender.tab.id 6 | 7 | switch (method) { 8 | case 'sendMessage': { 9 | const [message] = args 10 | chrome.tabs.sendMessage(tabId, { message, tabId }, undefined, sendResponse) 11 | break 12 | } 13 | 14 | case 'executeScript': { 15 | const [code] = args 16 | chrome.tabs.executeScript(tabId, { code }, ([result]) => sendResponse(result)) 17 | break 18 | } 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/chrome-api/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "chrome-api", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "js": ["main.js"], 8 | "run_at": "document_start" 9 | } 10 | ], 11 | "background": { 12 | "scripts": ["background.js"], 13 | "persistent": false 14 | }, 15 | "manifest_version": 2 16 | } 17 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-end/end.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red' 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-end/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-end", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["end.js"], 9 | "run_at": "document_end" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-idle/idle.js: -------------------------------------------------------------------------------- 1 | document.body.style.backgroundColor = 'red' 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-idle/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-idle", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["idle.js"], 9 | "run_at": "document_idle" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-start/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "document-start", 3 | "version": "1.0", 4 | "description": "", 5 | "content_scripts": [ 6 | { 7 | "matches": [""], 8 | "js": ["start.js"], 9 | "run_at": "document_start" 10 | } 11 | ], 12 | "manifest_version": 2 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script-document-start/start.js: -------------------------------------------------------------------------------- 1 | document.documentElement.style.backgroundColor = 'red' 2 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/all_frames-disabled.css: -------------------------------------------------------------------------------- 1 | #all_frames_disabled { 2 | background: blue; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/all_frames-enabled.css: -------------------------------------------------------------------------------- 1 | #all_frames_enabled { 2 | background: red; 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/all_frames-preload.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer, webFrame } = require('electron') 2 | 3 | if (process.isMainFrame) { 4 | // https://github.com/electron/electron/issues/17252 5 | ipcRenderer.on('executeJavaScriptInFrame', (event, frameRoutingId, code, responseId) => { 6 | const frame = webFrame.findFrameByRoutingId(frameRoutingId) 7 | if (!frame) { 8 | throw new Error(`Can't find frame for routing ID ${frameRoutingId}`) 9 | } 10 | frame.executeJavaScript(code, false).then(result => { 11 | event.sender.send(`executeJavaScriptInFrame_${responseId}`, result) 12 | }) 13 | }) 14 | } 15 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/frame-with-frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Document 8 | 9 | 10 | This is a frame, is has one child 11 | 12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/frame.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Document 6 | 7 | 8 | This is a frame, it has no children 9 |
10 |
11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/extensions/content-script/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "content-script-test", 3 | "version": "1.0", 4 | "content_scripts": [ 5 | { 6 | "matches": [""], 7 | "css": ["all_frames-enabled.css"], 8 | "run_at": "document_start", 9 | "all_frames": true 10 | }, 11 | { 12 | "matches": [""], 13 | "css": ["all_frames-disabled.css"], 14 | "run_at": "document_start", 15 | "all_frames": false 16 | } 17 | ], 18 | "manifest_version": 2 19 | } 20 | -------------------------------------------------------------------------------- /spec/fixtures/module/access-blink-apis.js: -------------------------------------------------------------------------------- 1 | window.delayed = true 2 | 3 | global.getGlobalNames = () => { 4 | return Object.getOwnPropertyNames(global) 5 | .filter(key => typeof global[key] === 'function') 6 | .filter(key => key !== 'WebView') 7 | .sort() 8 | } 9 | 10 | const atPreload = global.getGlobalNames() 11 | 12 | window.addEventListener('load', () => { 13 | window.test = { 14 | atPreload, 15 | atLoad: global.getGlobalNames() 16 | } 17 | }) 18 | -------------------------------------------------------------------------------- /spec/fixtures/module/answer.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | window.answer = function (answer) { 3 | ipcRenderer.send('answer', answer) 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/asar.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | process.on('message', function (file) { 3 | process.send(fs.readFileSync(file).toString()) 4 | }) 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/call.js: -------------------------------------------------------------------------------- 1 | exports.call = function (func) { 2 | return func() 3 | } 4 | 5 | exports.constructor = function () { 6 | this.test = 'test' 7 | } 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/check-arguments.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | window.onload = function () { 3 | ipcRenderer.send('answer', process.argv) 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/circular.js: -------------------------------------------------------------------------------- 1 | exports.returnArgs = function (...args) { 2 | return args 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/class.js: -------------------------------------------------------------------------------- 1 | 'use strict' 2 | 3 | let value = 'old' 4 | 5 | class BaseClass { 6 | method () { 7 | return 'method' 8 | } 9 | 10 | get readonly () { 11 | return 'readonly' 12 | } 13 | 14 | get value () { 15 | return value 16 | } 17 | 18 | set value (val) { 19 | value = val 20 | } 21 | } 22 | 23 | class DerivedClass extends BaseClass { 24 | } 25 | 26 | module.exports = { 27 | base: new BaseClass(), 28 | derived: new DerivedClass() 29 | } 30 | -------------------------------------------------------------------------------- /spec/fixtures/module/crash.js: -------------------------------------------------------------------------------- 1 | process.crashReporter.start({ 2 | productName: 'Zombies', 3 | companyName: 'Umbrella Corporation', 4 | crashesDirectory: process.argv[4], 5 | submitURL: `http://127.0.0.1:${process.argv[2]}`, 6 | extra: { 7 | extra1: 'extra1', 8 | extra2: 'extra2', 9 | _version: process.argv[3] 10 | } 11 | }) 12 | 13 | if (process.platform !== 'linux') { 14 | process.crashReporter.addExtraParameter('newExtra', 'newExtra') 15 | process.crashReporter.addExtraParameter('removeExtra', 'removeExtra') 16 | process.crashReporter.removeExtraParameter('removeExtra') 17 | } 18 | 19 | process.nextTick(() => process.crash()) 20 | -------------------------------------------------------------------------------- /spec/fixtures/module/create_socket.js: -------------------------------------------------------------------------------- 1 | const net = require('net') 2 | const server = net.createServer(function () {}) 3 | server.listen(process.argv[2]) 4 | process.exit(0) 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-buffer.js: -------------------------------------------------------------------------------- 1 | const Buffer = 'declared Buffer' 2 | module.exports = Buffer 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-global.js: -------------------------------------------------------------------------------- 1 | const global = 'declared global' 2 | module.exports = global 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/declare-process.js: -------------------------------------------------------------------------------- 1 | const process = 'declared process' 2 | module.exports = process 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/delay-exit.js: -------------------------------------------------------------------------------- 1 | const { app } = require('electron') 2 | 3 | process.on('message', () => app.quit()) 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/delete-buffer.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | const { remote } = require('electron') 3 | const { Buffer } = window 4 | 5 | delete window.Buffer 6 | delete global.Buffer 7 | 8 | // Test that remote.js doesn't use Buffer global 9 | remote.require(path.join(__dirname, 'print_name.js')).echo(Buffer.from('bar')) 10 | 11 | window.test = Buffer.from('buffer') 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/echo-renamed.js: -------------------------------------------------------------------------------- 1 | let echo 2 | try { 3 | echo = require('echo') 4 | } catch (e) { 5 | process.exit(1) 6 | } 7 | process.exit(echo(0)) 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/echo.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', function (err) { 2 | process.send(err.message) 3 | }) 4 | 5 | const echo = require('echo') 6 | process.send(echo('ok')) 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/empty.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | window.addEventListener('message', (event) => { 4 | ipcRenderer.send('leak-result', event.data) 5 | }) 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/error-properties.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | set bar (value) { 3 | throw new Error('setting error') 4 | } 5 | 6 | get bar () { 7 | throw new Error('getting error') 8 | } 9 | } 10 | 11 | module.exports = new Foo() 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/exception.js: -------------------------------------------------------------------------------- 1 | module.exports = function (error) { 2 | throw error 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/export-function-with-properties.js: -------------------------------------------------------------------------------- 1 | function foo () {} 2 | foo.bar = 'baz' 3 | 4 | module.exports = foo 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/fork_ping.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | 3 | process.on('uncaughtException', function (error) { 4 | process.send(error.stack) 5 | }) 6 | 7 | const child = require('child_process').fork(path.join(__dirname, '/ping.js')) 8 | process.on('message', function (msg) { 9 | child.send(msg) 10 | }) 11 | child.on('message', function (msg) { 12 | process.send(msg) 13 | }) 14 | child.on('exit', function (code) { 15 | process.exit(code) 16 | }) 17 | -------------------------------------------------------------------------------- /spec/fixtures/module/function-with-args.js: -------------------------------------------------------------------------------- 1 | module.exports = function (cb) { 2 | return cb.length 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/function-with-missing-properties.js: -------------------------------------------------------------------------------- 1 | exports.setup = function () { 2 | const foo = {} 3 | 4 | foo.bar = function () { 5 | return delete foo.bar.baz && delete foo.bar 6 | } 7 | 8 | foo.bar.baz = function () { 9 | return 3 10 | } 11 | 12 | return foo 13 | } 14 | -------------------------------------------------------------------------------- /spec/fixtures/module/function-with-properties.js: -------------------------------------------------------------------------------- 1 | function foo () { 2 | return 'hello' 3 | } 4 | foo.bar = 'baz' 5 | foo.nested = { 6 | prop: 'yes' 7 | } 8 | foo.method1 = function () { 9 | return 'world' 10 | } 11 | foo.method1.prop1 = function () { 12 | return 123 13 | } 14 | 15 | module.exports = { 16 | foo: foo 17 | } 18 | -------------------------------------------------------------------------------- /spec/fixtures/module/function.js: -------------------------------------------------------------------------------- 1 | exports.aFunction = function () { return 1127 } 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/get-global-preload.js: -------------------------------------------------------------------------------- 1 | require('electron').ipcRenderer.send('vars', window.preload1, window.preload2, window.preload3) 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/hello-child.js: -------------------------------------------------------------------------------- 1 | class Hello { 2 | say () { 3 | return 'hi child window' 4 | } 5 | } 6 | module.exports = Hello 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/hello.js: -------------------------------------------------------------------------------- 1 | class Hello { 2 | say () { 3 | return 'hi' 4 | } 5 | } 6 | module.exports = Hello 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/id.js: -------------------------------------------------------------------------------- 1 | exports.id = 1127 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/isolated-ping.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | ipcRenderer.send('pong') 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/locale-compare.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send([ 3 | 'a'.localeCompare('a'), 4 | 'ä'.localeCompare('z', 'de'), 5 | 'ä'.localeCompare('a', 'sv', { sensitivity: 'base' }) 6 | ]) 7 | }) 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/no-asar.js: -------------------------------------------------------------------------------- 1 | const fs = require('fs') 2 | const path = require('path') 3 | 4 | const stats = fs.statSync(path.join(__dirname, '..', 'test.asar', 'a.asar')) 5 | 6 | const details = { 7 | isFile: stats.isFile(), 8 | size: stats.size 9 | } 10 | 11 | if (process.send != null) { 12 | process.send(details) 13 | } else { 14 | console.log(JSON.stringify(details)) 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/module/no-prototype.js: -------------------------------------------------------------------------------- 1 | const foo = Object.create(null) 2 | foo.bar = 'baz' 3 | foo.baz = false 4 | module.exports = { 5 | foo: foo, 6 | bar: 1234, 7 | anonymous: new (class {})(), 8 | getConstructorName: function (value) { 9 | return value.constructor.name 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/noop.js: -------------------------------------------------------------------------------- 1 | process.exit(0) 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/original-fs.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send(typeof require('original-fs')) 3 | }) 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/ping.js: -------------------------------------------------------------------------------- 1 | process.on('message', function (msg) { 2 | process.send(msg) 3 | process.exit(0) 4 | }) 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-context.js: -------------------------------------------------------------------------------- 1 | var test = 'test' // eslint-disable-line 2 | 3 | const types = { 4 | require: typeof require, 5 | electron: typeof electron, 6 | window: typeof window, 7 | localVar: typeof window.test 8 | } 9 | 10 | console.log(JSON.stringify(types)) 11 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-disable-remote.js: -------------------------------------------------------------------------------- 1 | setImmediate(function () { 2 | try { 3 | const { remote } = require('electron') 4 | console.log(JSON.stringify(typeof remote)) 5 | } catch (e) { 6 | console.log(e.message) 7 | } 8 | }) 9 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-error-exception.js: -------------------------------------------------------------------------------- 1 | throw new Error('Hello World!') 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-error-syntax.js: -------------------------------------------------------------------------------- 1 | // eslint-disable-next-line 2 | foobar 3 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-ipc-ping-pong.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | ipcRenderer.on('ping', function (event, payload) { 4 | ipcRenderer.sendTo(event.senderId, 'pong', payload) 5 | }) 6 | 7 | ipcRenderer.on('ping-æøåü', function (event, payload) { 8 | ipcRenderer.sendTo(event.senderId, 'pong-æøåü', payload) 9 | }) 10 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-ipc.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | ipcRenderer.on('ping', function (event, message) { 3 | ipcRenderer.sendToHost('pong', message) 4 | }) 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-node-off-wrapper.js: -------------------------------------------------------------------------------- 1 | setImmediate(function () { 2 | require('./preload-required-module') 3 | }) 4 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-node-off.js: -------------------------------------------------------------------------------- 1 | setImmediate(function () { 2 | try { 3 | const types = { 4 | process: typeof process, 5 | setImmediate: typeof setImmediate, 6 | global: typeof global, 7 | Buffer: typeof Buffer 8 | } 9 | console.log(JSON.stringify(types)) 10 | } catch (e) { 11 | console.log(e.message) 12 | } 13 | }) 14 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-pdf-loaded-in-nested-subframe.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | document.addEventListener('DOMContentLoaded', (event) => { 4 | const outerFrame = document.querySelector('#outer-frame') 5 | if (outerFrame) { 6 | outerFrame.onload = function () { 7 | const pdframe = outerFrame.contentWindow.document.getElementById('pdf-frame') 8 | if (pdframe) { 9 | pdframe.contentWindow.addEventListener('pdf-loaded', (event) => { 10 | ipcRenderer.send('pdf-loaded', event.detail) 11 | }) 12 | } 13 | } 14 | } 15 | }) 16 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-pdf-loaded-in-subframe.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | document.addEventListener('DOMContentLoaded', (event) => { 4 | const subframe = document.querySelector('#pdf-frame') 5 | if (subframe) { 6 | subframe.contentWindow.addEventListener('pdf-loaded', (event) => { 7 | ipcRenderer.send('pdf-loaded', event.detail) 8 | }) 9 | } 10 | }) 11 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-pdf-loaded.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | window.addEventListener('pdf-loaded', function (event) { 4 | ipcRenderer.send('pdf-loaded', event.detail) 5 | }) 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-remote-function.js: -------------------------------------------------------------------------------- 1 | const { remote, ipcRenderer } = require('electron') 2 | remote.getCurrentWindow().rendererFunc = () => { 3 | ipcRenderer.send('done') 4 | } 5 | remote.getCurrentWindow().rendererFunc() 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-remote.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer, remote } = require('electron') 2 | 3 | window.onload = function () { 4 | ipcRenderer.send('remote', typeof remote) 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-required-module.js: -------------------------------------------------------------------------------- 1 | try { 2 | const types = { 3 | process: typeof process, 4 | setImmediate: typeof setImmediate, 5 | global: typeof global, 6 | Buffer: typeof Buffer, 7 | 'global.Buffer': typeof global.Buffer 8 | } 9 | console.log(JSON.stringify(types)) 10 | } catch (e) { 11 | console.log(e.message) 12 | } 13 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-sandboxæø åü.js: -------------------------------------------------------------------------------- 1 | (function () { 2 | window.require = require 3 | if (location.protocol === 'file:') { 4 | window.test = 'preload' 5 | } 6 | })() 7 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-set-global.js: -------------------------------------------------------------------------------- 1 | window.foo = 'bar' 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload-webview.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | 3 | window.onload = function () { 4 | ipcRenderer.send('webview', typeof WebView) 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/preload.js: -------------------------------------------------------------------------------- 1 | const types = { 2 | require: typeof require, 3 | module: typeof module, 4 | process: typeof process, 5 | Buffer: typeof Buffer 6 | } 7 | console.log(JSON.stringify(types)) 8 | -------------------------------------------------------------------------------- /spec/fixtures/module/process-stdout.js: -------------------------------------------------------------------------------- 1 | process.stdout.write('pipes stdio') 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/process_args.js: -------------------------------------------------------------------------------- 1 | process.on('message', function () { 2 | process.send(process.argv) 3 | process.exit(0) 4 | }) 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/promise.js: -------------------------------------------------------------------------------- 1 | exports.twicePromise = function (promise) { 2 | return promise.then(function (value) { 3 | return value * 2 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/property.js: -------------------------------------------------------------------------------- 1 | exports.property = 1127 2 | 3 | function func () { 4 | 5 | } 6 | func.property = 'foo' 7 | exports.func = func 8 | 9 | exports.getFunctionProperty = () => { 10 | return `${func.property}-${process.type}` 11 | } 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/rejected-promise.js: -------------------------------------------------------------------------------- 1 | exports.reject = function (promise) { 2 | return promise.then(function () { 3 | throw Error('rejected') 4 | }) 5 | } 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/remote-object-set.js: -------------------------------------------------------------------------------- 1 | const { BrowserWindow } = require('electron') 2 | 3 | class Foo { 4 | set bar (value) { 5 | if (!(value instanceof BrowserWindow)) { 6 | throw new Error('setting error') 7 | } 8 | } 9 | } 10 | 11 | module.exports = new Foo() 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/remote-static.js: -------------------------------------------------------------------------------- 1 | class Foo { 2 | static foo () { 3 | return 3 4 | } 5 | 6 | baz () { 7 | return 123 8 | } 9 | } 10 | 11 | Foo.bar = 'baz' 12 | 13 | module.exports = { 14 | Foo: Foo 15 | } 16 | -------------------------------------------------------------------------------- /spec/fixtures/module/run-as-node.js: -------------------------------------------------------------------------------- 1 | console.log(JSON.stringify({ 2 | processLog: typeof process.log, 3 | processType: typeof process.type, 4 | window: typeof window 5 | })) 6 | -------------------------------------------------------------------------------- /spec/fixtures/module/send-later.js: -------------------------------------------------------------------------------- 1 | const { ipcRenderer } = require('electron') 2 | window.onload = function () { 3 | ipcRenderer.send('answer', typeof window.process, typeof window.Buffer) 4 | } 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-1.js: -------------------------------------------------------------------------------- 1 | window.preload1 = 'preload-1' 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-2.js: -------------------------------------------------------------------------------- 1 | window.preload2 = window.preload1 + '-2' 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global-preload-3.js: -------------------------------------------------------------------------------- 1 | window.preload3 = window.preload2 + '-3' 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-global.js: -------------------------------------------------------------------------------- 1 | if (!window.test) window.test = 'preload' 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/set-immediate.js: -------------------------------------------------------------------------------- 1 | process.on('uncaughtException', function (error) { 2 | process.send(error.message) 3 | process.exit(1) 4 | }) 5 | 6 | process.on('message', function () { 7 | setImmediate(function () { 8 | process.send('ok') 9 | process.exit(0) 10 | }) 11 | }) 12 | -------------------------------------------------------------------------------- /spec/fixtures/module/test.coffee: -------------------------------------------------------------------------------- 1 | module.exports = yes 2 | -------------------------------------------------------------------------------- /spec/fixtures/module/to-string-non-function.js: -------------------------------------------------------------------------------- 1 | function hello () { 2 | } 3 | hello.toString = 'hello' 4 | module.exports = { functionWithToStringProperty: hello } 5 | -------------------------------------------------------------------------------- /spec/fixtures/module/unhandled-rejection.js: -------------------------------------------------------------------------------- 1 | exports.reject = function () { 2 | return Promise.reject(new Error('rejected')) 3 | } 4 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/binding.gyp: -------------------------------------------------------------------------------- 1 | { 2 | "targets": [ 3 | { 4 | "target_name": "echo", 5 | "sources": [ 6 | "binding.cc" 7 | ] 8 | } 9 | ] 10 | } 11 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/lib/echo.js: -------------------------------------------------------------------------------- 1 | module.exports = require('../build/Release/echo.node').Print 2 | -------------------------------------------------------------------------------- /spec/fixtures/native-addon/echo/package.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "main": "./lib/echo.js", 4 | "name": "echo", 5 | "version": "0.0.1" 6 | } 7 | -------------------------------------------------------------------------------- /spec/fixtures/pages/a.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /spec/fixtures/pages/b.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page-security-onload-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page-security.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/base-page.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /spec/fixtures/pages/basic-auth.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /spec/fixtures/pages/beforeunload-false.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/pages/blank.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lecoursen/electron/e543fe702cd1ab9db41eb100473495eb5f87de7b/spec/fixtures/pages/blank.html -------------------------------------------------------------------------------- /spec/fixtures/pages/c.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spec/fixtures/pages/cache-storage.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/close.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/d.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/did-get-response-details.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /spec/fixtures/pages/dom-ready.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/e.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/external-string.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/pages/focus-web-contents.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /spec/fixtures/pages/fullscreen.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /spec/fixtures/pages/geolocation/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /spec/fixtures/pages/history-replace.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/history.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /spec/fixtures/pages/insecure-resources.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/fixtures/pages/ipc-message.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /spec/fixtures/pages/jquery.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /spec/fixtures/pages/key-events.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /spec/fixtures/pages/media-id-reset.html: -------------------------------------------------------------------------------- 1 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/native-module.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/onkeyup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/onmouseup.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /spec/fixtures/pages/partition/one.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /spec/fixtures/pages/pdf-in-iframe.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |