chore: rename atom -> electron (#21986)

This commit is contained in:
Jeremy Apthorp 2020-02-04 12:19:40 -08:00 committed by GitHub
parent f14fc4b041
commit d9321f4df7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
287 changed files with 1771 additions and 1708 deletions

View file

@ -136,7 +136,7 @@ webpack_build("electron_content_script_bundle") {
out_file = "$target_gen_dir/js2c/content_script_bundle.js" out_file = "$target_gen_dir/js2c/content_script_bundle.js"
} }
copy("atom_js2c_copy") { copy("electron_js2c_copy") {
sources = [ sources = [
"lib/common/asar.js", "lib/common/asar.js",
"lib/common/asar_init.js", "lib/common/asar_init.js",
@ -144,12 +144,12 @@ copy("atom_js2c_copy") {
outputs = [ "$target_gen_dir/js2c/{{source_file_part}}" ] outputs = [ "$target_gen_dir/js2c/{{source_file_part}}" ]
} }
action("atom_js2c") { action("electron_js2c") {
deps = [ deps = [
":atom_js2c_copy",
":electron_browser_bundle", ":electron_browser_bundle",
":electron_content_script_bundle", ":electron_content_script_bundle",
":electron_isolated_renderer_bundle", ":electron_isolated_renderer_bundle",
":electron_js2c_copy",
":electron_renderer_bundle", ":electron_renderer_bundle",
":electron_sandboxed_renderer_bundle", ":electron_sandboxed_renderer_bundle",
":electron_worker_bundle", ":electron_worker_bundle",
@ -170,7 +170,7 @@ action("atom_js2c") {
] ]
inputs = sources + [ "//third_party/electron_node/tools/js2c.py" ] inputs = sources + [ "//third_party/electron_node/tools/js2c.py" ]
outputs = [ "$root_gen_dir/atom_natives.cc" ] outputs = [ "$root_gen_dir/electron_natives.cc" ]
script = "tools/js2c.py" script = "tools/js2c.py"
args = [ rebase_path("//third_party/electron_node") ] + args = [ rebase_path("//third_party/electron_node") ] +
@ -312,7 +312,7 @@ source_set("electron_lib") {
] ]
deps = [ deps = [
":atom_js2c", ":electron_js2c",
":electron_version_header", ":electron_version_header",
":manifests", ":manifests",
":resources", ":resources",
@ -468,7 +468,7 @@ source_set("electron_lib") {
"shell/browser/ui/views/autofill_popup_view.h", "shell/browser/ui/views/autofill_popup_view.h",
] ]
if (is_mas_build) { if (is_mas_build) {
sources += [ "shell/browser/api/atom_api_app_mas.mm" ] sources += [ "shell/browser/api/electron_api_app_mas.mm" ]
sources -= [ sources -= [
"shell/browser/auto_updater_mac.mm", "shell/browser/auto_updater_mac.mm",
"shell/common/crash_reporter/crash_reporter_mac.h", "shell/common/crash_reporter/crash_reporter_mac.h",
@ -595,27 +595,27 @@ source_set("electron_lib") {
deps += [ "//third_party/webrtc/modules/desktop_capture" ] deps += [ "//third_party/webrtc/modules/desktop_capture" ]
} }
sources += [ sources += [
"shell/browser/api/atom_api_desktop_capturer.cc", "shell/browser/api/electron_api_desktop_capturer.cc",
"shell/browser/api/atom_api_desktop_capturer.h", "shell/browser/api/electron_api_desktop_capturer.h",
] ]
} }
if (enable_view_api) { if (enable_view_api) {
sources += [ sources += [
"shell/browser/api/views/atom_api_box_layout.cc", "shell/browser/api/views/electron_api_box_layout.cc",
"shell/browser/api/views/atom_api_box_layout.h", "shell/browser/api/views/electron_api_box_layout.h",
"shell/browser/api/views/atom_api_button.cc", "shell/browser/api/views/electron_api_button.cc",
"shell/browser/api/views/atom_api_button.h", "shell/browser/api/views/electron_api_button.h",
"shell/browser/api/views/atom_api_label_button.cc", "shell/browser/api/views/electron_api_label_button.cc",
"shell/browser/api/views/atom_api_label_button.h", "shell/browser/api/views/electron_api_label_button.h",
"shell/browser/api/views/atom_api_layout_manager.cc", "shell/browser/api/views/electron_api_layout_manager.cc",
"shell/browser/api/views/atom_api_layout_manager.h", "shell/browser/api/views/electron_api_layout_manager.h",
"shell/browser/api/views/atom_api_md_text_button.cc", "shell/browser/api/views/electron_api_md_text_button.cc",
"shell/browser/api/views/atom_api_md_text_button.h", "shell/browser/api/views/electron_api_md_text_button.h",
"shell/browser/api/views/atom_api_resize_area.cc", "shell/browser/api/views/electron_api_resize_area.cc",
"shell/browser/api/views/atom_api_resize_area.h", "shell/browser/api/views/electron_api_resize_area.h",
"shell/browser/api/views/atom_api_text_field.cc", "shell/browser/api/views/electron_api_text_field.cc",
"shell/browser/api/views/atom_api_text_field.h", "shell/browser/api/views/electron_api_text_field.h",
] ]
} }
@ -816,7 +816,7 @@ if (is_mac) {
} }
defines = [ "HELPER_EXECUTABLE" ] defines = [ "HELPER_EXECUTABLE" ]
sources = filenames.app_sources sources = filenames.app_sources
sources += [ "shell/common/atom_constants.cc" ] sources += [ "shell/common/electron_constants.cc" ]
include_dirs = [ "." ] include_dirs = [ "." ]
info_plist = "shell/renderer/resources/mac/Info.plist" info_plist = "shell/renderer/resources/mac/Info.plist"
extra_substitutions = extra_substitutions =
@ -918,7 +918,7 @@ if (is_mac) {
mac_app_bundle("electron_app") { mac_app_bundle("electron_app") {
output_name = electron_product_name output_name = electron_product_name
sources = filenames.app_sources sources = filenames.app_sources
sources += [ "shell/common/atom_constants.cc" ] sources += [ "shell/common/electron_constants.cc" ]
include_dirs = [ "." ] include_dirs = [ "." ]
deps = [ deps = [
":electron_app_framework_bundle_data", ":electron_app_framework_bundle_data",

View file

@ -56,7 +56,7 @@
#include <stddef.h> #include <stddef.h>
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/common/atom_command_line.h" #include "shell/common/electron_command_line.h"
#include "base/base_paths.h" #include "base/base_paths.h"
#include "base/bind.h" #include "base/bind.h"
@ -826,7 +826,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
return PROCESS_NONE; return PROCESS_NONE;
to_send.append(current_dir.value()); to_send.append(current_dir.value());
const std::vector<std::string>& argv = electron::AtomCommandLine::argv(); const std::vector<std::string>& argv = electron::ElectronCommandLine::argv();
for (std::vector<std::string>::const_iterator it = argv.begin(); for (std::vector<std::string>::const_iterator it = argv.begin();
it != argv.end(); ++it) { it != argv.end(); ++it) {
to_send.push_back(kTokenDelimiter); to_send.push_back(kTokenDelimiter);

View file

@ -27,90 +27,90 @@ filenames = {
"chromium_src/chrome/browser/process_singleton_win.cc", "chromium_src/chrome/browser/process_singleton_win.cc",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc", "chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc",
"chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h", "chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.h",
"shell/app/atom_content_client.cc",
"shell/app/atom_content_client.h",
"shell/app/atom_main_delegate.cc",
"shell/app/atom_main_delegate.h",
"shell/app/atom_main_delegate_mac.h",
"shell/app/atom_main_delegate_mac.mm",
"shell/app/command_line_args.cc", "shell/app/command_line_args.cc",
"shell/app/command_line_args.h", "shell/app/command_line_args.h",
"shell/app/electron_content_client.cc",
"shell/app/electron_content_client.h",
"shell/app/electron_main_delegate.cc",
"shell/app/electron_main_delegate.h",
"shell/app/electron_main_delegate_mac.h",
"shell/app/electron_main_delegate_mac.mm",
"shell/app/uv_task_runner.cc", "shell/app/uv_task_runner.cc",
"shell/app/uv_task_runner.h", "shell/app/uv_task_runner.h",
"shell/browser/api/atom_api_app.cc", "shell/browser/api/electron_api_app.cc",
"shell/browser/api/atom_api_app.h", "shell/browser/api/electron_api_app.h",
"shell/browser/api/atom_api_app_mac.mm", "shell/browser/api/electron_api_app_mac.mm",
"shell/browser/api/atom_api_auto_updater.cc", "shell/browser/api/electron_api_auto_updater.cc",
"shell/browser/api/atom_api_auto_updater.h", "shell/browser/api/electron_api_auto_updater.h",
"shell/browser/api/atom_api_browser_view.cc", "shell/browser/api/electron_api_browser_view.cc",
"shell/browser/api/atom_api_browser_view.h", "shell/browser/api/electron_api_browser_view.h",
"shell/browser/api/atom_api_browser_window.cc", "shell/browser/api/electron_api_browser_window.cc",
"shell/browser/api/atom_api_browser_window.h", "shell/browser/api/electron_api_browser_window.h",
"shell/browser/api/atom_api_browser_window_mac.mm", "shell/browser/api/electron_api_browser_window_mac.mm",
"shell/browser/api/atom_api_browser_window_views.cc", "shell/browser/api/electron_api_browser_window_views.cc",
"shell/browser/api/atom_api_content_tracing.cc", "shell/browser/api/electron_api_content_tracing.cc",
"shell/browser/api/atom_api_cookies.cc", "shell/browser/api/electron_api_cookies.cc",
"shell/browser/api/atom_api_cookies.h", "shell/browser/api/electron_api_cookies.h",
"shell/browser/api/atom_api_data_pipe_holder.cc", "shell/browser/api/electron_api_data_pipe_holder.cc",
"shell/browser/api/atom_api_data_pipe_holder.h", "shell/browser/api/electron_api_data_pipe_holder.h",
"shell/browser/api/atom_api_debugger.cc", "shell/browser/api/electron_api_debugger.cc",
"shell/browser/api/atom_api_debugger.h", "shell/browser/api/electron_api_debugger.h",
"shell/browser/api/atom_api_dialog.cc", "shell/browser/api/electron_api_dialog.cc",
"shell/browser/api/atom_api_download_item.cc", "shell/browser/api/electron_api_download_item.cc",
"shell/browser/api/atom_api_download_item.h", "shell/browser/api/electron_api_download_item.h",
"shell/browser/api/atom_api_event.cc", "shell/browser/api/electron_api_event.cc",
"shell/browser/api/atom_api_global_shortcut.cc", "shell/browser/api/electron_api_global_shortcut.cc",
"shell/browser/api/atom_api_global_shortcut.h", "shell/browser/api/electron_api_global_shortcut.h",
"shell/browser/api/atom_api_in_app_purchase.cc", "shell/browser/api/electron_api_in_app_purchase.cc",
"shell/browser/api/atom_api_in_app_purchase.h", "shell/browser/api/electron_api_in_app_purchase.h",
"shell/browser/api/atom_api_menu.cc", "shell/browser/api/electron_api_menu.cc",
"shell/browser/api/atom_api_menu.h", "shell/browser/api/electron_api_menu.h",
"shell/browser/api/atom_api_menu_mac.h", "shell/browser/api/electron_api_menu_mac.h",
"shell/browser/api/atom_api_menu_mac.mm", "shell/browser/api/electron_api_menu_mac.mm",
"shell/browser/api/atom_api_menu_views.cc", "shell/browser/api/electron_api_menu_views.cc",
"shell/browser/api/atom_api_menu_views.h", "shell/browser/api/electron_api_menu_views.h",
"shell/browser/api/atom_api_native_theme.cc", "shell/browser/api/electron_api_native_theme.cc",
"shell/browser/api/atom_api_native_theme.h", "shell/browser/api/electron_api_native_theme.h",
"shell/browser/api/atom_api_native_theme_mac.mm", "shell/browser/api/electron_api_native_theme_mac.mm",
"shell/browser/api/atom_api_net.cc", "shell/browser/api/electron_api_net.cc",
"shell/browser/api/atom_api_net.h", "shell/browser/api/electron_api_net.h",
"shell/browser/api/atom_api_net_log.cc", "shell/browser/api/electron_api_net_log.cc",
"shell/browser/api/atom_api_net_log.h", "shell/browser/api/electron_api_net_log.h",
"shell/browser/api/atom_api_notification.cc", "shell/browser/api/electron_api_notification.cc",
"shell/browser/api/atom_api_notification.h", "shell/browser/api/electron_api_notification.h",
"shell/browser/api/atom_api_power_monitor.cc", "shell/browser/api/electron_api_power_monitor.cc",
"shell/browser/api/atom_api_power_monitor.h", "shell/browser/api/electron_api_power_monitor.h",
"shell/browser/api/atom_api_power_monitor_mac.mm", "shell/browser/api/electron_api_power_monitor_mac.mm",
"shell/browser/api/atom_api_power_monitor_win.cc", "shell/browser/api/electron_api_power_monitor_win.cc",
"shell/browser/api/atom_api_power_save_blocker.cc", "shell/browser/api/electron_api_power_save_blocker.cc",
"shell/browser/api/atom_api_power_save_blocker.h", "shell/browser/api/electron_api_power_save_blocker.h",
"shell/browser/api/atom_api_protocol.cc", "shell/browser/api/electron_api_protocol.cc",
"shell/browser/api/atom_api_protocol.h", "shell/browser/api/electron_api_protocol.h",
"shell/browser/api/atom_api_screen.cc", "shell/browser/api/electron_api_screen.cc",
"shell/browser/api/atom_api_screen.h", "shell/browser/api/electron_api_screen.h",
"shell/browser/api/atom_api_session.cc", "shell/browser/api/electron_api_session.cc",
"shell/browser/api/atom_api_session.h", "shell/browser/api/electron_api_session.h",
"shell/browser/api/atom_api_system_preferences.cc", "shell/browser/api/electron_api_system_preferences.cc",
"shell/browser/api/atom_api_system_preferences.h", "shell/browser/api/electron_api_system_preferences.h",
"shell/browser/api/atom_api_system_preferences_mac.mm", "shell/browser/api/electron_api_system_preferences_mac.mm",
"shell/browser/api/atom_api_system_preferences_win.cc", "shell/browser/api/electron_api_system_preferences_win.cc",
"shell/browser/api/atom_api_top_level_window.cc", "shell/browser/api/electron_api_top_level_window.cc",
"shell/browser/api/atom_api_top_level_window.h", "shell/browser/api/electron_api_top_level_window.h",
"shell/browser/api/atom_api_tray.cc", "shell/browser/api/electron_api_tray.cc",
"shell/browser/api/atom_api_tray.h", "shell/browser/api/electron_api_tray.h",
"shell/browser/api/atom_api_url_loader.cc", "shell/browser/api/electron_api_url_loader.cc",
"shell/browser/api/atom_api_url_loader.h", "shell/browser/api/electron_api_url_loader.h",
"shell/browser/api/atom_api_view.cc", "shell/browser/api/electron_api_view.cc",
"shell/browser/api/atom_api_view.h", "shell/browser/api/electron_api_view.h",
"shell/browser/api/atom_api_web_contents.cc", "shell/browser/api/electron_api_web_contents.cc",
"shell/browser/api/atom_api_web_contents.h", "shell/browser/api/electron_api_web_contents.h",
"shell/browser/api/atom_api_web_contents_impl.cc", "shell/browser/api/electron_api_web_contents_impl.cc",
"shell/browser/api/atom_api_web_contents_mac.mm", "shell/browser/api/electron_api_web_contents_mac.mm",
"shell/browser/api/atom_api_web_contents_view.cc", "shell/browser/api/electron_api_web_contents_view.cc",
"shell/browser/api/atom_api_web_contents_view.h", "shell/browser/api/electron_api_web_contents_view.h",
"shell/browser/api/atom_api_web_request.cc", "shell/browser/api/electron_api_web_request.cc",
"shell/browser/api/atom_api_web_request.h", "shell/browser/api/electron_api_web_request.h",
"shell/browser/api/atom_api_web_view_manager.cc", "shell/browser/api/electron_api_web_view_manager.cc",
"shell/browser/api/event.cc", "shell/browser/api/event.cc",
"shell/browser/api/event.h", "shell/browser/api/event.h",
"shell/browser/api/frame_subscriber.cc", "shell/browser/api/frame_subscriber.cc",
@ -123,35 +123,6 @@ filenames = {
"shell/browser/api/process_metric.h", "shell/browser/api/process_metric.h",
"shell/browser/api/save_page_handler.cc", "shell/browser/api/save_page_handler.cc",
"shell/browser/api/save_page_handler.h", "shell/browser/api/save_page_handler.h",
"shell/browser/atom_autofill_driver.cc",
"shell/browser/atom_autofill_driver.h",
"shell/browser/atom_autofill_driver_factory.cc",
"shell/browser/atom_autofill_driver_factory.h",
"shell/browser/atom_browser_client.cc",
"shell/browser/atom_browser_client.h",
"shell/browser/atom_browser_context.cc",
"shell/browser/atom_browser_context.h",
"shell/browser/atom_browser_main_parts.cc",
"shell/browser/atom_browser_main_parts.h",
"shell/browser/atom_browser_main_parts_mac.mm",
"shell/browser/atom_browser_main_parts_posix.cc",
"shell/browser/atom_download_manager_delegate.cc",
"shell/browser/atom_download_manager_delegate.h",
"shell/browser/atom_gpu_client.cc",
"shell/browser/atom_gpu_client.h",
"shell/browser/atom_javascript_dialog_manager.cc",
"shell/browser/atom_javascript_dialog_manager.h",
"shell/browser/atom_navigation_throttle.cc",
"shell/browser/atom_navigation_throttle.h",
"shell/browser/atom_paths.h",
"shell/browser/atom_permission_manager.cc",
"shell/browser/atom_permission_manager.h",
"shell/browser/atom_quota_permission_context.cc",
"shell/browser/atom_quota_permission_context.h",
"shell/browser/atom_speech_recognition_manager_delegate.cc",
"shell/browser/atom_speech_recognition_manager_delegate.h",
"shell/browser/atom_web_ui_controller_factory.cc",
"shell/browser/atom_web_ui_controller_factory.h",
"shell/browser/auto_updater.cc", "shell/browser/auto_updater.cc",
"shell/browser/auto_updater.h", "shell/browser/auto_updater.h",
"shell/browser/auto_updater_mac.mm", "shell/browser/auto_updater_mac.mm",
@ -171,6 +142,35 @@ filenames = {
"shell/browser/common_web_contents_delegate_views.cc", "shell/browser/common_web_contents_delegate_views.cc",
"shell/browser/cookie_change_notifier.cc", "shell/browser/cookie_change_notifier.cc",
"shell/browser/cookie_change_notifier.h", "shell/browser/cookie_change_notifier.h",
"shell/browser/electron_autofill_driver.cc",
"shell/browser/electron_autofill_driver.h",
"shell/browser/electron_autofill_driver_factory.cc",
"shell/browser/electron_autofill_driver_factory.h",
"shell/browser/electron_browser_client.cc",
"shell/browser/electron_browser_client.h",
"shell/browser/electron_browser_context.cc",
"shell/browser/electron_browser_context.h",
"shell/browser/electron_browser_main_parts.cc",
"shell/browser/electron_browser_main_parts.h",
"shell/browser/electron_browser_main_parts_mac.mm",
"shell/browser/electron_browser_main_parts_posix.cc",
"shell/browser/electron_download_manager_delegate.cc",
"shell/browser/electron_download_manager_delegate.h",
"shell/browser/electron_gpu_client.cc",
"shell/browser/electron_gpu_client.h",
"shell/browser/electron_javascript_dialog_manager.cc",
"shell/browser/electron_javascript_dialog_manager.h",
"shell/browser/electron_navigation_throttle.cc",
"shell/browser/electron_navigation_throttle.h",
"shell/browser/electron_paths.h",
"shell/browser/electron_permission_manager.cc",
"shell/browser/electron_permission_manager.h",
"shell/browser/electron_quota_permission_context.cc",
"shell/browser/electron_quota_permission_context.h",
"shell/browser/electron_speech_recognition_manager_delegate.cc",
"shell/browser/electron_speech_recognition_manager_delegate.h",
"shell/browser/electron_web_ui_controller_factory.cc",
"shell/browser/electron_web_ui_controller_factory.h",
"shell/browser/feature_list.cc", "shell/browser/feature_list.cc",
"shell/browser/feature_list.h", "shell/browser/feature_list.h",
"shell/browser/font_defaults.cc", "shell/browser/font_defaults.cc",
@ -186,12 +186,12 @@ filenames = {
"shell/browser/linux/unity_service.h", "shell/browser/linux/unity_service.h",
"shell/browser/login_handler.cc", "shell/browser/login_handler.cc",
"shell/browser/login_handler.h", "shell/browser/login_handler.h",
"shell/browser/mac/atom_application.h",
"shell/browser/mac/atom_application.mm",
"shell/browser/mac/atom_application_delegate.h",
"shell/browser/mac/atom_application_delegate.mm",
"shell/browser/mac/dict_util.h", "shell/browser/mac/dict_util.h",
"shell/browser/mac/dict_util.mm", "shell/browser/mac/dict_util.mm",
"shell/browser/mac/electron_application.h",
"shell/browser/mac/electron_application.mm",
"shell/browser/mac/electron_application_delegate.h",
"shell/browser/mac/electron_application_delegate.mm",
"shell/browser/mac/in_app_purchase.h", "shell/browser/mac/in_app_purchase.h",
"shell/browser/mac/in_app_purchase.mm", "shell/browser/mac/in_app_purchase.mm",
"shell/browser/mac/in_app_purchase_observer.h", "shell/browser/mac/in_app_purchase_observer.h",
@ -222,10 +222,10 @@ filenames = {
"shell/browser/native_window_views_win.cc", "shell/browser/native_window_views_win.cc",
"shell/browser/net/asar/asar_url_loader.cc", "shell/browser/net/asar/asar_url_loader.cc",
"shell/browser/net/asar/asar_url_loader.h", "shell/browser/net/asar/asar_url_loader.h",
"shell/browser/net/atom_url_loader_factory.cc",
"shell/browser/net/atom_url_loader_factory.h",
"shell/browser/net/cert_verifier_client.cc", "shell/browser/net/cert_verifier_client.cc",
"shell/browser/net/cert_verifier_client.h", "shell/browser/net/cert_verifier_client.h",
"shell/browser/net/electron_url_loader_factory.cc",
"shell/browser/net/electron_url_loader_factory.h",
"shell/browser/net/network_context_service.cc", "shell/browser/net/network_context_service.cc",
"shell/browser/net/network_context_service.h", "shell/browser/net/network_context_service.h",
"shell/browser/net/network_context_service_factory.cc", "shell/browser/net/network_context_service_factory.cc",
@ -289,8 +289,6 @@ filenames = {
"shell/browser/special_storage_policy.h", "shell/browser/special_storage_policy.h",
"shell/browser/ui/accelerator_util.cc", "shell/browser/ui/accelerator_util.cc",
"shell/browser/ui/accelerator_util.h", "shell/browser/ui/accelerator_util.h",
"shell/browser/ui/atom_menu_model.cc",
"shell/browser/ui/atom_menu_model.h",
"shell/browser/ui/autofill_popup.cc", "shell/browser/ui/autofill_popup.cc",
"shell/browser/ui/autofill_popup.h", "shell/browser/ui/autofill_popup.h",
"shell/browser/ui/certificate_trust.h", "shell/browser/ui/certificate_trust.h",
@ -300,24 +298,24 @@ filenames = {
"shell/browser/ui/cocoa/NSColor+Hex.mm", "shell/browser/ui/cocoa/NSColor+Hex.mm",
"shell/browser/ui/cocoa/NSString+ANSI.h", "shell/browser/ui/cocoa/NSString+ANSI.h",
"shell/browser/ui/cocoa/NSString+ANSI.mm", "shell/browser/ui/cocoa/NSString+ANSI.mm",
"shell/browser/ui/cocoa/atom_bundle_mover.h",
"shell/browser/ui/cocoa/atom_bundle_mover.mm",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h",
"shell/browser/ui/cocoa/atom_inspectable_web_contents_view.mm",
"shell/browser/ui/cocoa/atom_menu_controller.h",
"shell/browser/ui/cocoa/atom_menu_controller.mm",
"shell/browser/ui/cocoa/atom_native_widget_mac.h",
"shell/browser/ui/cocoa/atom_native_widget_mac.mm",
"shell/browser/ui/cocoa/atom_ns_window.h",
"shell/browser/ui/cocoa/atom_ns_window.mm",
"shell/browser/ui/cocoa/atom_ns_window_delegate.h",
"shell/browser/ui/cocoa/atom_ns_window_delegate.mm",
"shell/browser/ui/cocoa/atom_preview_item.h",
"shell/browser/ui/cocoa/atom_preview_item.mm",
"shell/browser/ui/cocoa/atom_touch_bar.h",
"shell/browser/ui/cocoa/atom_touch_bar.mm",
"shell/browser/ui/cocoa/delayed_native_view_host.cc", "shell/browser/ui/cocoa/delayed_native_view_host.cc",
"shell/browser/ui/cocoa/delayed_native_view_host.h", "shell/browser/ui/cocoa/delayed_native_view_host.h",
"shell/browser/ui/cocoa/electron_bundle_mover.h",
"shell/browser/ui/cocoa/electron_bundle_mover.mm",
"shell/browser/ui/cocoa/electron_inspectable_web_contents_view.h",
"shell/browser/ui/cocoa/electron_inspectable_web_contents_view.mm",
"shell/browser/ui/cocoa/electron_menu_controller.h",
"shell/browser/ui/cocoa/electron_menu_controller.mm",
"shell/browser/ui/cocoa/electron_native_widget_mac.h",
"shell/browser/ui/cocoa/electron_native_widget_mac.mm",
"shell/browser/ui/cocoa/electron_ns_window.h",
"shell/browser/ui/cocoa/electron_ns_window.mm",
"shell/browser/ui/cocoa/electron_ns_window_delegate.h",
"shell/browser/ui/cocoa/electron_ns_window_delegate.mm",
"shell/browser/ui/cocoa/electron_preview_item.h",
"shell/browser/ui/cocoa/electron_preview_item.mm",
"shell/browser/ui/cocoa/electron_touch_bar.h",
"shell/browser/ui/cocoa/electron_touch_bar.mm",
"shell/browser/ui/cocoa/event_dispatching_window.h", "shell/browser/ui/cocoa/event_dispatching_window.h",
"shell/browser/ui/cocoa/event_dispatching_window.mm", "shell/browser/ui/cocoa/event_dispatching_window.mm",
"shell/browser/ui/cocoa/root_view_mac.h", "shell/browser/ui/cocoa/root_view_mac.h",
@ -331,6 +329,8 @@ filenames = {
"shell/browser/ui/drag_util.h", "shell/browser/ui/drag_util.h",
"shell/browser/ui/drag_util_mac.mm", "shell/browser/ui/drag_util_mac.mm",
"shell/browser/ui/drag_util_views.cc", "shell/browser/ui/drag_util_views.cc",
"shell/browser/ui/electron_menu_model.cc",
"shell/browser/ui/electron_menu_model.h",
"shell/browser/ui/file_dialog.h", "shell/browser/ui/file_dialog.h",
"shell/browser/ui/file_dialog_gtk.cc", "shell/browser/ui/file_dialog_gtk.cc",
"shell/browser/ui/file_dialog_mac.mm", "shell/browser/ui/file_dialog_mac.mm",
@ -357,11 +357,11 @@ filenames = {
"shell/browser/ui/tray_icon_gtk.h", "shell/browser/ui/tray_icon_gtk.h",
"shell/browser/ui/tray_icon_observer.h", "shell/browser/ui/tray_icon_observer.h",
"shell/browser/ui/tray_icon_win.cc", "shell/browser/ui/tray_icon_win.cc",
"shell/browser/ui/views/atom_views_delegate.cc",
"shell/browser/ui/views/atom_views_delegate.h",
"shell/browser/ui/views/atom_views_delegate_win.cc",
"shell/browser/ui/views/autofill_popup_view.cc", "shell/browser/ui/views/autofill_popup_view.cc",
"shell/browser/ui/views/autofill_popup_view.h", "shell/browser/ui/views/autofill_popup_view.h",
"shell/browser/ui/views/electron_views_delegate.cc",
"shell/browser/ui/views/electron_views_delegate.h",
"shell/browser/ui/views/electron_views_delegate_win.cc",
"shell/browser/ui/views/frameless_view.cc", "shell/browser/ui/views/frameless_view.cc",
"shell/browser/ui/views/frameless_view.h", "shell/browser/ui/views/frameless_view.h",
"shell/browser/ui/views/global_menu_bar_x11.cc", "shell/browser/ui/views/global_menu_bar_x11.cc",
@ -382,10 +382,10 @@ filenames = {
"shell/browser/ui/views/submenu_button.h", "shell/browser/ui/views/submenu_button.h",
"shell/browser/ui/views/win_frame_view.cc", "shell/browser/ui/views/win_frame_view.cc",
"shell/browser/ui/views/win_frame_view.h", "shell/browser/ui/views/win_frame_view.h",
"shell/browser/ui/win/atom_desktop_native_widget_aura.cc", "shell/browser/ui/win/electron_desktop_native_widget_aura.cc",
"shell/browser/ui/win/atom_desktop_native_widget_aura.h", "shell/browser/ui/win/electron_desktop_native_widget_aura.h",
"shell/browser/ui/win/atom_desktop_window_tree_host_win.cc", "shell/browser/ui/win/electron_desktop_window_tree_host_win.cc",
"shell/browser/ui/win/atom_desktop_window_tree_host_win.h", "shell/browser/ui/win/electron_desktop_window_tree_host_win.h",
"shell/browser/ui/win/jump_list.cc", "shell/browser/ui/win/jump_list.cc",
"shell/browser/ui/win/jump_list.h", "shell/browser/ui/win/jump_list.h",
"shell/browser/ui/win/notify_icon.cc", "shell/browser/ui/win/notify_icon.cc",
@ -421,18 +421,18 @@ filenames = {
"shell/browser/window_list_observer.h", "shell/browser/window_list_observer.h",
"shell/browser/zoom_level_delegate.cc", "shell/browser/zoom_level_delegate.cc",
"shell/browser/zoom_level_delegate.h", "shell/browser/zoom_level_delegate.h",
"shell/common/api/atom_api_asar.cc", "shell/common/api/electron_api_asar.cc",
"shell/common/api/atom_api_clipboard.cc", "shell/common/api/electron_api_clipboard.cc",
"shell/common/api/atom_api_clipboard.h", "shell/common/api/electron_api_clipboard.h",
"shell/common/api/atom_api_clipboard_mac.mm", "shell/common/api/electron_api_clipboard_mac.mm",
"shell/common/api/atom_api_command_line.cc", "shell/common/api/electron_api_command_line.cc",
"shell/common/api/atom_api_crash_reporter.cc", "shell/common/api/electron_api_crash_reporter.cc",
"shell/common/api/atom_api_key_weak_map.h", "shell/common/api/electron_api_key_weak_map.h",
"shell/common/api/atom_api_native_image.cc", "shell/common/api/electron_api_native_image.cc",
"shell/common/api/atom_api_native_image.h", "shell/common/api/electron_api_native_image.h",
"shell/common/api/atom_api_native_image_mac.mm", "shell/common/api/electron_api_native_image_mac.mm",
"shell/common/api/atom_api_shell.cc", "shell/common/api/electron_api_shell.cc",
"shell/common/api/atom_api_v8_util.cc", "shell/common/api/electron_api_v8_util.cc",
"shell/common/api/electron_bindings.cc", "shell/common/api/electron_bindings.cc",
"shell/common/api/electron_bindings.h", "shell/common/api/electron_bindings.h",
"shell/common/api/features.cc", "shell/common/api/features.cc",
@ -447,10 +447,6 @@ filenames = {
"shell/common/asar/asar_util.h", "shell/common/asar/asar_util.h",
"shell/common/asar/scoped_temporary_file.cc", "shell/common/asar/scoped_temporary_file.cc",
"shell/common/asar/scoped_temporary_file.h", "shell/common/asar/scoped_temporary_file.h",
"shell/common/atom_command_line.cc",
"shell/common/atom_command_line.h",
"shell/common/atom_constants.cc",
"shell/common/atom_constants.h",
"shell/common/color_util.cc", "shell/common/color_util.cc",
"shell/common/color_util.h", "shell/common/color_util.h",
"shell/common/crash_reporter/crash_reporter.cc", "shell/common/crash_reporter/crash_reporter.cc",
@ -465,6 +461,10 @@ filenames = {
"shell/common/crash_reporter/linux/crash_dump_handler.h", "shell/common/crash_reporter/linux/crash_dump_handler.h",
"shell/common/crash_reporter/win/crash_service_main.cc", "shell/common/crash_reporter/win/crash_service_main.cc",
"shell/common/crash_reporter/win/crash_service_main.h", "shell/common/crash_reporter/win/crash_service_main.h",
"shell/common/electron_command_line.cc",
"shell/common/electron_command_line.h",
"shell/common/electron_constants.cc",
"shell/common/electron_constants.h",
"shell/common/gin_converters/accelerator_converter.cc", "shell/common/gin_converters/accelerator_converter.cc",
"shell/common/gin_converters/accelerator_converter.h", "shell/common/gin_converters/accelerator_converter.h",
"shell/common/gin_converters/blink_converter.cc", "shell/common/gin_converters/blink_converter.cc",
@ -551,38 +551,38 @@ filenames = {
"shell/common/skia_util.h", "shell/common/skia_util.h",
"shell/common/v8_value_converter.cc", "shell/common/v8_value_converter.cc",
"shell/common/v8_value_converter.h", "shell/common/v8_value_converter.h",
"shell/renderer/api/atom_api_context_bridge.cc",
"shell/renderer/api/atom_api_context_bridge.h",
"shell/renderer/api/atom_api_renderer_ipc.cc",
"shell/renderer/api/atom_api_spell_check_client.cc",
"shell/renderer/api/atom_api_spell_check_client.h",
"shell/renderer/api/atom_api_web_frame.cc",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.cc", "shell/renderer/api/context_bridge/render_frame_context_bridge_store.cc",
"shell/renderer/api/context_bridge/render_frame_context_bridge_store.h", "shell/renderer/api/context_bridge/render_frame_context_bridge_store.h",
"shell/renderer/atom_autofill_agent.cc", "shell/renderer/api/electron_api_context_bridge.cc",
"shell/renderer/atom_autofill_agent.h", "shell/renderer/api/electron_api_context_bridge.h",
"shell/renderer/atom_render_frame_observer.cc", "shell/renderer/api/electron_api_renderer_ipc.cc",
"shell/renderer/atom_render_frame_observer.h", "shell/renderer/api/electron_api_spell_check_client.cc",
"shell/renderer/atom_renderer_client.cc", "shell/renderer/api/electron_api_spell_check_client.h",
"shell/renderer/atom_renderer_client.h", "shell/renderer/api/electron_api_web_frame.cc",
"shell/renderer/atom_sandboxed_renderer_client.cc",
"shell/renderer/atom_sandboxed_renderer_client.h",
"shell/renderer/browser_exposed_renderer_interfaces.cc", "shell/renderer/browser_exposed_renderer_interfaces.cc",
"shell/renderer/browser_exposed_renderer_interfaces.h", "shell/renderer/browser_exposed_renderer_interfaces.h",
"shell/renderer/content_settings_observer.cc", "shell/renderer/content_settings_observer.cc",
"shell/renderer/content_settings_observer.h", "shell/renderer/content_settings_observer.h",
"shell/renderer/electron_api_service_impl.cc", "shell/renderer/electron_api_service_impl.cc",
"shell/renderer/electron_api_service_impl.h", "shell/renderer/electron_api_service_impl.h",
"shell/renderer/electron_autofill_agent.cc",
"shell/renderer/electron_autofill_agent.h",
"shell/renderer/electron_render_frame_observer.cc",
"shell/renderer/electron_render_frame_observer.h",
"shell/renderer/electron_renderer_client.cc",
"shell/renderer/electron_renderer_client.h",
"shell/renderer/electron_renderer_pepper_host_factory.cc", "shell/renderer/electron_renderer_pepper_host_factory.cc",
"shell/renderer/electron_renderer_pepper_host_factory.h", "shell/renderer/electron_renderer_pepper_host_factory.h",
"shell/renderer/electron_sandboxed_renderer_client.cc",
"shell/renderer/electron_sandboxed_renderer_client.h",
"shell/renderer/guest_view_container.cc", "shell/renderer/guest_view_container.cc",
"shell/renderer/guest_view_container.h", "shell/renderer/guest_view_container.h",
"shell/renderer/renderer_client_base.cc", "shell/renderer/renderer_client_base.cc",
"shell/renderer/renderer_client_base.h", "shell/renderer/renderer_client_base.h",
"shell/renderer/web_worker_observer.cc", "shell/renderer/web_worker_observer.cc",
"shell/renderer/web_worker_observer.h", "shell/renderer/web_worker_observer.h",
"shell/utility/atom_content_utility_client.cc", "shell/utility/electron_content_utility_client.cc",
"shell/utility/atom_content_utility_client.h", "shell/utility/electron_content_utility_client.h",
] ]
lib_sources_nss = [ lib_sources_nss = [
@ -632,14 +632,14 @@ filenames = {
] ]
app_sources = [ app_sources = [
"shell/app/atom_main.cc", "shell/app/electron_main.cc",
"shell/app/atom_main.h", "shell/app/electron_main.h",
] ]
framework_sources = [ framework_sources = [
"shell/app/atom_library_main.h", "shell/app/electron_library_main.h",
"shell/app/atom_library_main.mm", "shell/app/electron_library_main.mm",
] ]
login_helper_sources = [ "shell/app/atom_login_helper.mm" ] login_helper_sources = [ "shell/app/electron_login_helper.mm" ]
} }

View file

@ -7,7 +7,7 @@ This adds GN build files for Node, so we don't have to build with GYP.
diff --git a/BUILD.gn b/BUILD.gn diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644 new file mode 100644
index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b9771984944f087 index 0000000000000000000000000000000000000000..ec06e14dd327cdf89dc6fd584b6972ae64311ea0
--- /dev/null --- /dev/null
+++ b/BUILD.gn +++ b/BUILD.gn
@@ -0,0 +1,370 @@ @@ -0,0 +1,370 @@
@ -228,7 +228,7 @@ index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b977198
+ ] + ]
+ public_deps = [ + public_deps = [
+ "deps/uv", + "deps/uv",
+ "//electron:atom_js2c", + "//electron:electron_js2c",
+ "//v8", + "//v8",
+ ] + ]
+ configs += [ ":node_internal_config" ] + configs += [ ":node_internal_config" ]
@ -253,7 +253,7 @@ index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b977198
+ +
+ sources = node_files.node_sources + sources = node_files.node_sources
+ sources += [ + sources += [
+ "$root_gen_dir/atom_natives.cc", + "$root_gen_dir/electron_natives.cc",
+ "$target_gen_dir/node_javascript.cc", + "$target_gen_dir/node_javascript.cc",
+ "src/node_code_cache_stub.cc", + "src/node_code_cache_stub.cc",
+ "src/node_snapshot_stub.cc", + "src/node_snapshot_stub.cc",

View file

@ -53,10 +53,14 @@ function cpplint (args) {
} }
} }
function isObjCHeader (filename) {
return /\/(mac|cocoa)\//.test(filename)
}
const LINTERS = [ { const LINTERS = [ {
key: 'c++', key: 'c++',
roots: ['shell'], roots: ['shell'],
test: filename => filename.endsWith('.cc') || filename.endsWith('.h'), test: filename => filename.endsWith('.cc') || (filename.endsWith('.h') && !isObjCHeader(filename)),
run: (opts, filenames) => { run: (opts, filenames) => {
if (opts.fix) { if (opts.fix) {
spawnAndCheckExitCode('python', ['script/run-clang-format.py', '--fix', ...filenames]) spawnAndCheckExitCode('python', ['script/run-clang-format.py', '--fix', ...filenames])

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/app/atom_content_client.h" #include "shell/app/electron_content_client.h"
#include <string> #include <string>
#include <utility> #include <utility>
@ -18,7 +18,7 @@
#include "electron/buildflags/buildflags.h" #include "electron/buildflags/buildflags.h"
#include "extensions/common/constants.h" #include "extensions/common/constants.h"
#include "ppapi/buildflags/buildflags.h" #include "ppapi/buildflags/buildflags.h"
#include "shell/browser/atom_paths.h" #include "shell/browser/electron_paths.h"
#include "shell/common/options_switches.h" #include "shell/common/options_switches.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
@ -33,10 +33,10 @@
#endif // defined(WIDEVINE_CDM_AVAILABLE) #endif // defined(WIDEVINE_CDM_AVAILABLE)
#if BUILDFLAG(ENABLE_PDF_VIEWER) #if BUILDFLAG(ENABLE_PDF_VIEWER)
#include "pdf/pdf.h" // nogncheck #include "pdf/pdf.h" // nogncheck
#include "pdf/pdf_ppapi.h" // nogncheck #include "pdf/pdf_ppapi.h" // nogncheck
#include "shell/common/atom_constants.h" // nogncheck #include "shell/common/electron_constants.h" // nogncheck
#endif // BUILDFLAG(ENABLE_PDF_VIEWER) #endif // BUILDFLAG(ENABLE_PDF_VIEWER)
#if BUILDFLAG(ENABLE_PLUGINS) #if BUILDFLAG(ENABLE_PLUGINS)
#include "content/public/common/pepper_plugin_info.h" #include "content/public/common/pepper_plugin_info.h"
@ -187,33 +187,33 @@ void AppendDelimitedSwitchToVector(const base::StringPiece cmd_switch,
} // namespace } // namespace
AtomContentClient::AtomContentClient() = default; ElectronContentClient::ElectronContentClient() = default;
AtomContentClient::~AtomContentClient() = default; ElectronContentClient::~ElectronContentClient() = default;
base::string16 AtomContentClient::GetLocalizedString(int message_id) { base::string16 ElectronContentClient::GetLocalizedString(int message_id) {
return l10n_util::GetStringUTF16(message_id); return l10n_util::GetStringUTF16(message_id);
} }
base::StringPiece AtomContentClient::GetDataResource( base::StringPiece ElectronContentClient::GetDataResource(
int resource_id, int resource_id,
ui::ScaleFactor scale_factor) { ui::ScaleFactor scale_factor) {
return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
resource_id, scale_factor); resource_id, scale_factor);
} }
gfx::Image& AtomContentClient::GetNativeImageNamed(int resource_id) { gfx::Image& ElectronContentClient::GetNativeImageNamed(int resource_id) {
return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed( return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
resource_id); resource_id);
} }
base::RefCountedMemory* AtomContentClient::GetDataResourceBytes( base::RefCountedMemory* ElectronContentClient::GetDataResourceBytes(
int resource_id) { int resource_id) {
return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes( return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
resource_id); resource_id);
} }
void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) { void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes, AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes,
&schemes->service_worker_schemes); &schemes->service_worker_schemes);
AppendDelimitedSwitchToVector(switches::kStandardSchemes, AppendDelimitedSwitchToVector(switches::kStandardSchemes,
@ -229,7 +229,7 @@ void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) {
schemes->standard_schemes.emplace_back(extensions::kExtensionScheme); schemes->standard_schemes.emplace_back(extensions::kExtensionScheme);
} }
void AtomContentClient::AddPepperPlugins( void ElectronContentClient::AddPepperPlugins(
std::vector<content::PepperPluginInfo>* plugins) { std::vector<content::PepperPluginInfo>* plugins) {
#if BUILDFLAG(ENABLE_PEPPER_FLASH) #if BUILDFLAG(ENABLE_PEPPER_FLASH)
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@ -240,7 +240,7 @@ void AtomContentClient::AddPepperPlugins(
#endif // BUILDFLAG(ENABLE_PLUGINS) #endif // BUILDFLAG(ENABLE_PLUGINS)
} }
void AtomContentClient::AddContentDecryptionModules( void ElectronContentClient::AddContentDecryptionModules(
std::vector<content::CdmInfo>* cdms, std::vector<content::CdmInfo>* cdms,
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) { std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
if (cdms) { if (cdms) {

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_APP_ATOM_CONTENT_CLIENT_H_ #ifndef SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
#define SHELL_APP_ATOM_CONTENT_CLIENT_H_ #define SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
#include <set> #include <set>
#include <string> #include <string>
@ -14,10 +14,10 @@
namespace electron { namespace electron {
class AtomContentClient : public content::ContentClient { class ElectronContentClient : public content::ContentClient {
public: public:
AtomContentClient(); ElectronContentClient();
~AtomContentClient() override; ~ElectronContentClient() override;
protected: protected:
// content::ContentClient: // content::ContentClient:
@ -33,9 +33,9 @@ class AtomContentClient : public content::ContentClient {
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override; std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
private: private:
DISALLOW_COPY_AND_ASSIGN(AtomContentClient); DISALLOW_COPY_AND_ASSIGN(ElectronContentClient);
}; };
} // namespace electron } // namespace electron
#endif // SHELL_APP_ATOM_CONTENT_CLIENT_H_ #endif // SHELL_APP_ELECTRON_CONTENT_CLIENT_H_

View file

@ -2,22 +2,22 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_APP_ATOM_LIBRARY_MAIN_H_ #ifndef SHELL_APP_ELECTRON_LIBRARY_MAIN_H_
#define SHELL_APP_ATOM_LIBRARY_MAIN_H_ #define SHELL_APP_ELECTRON_LIBRARY_MAIN_H_
#include "build/build_config.h" #include "build/build_config.h"
#include "electron/buildflags/buildflags.h" #include "electron/buildflags/buildflags.h"
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
extern "C" { extern "C" {
__attribute__((visibility("default"))) int AtomMain(int argc, char* argv[]); __attribute__((visibility("default"))) int ElectronMain(int argc, char* argv[]);
#if BUILDFLAG(ENABLE_RUN_AS_NODE) #if BUILDFLAG(ENABLE_RUN_AS_NODE)
__attribute__((visibility("default"))) int AtomInitializeICUandStartNode( __attribute__((visibility("default"))) int ElectronInitializeICUandStartNode(
int argc, int argc,
char* argv[]); char* argv[]);
#endif #endif
} }
#endif // OS_MACOSX #endif // OS_MACOSX
#endif // SHELL_APP_ATOM_LIBRARY_MAIN_H_ #endif // SHELL_APP_ELECTRON_LIBRARY_MAIN_H_

View file

@ -2,29 +2,29 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/app/atom_library_main.h" #include "shell/app/electron_library_main.h"
#include "base/at_exit.h" #include "base/at_exit.h"
#include "base/i18n/icu_util.h" #include "base/i18n/icu_util.h"
#include "base/mac/bundle_locations.h" #include "base/mac/bundle_locations.h"
#include "base/mac/scoped_nsautorelease_pool.h" #include "base/mac/scoped_nsautorelease_pool.h"
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
#include "shell/app/atom_main_delegate.h" #include "shell/app/electron_main_delegate.h"
#include "shell/app/node_main.h" #include "shell/app/node_main.h"
#include "shell/common/atom_command_line.h" #include "shell/common/electron_command_line.h"
#include "shell/common/mac/main_application_bundle.h" #include "shell/common/mac/main_application_bundle.h"
int AtomMain(int argc, char* argv[]) { int ElectronMain(int argc, char* argv[]) {
electron::AtomMainDelegate delegate; electron::ElectronMainDelegate delegate;
content::ContentMainParams params(&delegate); content::ContentMainParams params(&delegate);
params.argc = argc; params.argc = argc;
params.argv = const_cast<const char**>(argv); params.argv = const_cast<const char**>(argv);
electron::AtomCommandLine::Init(argc, argv); electron::ElectronCommandLine::Init(argc, argv);
return content::ContentMain(params); return content::ContentMain(params);
} }
#if BUILDFLAG(ENABLE_RUN_AS_NODE) #if BUILDFLAG(ENABLE_RUN_AS_NODE)
int AtomInitializeICUandStartNode(int argc, char* argv[]) { int ElectronInitializeICUandStartNode(int argc, char* argv[]) {
base::AtExitManager atexit_manager; base::AtExitManager atexit_manager;
base::mac::ScopedNSAutoreleasePool pool; base::mac::ScopedNSAutoreleasePool pool;
base::mac::SetOverrideFrameworkBundlePath( base::mac::SetOverrideFrameworkBundlePath(

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/app/atom_main.h" #include "shell/app/electron_main.h"
#include <algorithm> #include <algorithm>
#include <cstdlib> #include <cstdlib>
@ -23,27 +23,27 @@
#include "base/win/windows_version.h" #include "base/win/windows_version.h"
#include "content/public/app/sandbox_helper_win.h" #include "content/public/app/sandbox_helper_win.h"
#include "sandbox/win/src/sandbox_types.h" #include "sandbox/win/src/sandbox_types.h"
#include "shell/app/atom_main_delegate.h"
#include "shell/app/command_line_args.h" #include "shell/app/command_line_args.h"
#include "shell/app/electron_main_delegate.h"
#include "shell/common/crash_reporter/win/crash_service_main.h" #include "shell/common/crash_reporter/win/crash_service_main.h"
#elif defined(OS_LINUX) // defined(OS_WIN) #elif defined(OS_LINUX) // defined(OS_WIN)
#include <unistd.h> #include <unistd.h>
#include <cstdio> #include <cstdio>
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
#include "shell/app/atom_main_delegate.h" // NOLINT #include "shell/app/electron_main_delegate.h" // NOLINT
#else // defined(OS_LINUX) #else // defined(OS_LINUX)
#include <mach-o/dyld.h> #include <mach-o/dyld.h>
#include <unistd.h> #include <unistd.h>
#include <cstdio> #include <cstdio>
#include "shell/app/atom_library_main.h" #include "shell/app/electron_library_main.h"
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)
#include "base/at_exit.h" #include "base/at_exit.h"
#include "base/i18n/icu_util.h" #include "base/i18n/icu_util.h"
#include "electron/buildflags/buildflags.h" #include "electron/buildflags/buildflags.h"
#include "shell/app/node_main.h" #include "shell/app/node_main.h"
#include "shell/common/atom_command_line.h" #include "shell/common/electron_command_line.h"
#include "shell/common/atom_constants.h" #include "shell/common/electron_constants.h"
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) #if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
#include "sandbox/mac/seatbelt_exec.h" // nogncheck #include "sandbox/mac/seatbelt_exec.h" // nogncheck
@ -149,12 +149,12 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) {
sandbox::SandboxInterfaceInfo sandbox_info = {0}; sandbox::SandboxInterfaceInfo sandbox_info = {0};
content::InitializeSandboxInfo(&sandbox_info); content::InitializeSandboxInfo(&sandbox_info);
electron::AtomMainDelegate delegate; electron::ElectronMainDelegate delegate;
content::ContentMainParams params(&delegate); content::ContentMainParams params(&delegate);
params.instance = instance; params.instance = instance;
params.sandbox_info = &sandbox_info; params.sandbox_info = &sandbox_info;
electron::AtomCommandLine::Init(arguments.argc, arguments.argv); electron::ElectronCommandLine::Init(arguments.argc, arguments.argv);
return content::ContentMain(params); return content::ContentMain(params);
} }
@ -171,11 +171,11 @@ int main(int argc, char* argv[]) {
} }
#endif #endif
electron::AtomMainDelegate delegate; electron::ElectronMainDelegate delegate;
content::ContentMainParams params(&delegate); content::ContentMainParams params(&delegate);
params.argc = argc; params.argc = argc;
params.argv = const_cast<const char**>(argv); params.argv = const_cast<const char**>(argv);
electron::AtomCommandLine::Init(argc, argv); electron::ElectronCommandLine::Init(argc, argv);
return content::ContentMain(params); return content::ContentMain(params);
} }
@ -186,7 +186,7 @@ int main(int argc, char* argv[]) {
#if BUILDFLAG(ENABLE_RUN_AS_NODE) #if BUILDFLAG(ENABLE_RUN_AS_NODE)
if (IsEnvSet(electron::kRunAsNode)) { if (IsEnvSet(electron::kRunAsNode)) {
return AtomInitializeICUandStartNode(argc, argv); return ElectronInitializeICUandStartNode(argc, argv);
} }
#endif #endif
@ -219,7 +219,7 @@ int main(int argc, char* argv[]) {
} }
#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD) #endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
return AtomMain(argc, argv); return ElectronMain(argc, argv);
} }
#endif // defined(OS_MACOSX) #endif // defined(OS_MACOSX)

View file

@ -2,9 +2,9 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_APP_ATOM_MAIN_H_ #ifndef SHELL_APP_ELECTRON_MAIN_H_
#define SHELL_APP_ATOM_MAIN_H_ #define SHELL_APP_ELECTRON_MAIN_H_
#include "content/public/app/content_main.h" #include "content/public/app/content_main.h"
#endif // SHELL_APP_ATOM_MAIN_H_ #endif // SHELL_APP_ELECTRON_MAIN_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/app/atom_main_delegate.h" #include "shell/app/electron_main_delegate.h"
#include <iostream> #include <iostream>
#include <memory> #include <memory>
@ -27,21 +27,21 @@
#include "services/service_manager/embedder/switches.h" #include "services/service_manager/embedder/switches.h"
#include "services/service_manager/sandbox/switches.h" #include "services/service_manager/sandbox/switches.h"
#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h" #include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
#include "shell/app/atom_content_client.h" #include "shell/app/electron_content_client.h"
#include "shell/browser/atom_browser_client.h" #include "shell/browser/electron_browser_client.h"
#include "shell/browser/atom_gpu_client.h" #include "shell/browser/electron_gpu_client.h"
#include "shell/browser/feature_list.h" #include "shell/browser/feature_list.h"
#include "shell/browser/relauncher.h" #include "shell/browser/relauncher.h"
#include "shell/common/options_switches.h" #include "shell/common/options_switches.h"
#include "shell/renderer/atom_renderer_client.h" #include "shell/renderer/electron_renderer_client.h"
#include "shell/renderer/atom_sandboxed_renderer_client.h" #include "shell/renderer/electron_sandboxed_renderer_client.h"
#include "shell/utility/atom_content_utility_client.h" #include "shell/utility/electron_content_utility_client.h"
#include "ui/base/l10n/l10n_util.h" #include "ui/base/l10n/l10n_util.h"
#include "ui/base/resource/resource_bundle.h" #include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h" #include "ui/base/ui_base_switches.h"
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include "shell/app/atom_main_delegate_mac.h" #include "shell/app/electron_main_delegate_mac.h"
#endif #endif
#if defined(OS_WIN) #if defined(OS_WIN)
@ -129,16 +129,16 @@ void LoadResourceBundle(const std::string& locale) {
#endif // BUILDFLAG(ENABLE_PDF_VIEWER) #endif // BUILDFLAG(ENABLE_PDF_VIEWER)
} }
AtomMainDelegate::AtomMainDelegate() = default; ElectronMainDelegate::ElectronMainDelegate() = default;
AtomMainDelegate::~AtomMainDelegate() = default; ElectronMainDelegate::~ElectronMainDelegate() = default;
const char* const AtomMainDelegate::kNonWildcardDomainNonPortSchemes[] = { const char* const ElectronMainDelegate::kNonWildcardDomainNonPortSchemes[] = {
extensions::kExtensionScheme}; extensions::kExtensionScheme};
const size_t AtomMainDelegate::kNonWildcardDomainNonPortSchemesSize = const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize =
base::size(kNonWildcardDomainNonPortSchemes); base::size(kNonWildcardDomainNonPortSchemes);
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) { bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) {
auto* command_line = base::CommandLine::ForCurrentProcess(); auto* command_line = base::CommandLine::ForCurrentProcess();
logging::LoggingSettings settings; logging::LoggingSettings settings;
@ -224,13 +224,13 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
<< " is not supported. See https://crbug.com/638180."; << " is not supported. See https://crbug.com/638180.";
#endif #endif
content_client_ = std::make_unique<AtomContentClient>(); content_client_ = std::make_unique<ElectronContentClient>();
SetContentClient(content_client_.get()); SetContentClient(content_client_.get());
return false; return false;
} }
void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) { void ElectronMainDelegate::PostEarlyInitialization(bool is_running_tests) {
std::string custom_locale; std::string custom_locale;
ui::ResourceBundle::InitSharedInstanceWithLocale( ui::ResourceBundle::InitSharedInstanceWithLocale(
custom_locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES); custom_locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
@ -256,11 +256,11 @@ void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) {
LoadResourceBundle(custom_locale); LoadResourceBundle(custom_locale);
AtomBrowserClient::SetApplicationLocale( ElectronBrowserClient::SetApplicationLocale(
l10n_util::GetApplicationLocale(custom_locale)); l10n_util::GetApplicationLocale(custom_locale));
} }
void AtomMainDelegate::PreSandboxStartup() { void ElectronMainDelegate::PreSandboxStartup() {
auto* command_line = base::CommandLine::ForCurrentProcess(); auto* command_line = base::CommandLine::ForCurrentProcess();
std::string process_type = std::string process_type =
@ -287,7 +287,7 @@ void AtomMainDelegate::PreSandboxStartup() {
#endif #endif
} }
void AtomMainDelegate::PreCreateMainMessageLoop() { void ElectronMainDelegate::PreCreateMainMessageLoop() {
// This is initialized early because the service manager reads some feature // This is initialized early because the service manager reads some feature
// flags and we need to make sure the feature list is initialized before the // flags and we need to make sure the feature list is initialized before the
// service manager reads the features. // service manager reads the features.
@ -297,35 +297,37 @@ void AtomMainDelegate::PreCreateMainMessageLoop() {
#endif #endif
} }
content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() { content::ContentBrowserClient*
browser_client_ = std::make_unique<AtomBrowserClient>(); ElectronMainDelegate::CreateContentBrowserClient() {
browser_client_ = std::make_unique<ElectronBrowserClient>();
return browser_client_.get(); return browser_client_.get();
} }
content::ContentGpuClient* AtomMainDelegate::CreateContentGpuClient() { content::ContentGpuClient* ElectronMainDelegate::CreateContentGpuClient() {
gpu_client_ = std::make_unique<AtomGpuClient>(); gpu_client_ = std::make_unique<ElectronGpuClient>();
return gpu_client_.get(); return gpu_client_.get();
} }
content::ContentRendererClient* content::ContentRendererClient*
AtomMainDelegate::CreateContentRendererClient() { ElectronMainDelegate::CreateContentRendererClient() {
auto* command_line = base::CommandLine::ForCurrentProcess(); auto* command_line = base::CommandLine::ForCurrentProcess();
if (IsSandboxEnabled(command_line)) { if (IsSandboxEnabled(command_line)) {
renderer_client_ = std::make_unique<AtomSandboxedRendererClient>(); renderer_client_ = std::make_unique<ElectronSandboxedRendererClient>();
} else { } else {
renderer_client_ = std::make_unique<AtomRendererClient>(); renderer_client_ = std::make_unique<ElectronRendererClient>();
} }
return renderer_client_.get(); return renderer_client_.get();
} }
content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() { content::ContentUtilityClient*
utility_client_ = std::make_unique<AtomContentUtilityClient>(); ElectronMainDelegate::CreateContentUtilityClient() {
utility_client_ = std::make_unique<ElectronContentUtilityClient>();
return utility_client_.get(); return utility_client_.get();
} }
int AtomMainDelegate::RunProcess( int ElectronMainDelegate::RunProcess(
const std::string& process_type, const std::string& process_type,
const content::MainFunctionParams& main_function_params) { const content::MainFunctionParams& main_function_params) {
if (process_type == kRelauncherProcess) if (process_type == kRelauncherProcess)
@ -335,13 +337,13 @@ int AtomMainDelegate::RunProcess(
} }
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
bool AtomMainDelegate::DelaySandboxInitialization( bool ElectronMainDelegate::DelaySandboxInitialization(
const std::string& process_type) { const std::string& process_type) {
return process_type == kRelauncherProcess; return process_type == kRelauncherProcess;
} }
#endif #endif
bool AtomMainDelegate::ShouldCreateFeatureList() { bool ElectronMainDelegate::ShouldCreateFeatureList() {
return false; return false;
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_H_ #ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
#define SHELL_APP_ATOM_MAIN_DELEGATE_H_ #define SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -19,12 +19,12 @@ namespace electron {
void LoadResourceBundle(const std::string& locale); void LoadResourceBundle(const std::string& locale);
class AtomMainDelegate : public content::ContentMainDelegate { class ElectronMainDelegate : public content::ContentMainDelegate {
public: public:
static const char* const kNonWildcardDomainNonPortSchemes[]; static const char* const kNonWildcardDomainNonPortSchemes[];
static const size_t kNonWildcardDomainNonPortSchemesSize; static const size_t kNonWildcardDomainNonPortSchemesSize;
AtomMainDelegate(); ElectronMainDelegate();
~AtomMainDelegate() override; ~ElectronMainDelegate() override;
protected: protected:
// content::ContentMainDelegate: // content::ContentMainDelegate:
@ -58,9 +58,9 @@ class AtomMainDelegate : public content::ContentMainDelegate {
std::unique_ptr<content::ContentUtilityClient> utility_client_; std::unique_ptr<content::ContentUtilityClient> utility_client_;
std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_; std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_;
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate); DISALLOW_COPY_AND_ASSIGN(ElectronMainDelegate);
}; };
} // namespace electron } // namespace electron
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_H_ #endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_H_

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ #ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_
#define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ #define SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_
namespace electron { namespace electron {
@ -12,4 +12,4 @@ void RegisterAtomCrApp();
} // namespace electron } // namespace electron
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ #endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/app/atom_main_delegate.h" #include "shell/app/electron_main_delegate.h"
#include <string> #include <string>
@ -15,7 +15,7 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "content/common/mac_helpers.h" #include "content/common/mac_helpers.h"
#include "content/public/common/content_paths.h" #include "content/public/common/content_paths.h"
#include "shell/browser/mac/atom_application.h" #include "shell/browser/mac/electron_application.h"
#include "shell/common/application_info.h" #include "shell/common/application_info.h"
#include "shell/common/mac/main_application_bundle.h" #include "shell/common/mac/main_application_bundle.h"
@ -53,12 +53,12 @@ base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
} // namespace } // namespace
void AtomMainDelegate::OverrideFrameworkBundlePath() { void ElectronMainDelegate::OverrideFrameworkBundlePath() {
base::mac::SetOverrideFrameworkBundlePath( base::mac::SetOverrideFrameworkBundlePath(
GetFrameworksPath().Append(ELECTRON_PRODUCT_NAME " Framework.framework")); GetFrameworksPath().Append(ELECTRON_PRODUCT_NAME " Framework.framework"));
} }
void AtomMainDelegate::OverrideChildProcessPath() { void ElectronMainDelegate::OverrideChildProcessPath() {
base::FilePath frameworks_path = GetFrameworksPath(); base::FilePath frameworks_path = GetFrameworksPath();
base::FilePath helper_path = base::FilePath helper_path =
GetHelperAppPath(frameworks_path, ELECTRON_PRODUCT_NAME); GetHelperAppPath(frameworks_path, ELECTRON_PRODUCT_NAME);
@ -69,7 +69,7 @@ void AtomMainDelegate::OverrideChildProcessPath() {
base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path); base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
} }
void AtomMainDelegate::SetUpBundleOverrides() { void ElectronMainDelegate::SetUpBundleOverrides() {
base::mac::ScopedNSAutoreleasePool pool; base::mac::ScopedNSAutoreleasePool pool;
NSBundle* bundle = MainApplicationBundle(); NSBundle* bundle = MainApplicationBundle();
std::string base_bundle_id = std::string base_bundle_id =
@ -82,7 +82,7 @@ void AtomMainDelegate::SetUpBundleOverrides() {
void RegisterAtomCrApp() { void RegisterAtomCrApp() {
// Force the NSApplication subclass to be used. // Force the NSApplication subclass to be used.
[AtomApplication sharedApplication]; [ElectronApplication sharedApplication];
} }
} // namespace electron } // namespace electron

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_app.h" #include "shell/browser/api/electron_api_app.h"
#include <memory> #include <memory>
@ -33,17 +33,17 @@
#include "net/ssl/client_cert_identity.h" #include "net/ssl/client_cert_identity.h"
#include "net/ssl/ssl_cert_request_info.h" #include "net/ssl/ssl_cert_request_info.h"
#include "services/service_manager/sandbox/switches.h" #include "services/service_manager/sandbox/switches.h"
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include "shell/browser/api/atom_api_session.h" #include "shell/browser/api/electron_api_session.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/api/gpuinfo_manager.h" #include "shell/browser/api/gpuinfo_manager.h"
#include "shell/browser/atom_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/browser/atom_browser_main_parts.h" #include "shell/browser/electron_browser_main_parts.h"
#include "shell/browser/atom_paths.h" #include "shell/browser/electron_paths.h"
#include "shell/browser/login_handler.h" #include "shell/browser/login_handler.h"
#include "shell/browser/relauncher.h" #include "shell/browser/relauncher.h"
#include "shell/common/application_info.h" #include "shell/common/application_info.h"
#include "shell/common/atom_command_line.h" #include "shell/common/electron_command_line.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"
@ -63,7 +63,7 @@
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
#include <CoreFoundation/CoreFoundation.h> #include <CoreFoundation/CoreFoundation.h>
#include "shell/browser/ui/cocoa/atom_bundle_mover.h" #include "shell/browser/ui/cocoa/electron_bundle_mover.h"
#endif #endif
using electron::Browser; using electron::Browser;
@ -536,7 +536,8 @@ void OnIconDataAvailable(gin_helper::Promise<gfx::Image> promise,
} // namespace } // namespace
App::App(v8::Isolate* isolate) { App::App(v8::Isolate* isolate) {
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())->set_delegate(this); static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->set_delegate(this);
Browser::Get()->AddObserver(this); Browser::Get()->AddObserver(this);
content::GpuDataManager::GetInstance()->AddObserver(this); content::GpuDataManager::GetInstance()->AddObserver(this);
@ -549,7 +550,7 @@ App::App(v8::Isolate* isolate) {
} }
App::~App() { App::~App() {
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get()) static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->set_delegate(nullptr); ->set_delegate(nullptr);
Browser::Get()->RemoveObserver(this); Browser::Get()->RemoveObserver(this);
content::GpuDataManager::GetInstance()->RemoveObserver(this); content::GpuDataManager::GetInstance()->RemoveObserver(this);
@ -573,7 +574,7 @@ void App::OnWindowAllClosed() {
} }
void App::OnQuit() { void App::OnQuit() {
int exitCode = AtomBrowserMainParts::Get()->GetExitCode(); int exitCode = ElectronBrowserMainParts::Get()->GetExitCode();
Emit("quit", exitCode); Emit("quit", exitCode);
if (process_singleton_) { if (process_singleton_) {
@ -786,7 +787,7 @@ void App::RenderProcessReady(content::RenderProcessHost* host) {
// `WebContents` instances, but this was implicitly happening before in // `WebContents` instances, but this was implicitly happening before in
// `RenderProcessPreferences`, so this is at least more explicit... // `RenderProcessPreferences`, so this is at least more explicit...
content::WebContents* web_contents = content::WebContents* web_contents =
AtomBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID()); ElectronBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
if (web_contents) if (web_contents)
WebContents::FromOrCreate(v8::Isolate::GetCurrent(), web_contents); WebContents::FromOrCreate(v8::Isolate::GetCurrent(), web_contents);
} }
@ -991,7 +992,8 @@ bool App::Relaunch(gin_helper::Arguments* js_args) {
} }
if (!override_argv) { if (!override_argv) {
const relauncher::StringVector& argv = electron::AtomCommandLine::argv(); const relauncher::StringVector& argv =
electron::ElectronCommandLine::argv();
return relauncher::RelaunchApp(argv); return relauncher::RelaunchApp(argv);
} }
@ -1065,7 +1067,7 @@ Browser::LoginItemSettings App::GetLoginItemSettings(
#if defined(USE_NSS_CERTS) #if defined(USE_NSS_CERTS)
void App::ImportCertificate(const base::DictionaryValue& options, void App::ImportCertificate(const base::DictionaryValue& options,
net::CompletionRepeatingCallback callback) { net::CompletionRepeatingCallback callback) {
auto browser_context = AtomBrowserContext::From("", false); auto browser_context = ElectronBrowserContext::From("", false);
if (!certificate_manager_model_) { if (!certificate_manager_model_) {
auto copy = base::DictionaryValue::From( auto copy = base::DictionaryValue::From(
base::Value::ToUniquePtrValue(options.Clone())); base::Value::ToUniquePtrValue(options.Clone()));
@ -1164,7 +1166,7 @@ v8::Local<v8::Promise> App::GetFileIcon(const base::FilePath& path,
icon_size = GetIconSizeByString(icon_size_string); icon_size = GetIconSizeByString(icon_size_string);
} }
auto* icon_manager = AtomBrowserMainParts::Get()->GetIconManager(); auto* icon_manager = ElectronBrowserMainParts::Get()->GetIconManager();
gfx::Image* icon = gfx::Image* icon =
icon_manager->LookupIconFromFilepath(normalized_path, icon_size); icon_manager->LookupIconFromFilepath(normalized_path, icon_size);
if (icon) { if (icon) {
@ -1314,28 +1316,28 @@ void App::EnableSandbox(gin_helper::ErrorThrower thrower) {
} }
void App::SetUserAgentFallback(const std::string& user_agent) { void App::SetUserAgentFallback(const std::string& user_agent) {
AtomBrowserClient::Get()->SetUserAgent(user_agent); ElectronBrowserClient::Get()->SetUserAgent(user_agent);
} }
std::string App::GetUserAgentFallback() { std::string App::GetUserAgentFallback() {
return AtomBrowserClient::Get()->GetUserAgent(); return ElectronBrowserClient::Get()->GetUserAgent();
} }
void App::SetBrowserClientCanUseCustomSiteInstance(bool should_disable) { void App::SetBrowserClientCanUseCustomSiteInstance(bool should_disable) {
AtomBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable); ElectronBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable);
} }
bool App::CanBrowserClientUseCustomSiteInstance() { bool App::CanBrowserClientUseCustomSiteInstance() {
return AtomBrowserClient::Get()->CanUseCustomSiteInstance(); return ElectronBrowserClient::Get()->CanUseCustomSiteInstance();
} }
#if defined(OS_MACOSX) #if defined(OS_MACOSX)
bool App::MoveToApplicationsFolder(gin_helper::ErrorThrower thrower, bool App::MoveToApplicationsFolder(gin_helper::ErrorThrower thrower,
gin::Arguments* args) { gin::Arguments* args) {
return AtomBundleMover::Move(thrower, args); return ElectronBundleMover::Move(thrower, args);
} }
bool App::IsInApplicationsFolder() { bool App::IsInApplicationsFolder() {
return AtomBundleMover::IsCurrentAppInApplicationsFolder(); return ElectronBundleMover::IsCurrentAppInApplicationsFolder();
} }
int DockBounce(gin_helper::Arguments* args) { int DockBounce(gin_helper::Arguments* args) {

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_APP_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_APP_H_
#define SHELL_BROWSER_API_ATOM_API_APP_H_ #define SHELL_BROWSER_API_ELECTRON_API_APP_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -22,9 +22,9 @@
#include "net/base/completion_repeating_callback.h" #include "net/base/completion_repeating_callback.h"
#include "net/ssl/client_cert_identity.h" #include "net/ssl/client_cert_identity.h"
#include "shell/browser/api/process_metric.h" #include "shell/browser/api/process_metric.h"
#include "shell/browser/atom_browser_client.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/browser_observer.h" #include "shell/browser/browser_observer.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/error_thrower.h"
#include "shell/common/gin_helper/event_emitter.h" #include "shell/common/gin_helper/event_emitter.h"
@ -46,7 +46,7 @@ enum class JumpListResult : int;
namespace api { namespace api {
class App : public AtomBrowserClient::Delegate, class App : public ElectronBrowserClient::Delegate,
public gin_helper::EventEmitter<App>, public gin_helper::EventEmitter<App>,
public BrowserObserver, public BrowserObserver,
public content::GpuDataManagerObserver, public content::GpuDataManagerObserver,
@ -244,4 +244,4 @@ class App : public AtomBrowserClient::Delegate,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_APP_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_APP_H_

View file

@ -3,8 +3,8 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "base/path_service.h" #include "base/path_service.h"
#include "shell/browser/api/atom_api_app.h" #include "shell/browser/api/electron_api_app.h"
#include "shell/browser/atom_paths.h" #include "shell/browser/electron_paths.h"
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_app.h" #include "shell/browser/api/electron_api_app.h"
#include <string> #include <string>

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_auto_updater.h" #include "shell/browser/api/electron_api_auto_updater.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
#define SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_ #define SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
#include <string> #include <string>
@ -57,4 +57,4 @@ class AutoUpdater : public gin_helper::EventEmitter<AutoUpdater>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_

View file

@ -2,9 +2,9 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_browser_view.h" #include "shell/browser/api/electron_api_browser_view.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/native_browser_view.h" #include "shell/browser/native_browser_view.h"
#include "shell/common/color_util.h" #include "shell/common/color_util.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
#define SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_ #define SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -70,4 +70,4 @@ class BrowserView : public gin_helper::TrackableObject<BrowserView>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_browser_window.h" #include "shell/browser/api/electron_api_browser_window.h"
#include <memory> #include <memory>

View file

@ -2,16 +2,16 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
#define SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ #define SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/cancelable_callback.h" #include "base/cancelable_callback.h"
#include "shell/browser/api/atom_api_top_level_window.h" #include "shell/browser/api/electron_api_top_level_window.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/common/gin_helper/error_thrower.h" #include "shell/common/gin_helper/error_thrower.h"
namespace electron { namespace electron {
@ -129,4 +129,4 @@ class BrowserWindow : public TopLevelWindow,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_browser_window.h" #include "shell/browser/api/electron_api_browser_window.h"
#include <memory> #include <memory>
#include <vector> #include <vector>

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_browser_window.h" #include "shell/browser/api/electron_api_browser_window.h"
#include "shell/browser/native_window_views.h" #include "shell/browser/native_window_views.h"

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_cookies.h" #include "shell/browser/api/electron_api_cookies.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
@ -18,8 +18,8 @@
#include "net/cookies/canonical_cookie.h" #include "net/cookies/canonical_cookie.h"
#include "net/cookies/cookie_store.h" #include "net/cookies/cookie_store.h"
#include "net/cookies/cookie_util.h" #include "net/cookies/cookie_util.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/browser/cookie_change_notifier.h" #include "shell/browser/cookie_change_notifier.h"
#include "shell/browser/electron_browser_context.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
@ -173,7 +173,7 @@ std::string InclusionStatusToString(
} // namespace } // namespace
Cookies::Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context) Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
: browser_context_(browser_context) { : browser_context_(browser_context) {
Init(isolate); Init(isolate);
cookie_change_subscription_ = cookie_change_subscription_ =
@ -322,7 +322,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
// static // static
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate, gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context) { ElectronBrowserContext* browser_context) {
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context)); return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_COOKIES_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
#define SHELL_BROWSER_API_ATOM_API_COOKIES_H_ #define SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -29,21 +29,21 @@ class URLRequestContextGetter;
namespace electron { namespace electron {
class AtomBrowserContext; class ElectronBrowserContext;
namespace api { namespace api {
class Cookies : public gin_helper::TrackableObject<Cookies> { class Cookies : public gin_helper::TrackableObject<Cookies> {
public: public:
static gin::Handle<Cookies> Create(v8::Isolate* isolate, static gin::Handle<Cookies> Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context); ElectronBrowserContext* browser_context);
// gin_helper::TrackableObject: // gin_helper::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate, static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype); v8::Local<v8::FunctionTemplate> prototype);
protected: protected:
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context); Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
~Cookies() override; ~Cookies() override;
v8::Local<v8::Promise> Get(const gin_helper::Dictionary& filter); v8::Local<v8::Promise> Get(const gin_helper::Dictionary& filter);
@ -58,7 +58,7 @@ class Cookies : public gin_helper::TrackableObject<Cookies> {
std::unique_ptr<base::CallbackList<void( std::unique_ptr<base::CallbackList<void(
const net::CookieChangeInfo& change)>::Subscription> const net::CookieChangeInfo& change)>::Subscription>
cookie_change_subscription_; cookie_change_subscription_;
scoped_refptr<AtomBrowserContext> browser_context_; scoped_refptr<ElectronBrowserContext> browser_context_;
DISALLOW_COPY_AND_ASSIGN(Cookies); DISALLOW_COPY_AND_ASSIGN(Cookies);
}; };
@ -67,4 +67,4 @@ class Cookies : public gin_helper::TrackableObject<Cookies> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_COOKIES_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_data_pipe_holder.h" #include "shell/browser/api/electron_api_data_pipe_holder.h"
#include <utility> #include <utility>
#include <vector> #include <vector>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
#define SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_ #define SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
#include <string> #include <string>
@ -51,4 +51,4 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_debugger.h" #include "shell/browser/api/electron_api_debugger.h"
#include <memory> #include <memory>
#include <string> #include <string>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
#define SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_ #define SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
#include <map> #include <map>
#include <string> #include <string>
@ -72,4 +72,4 @@ class Debugger : public gin_helper::TrackableObject<Debugger>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_desktop_capturer.h" #include "shell/browser/api/electron_api_desktop_capturer.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
@ -14,7 +14,7 @@
#include "chrome/browser/media/webrtc/desktop_media_list.h" #include "chrome/browser/media/webrtc/desktop_media_list.h"
#include "chrome/browser/media/webrtc/window_icon_util.h" #include "chrome/browser/media/webrtc/window_icon_util.h"
#include "content/public/browser/desktop_capture.h" #include "content/public/browser/desktop_capture.h"
#include "shell/common/api/atom_api_native_image.h" #include "shell/common/api/electron_api_native_image.h"
#include "shell/common/gin_converters/gfx_converter.h" #include "shell/common/gin_converters/gfx_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/object_template_builder.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
#define SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ #define SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -76,4 +76,4 @@ class DesktopCapturer : public gin_helper::TrackableObject<DesktopCapturer>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_download_item.h" #include "shell/browser/api/electron_api_download_item.h"
#include <map> #include <map>
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "net/base/filename_util.h" #include "net/base/filename_util.h"
#include "shell/browser/atom_browser_main_parts.h" #include "shell/browser/electron_browser_main_parts.h"
#include "shell/common/gin_converters/file_dialog_converter.h" #include "shell/common/gin_converters/file_dialog_converter.h"
#include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
#define SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_ #define SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
#include <string> #include <string>
#include <vector> #include <vector>
@ -71,4 +71,4 @@ class DownloadItem : public gin_helper::TrackableObject<DownloadItem>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_global_shortcut.h" #include "shell/browser/api/electron_api_global_shortcut.h"
#include <string> #include <string>
#include <vector> #include <vector>
#include "base/stl_util.h" #include "base/stl_util.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "shell/browser/api/atom_api_system_preferences.h" #include "shell/browser/api/electron_api_system_preferences.h"
#include "shell/common/gin_converters/accelerator_converter.h" #include "shell/common/gin_converters/accelerator_converter.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
#define SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_ #define SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
#include <map> #include <map>
#include <string> #include <string>
@ -55,4 +55,4 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_in_app_purchase.h" #include "shell/browser/api/electron_api_in_app_purchase.h"
#include <string> #include <string>
#include <utility> #include <utility>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
#define SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_ #define SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
#include <string> #include <string>
#include <vector> #include <vector>
@ -49,4 +49,4 @@ class InAppPurchase : public gin_helper::EventEmitter<InAppPurchase>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include <map> #include <map>
#include <utility> #include <utility>
@ -28,7 +28,7 @@ namespace electron {
namespace api { namespace api {
Menu::Menu(gin::Arguments* args) : model_(new AtomMenuModel(this)) { Menu::Menu(gin::Arguments* args) : model_(new ElectronMenuModel(this)) {
InitWithArgs(args); InitWithArgs(args);
model_->AddObserver(this); model_->AddObserver(this);
} }

View file

@ -2,16 +2,16 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_H_
#define SHELL_BROWSER_API_ATOM_API_MENU_H_ #define SHELL_BROWSER_API_ELECTRON_API_MENU_H_
#include <memory> #include <memory>
#include <string> #include <string>
#include "base/callback.h" #include "base/callback.h"
#include "gin/arguments.h" #include "gin/arguments.h"
#include "shell/browser/api/atom_api_top_level_window.h" #include "shell/browser/api/electron_api_top_level_window.h"
#include "shell/browser/ui/atom_menu_model.h" #include "shell/browser/ui/electron_menu_model.h"
#include "shell/common/gin_helper/trackable_object.h" #include "shell/common/gin_helper/trackable_object.h"
namespace electron { namespace electron {
@ -19,8 +19,8 @@ namespace electron {
namespace api { namespace api {
class Menu : public gin_helper::TrackableObject<Menu>, class Menu : public gin_helper::TrackableObject<Menu>,
public AtomMenuModel::Delegate, public ElectronMenuModel::Delegate,
public AtomMenuModel::Observer { public ElectronMenuModel::Observer {
public: public:
static gin_helper::WrappableBase* New(gin::Arguments* args); static gin_helper::WrappableBase* New(gin::Arguments* args);
@ -35,7 +35,7 @@ class Menu : public gin_helper::TrackableObject<Menu>,
static void SendActionToFirstResponder(const std::string& action); static void SendActionToFirstResponder(const std::string& action);
#endif #endif
AtomMenuModel* model() const { return model_.get(); } ElectronMenuModel* model() const { return model_.get(); }
protected: protected:
explicit Menu(gin::Arguments* args); explicit Menu(gin::Arguments* args);
@ -64,7 +64,7 @@ class Menu : public gin_helper::TrackableObject<Menu>,
base::OnceClosure callback) = 0; base::OnceClosure callback) = 0;
virtual void ClosePopupAt(int32_t window_id) = 0; virtual void ClosePopupAt(int32_t window_id) = 0;
std::unique_ptr<AtomMenuModel> model_; std::unique_ptr<ElectronMenuModel> model_;
Menu* parent_ = nullptr; Menu* parent_ = nullptr;
// Observable: // Observable:
@ -130,10 +130,10 @@ class Menu : public gin_helper::TrackableObject<Menu>,
namespace gin { namespace gin {
template <> template <>
struct Converter<electron::AtomMenuModel*> { struct Converter<electron::ElectronMenuModel*> {
static bool FromV8(v8::Isolate* isolate, static bool FromV8(v8::Isolate* isolate,
v8::Local<v8::Value> val, v8::Local<v8::Value> val,
electron::AtomMenuModel** out) { electron::ElectronMenuModel** out) {
// null would be tranfered to NULL. // null would be tranfered to NULL.
if (val->IsNull()) { if (val->IsNull()) {
*out = nullptr; *out = nullptr;
@ -150,4 +150,4 @@ struct Converter<electron::AtomMenuModel*> {
} // namespace gin } // namespace gin
#endif // SHELL_BROWSER_API_ATOM_API_MENU_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_MENU_H_

View file

@ -2,15 +2,15 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
#define SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_ #define SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include <map> #include <map>
#include <string> #include <string>
#import "shell/browser/ui/cocoa/atom_menu_controller.h" #import "shell/browser/ui/cocoa/electron_menu_controller.h"
using base::scoped_nsobject; using base::scoped_nsobject;
@ -42,10 +42,10 @@ class MenuMac : public Menu {
void OnClosed(int32_t window_id, base::OnceClosure callback); void OnClosed(int32_t window_id, base::OnceClosure callback);
scoped_nsobject<AtomMenuController> menu_controller_; scoped_nsobject<ElectronMenuController> menu_controller_;
// window ID -> open context menu // window ID -> open context menu
std::map<int32_t, scoped_nsobject<AtomMenuController>> popup_controllers_; std::map<int32_t, scoped_nsobject<ElectronMenuController>> popup_controllers_;
base::WeakPtrFactory<MenuMac> weak_factory_; base::WeakPtrFactory<MenuMac> weak_factory_;
@ -56,4 +56,4 @@ class MenuMac : public Menu {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#import "shell/browser/api/atom_api_menu_mac.h" #import "shell/browser/api/electron_api_menu_mac.h"
#include <string> #include <string>
#include <utility> #include <utility>
@ -67,9 +67,9 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
base::OnceClosure close_callback = base::OnceClosure close_callback =
base::BindOnce(&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id, base::BindOnce(&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id,
std::move(callback)); std::move(callback));
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>( popup_controllers_[window_id] = base::scoped_nsobject<ElectronMenuController>(
[[AtomMenuController alloc] initWithModel:model() [[ElectronMenuController alloc] initWithModel:model()
useDefaultAccelerator:NO]); useDefaultAccelerator:NO]);
NSMenu* menu = [popup_controllers_[window_id] menu]; NSMenu* menu = [popup_controllers_[window_id] menu];
NSView* view = [nswindow contentView]; NSView* view = [nswindow contentView];
@ -150,9 +150,9 @@ void MenuMac::OnClosed(int32_t window_id, base::OnceClosure callback) {
// static // static
void Menu::SetApplicationMenu(Menu* base_menu) { void Menu::SetApplicationMenu(Menu* base_menu) {
MenuMac* menu = static_cast<MenuMac*>(base_menu); MenuMac* menu = static_cast<MenuMac*>(base_menu);
base::scoped_nsobject<AtomMenuController> menu_controller( base::scoped_nsobject<ElectronMenuController> menu_controller(
[[AtomMenuController alloc] initWithModel:menu->model_.get() [[ElectronMenuController alloc] initWithModel:menu->model_.get()
useDefaultAccelerator:YES]); useDefaultAccelerator:YES]);
NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop]; NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];
[currentRunLoop cancelPerformSelector:@selector(setMainMenu:) [currentRunLoop cancelPerformSelector:@selector(setMainMenu:)

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_menu_views.h" #include "shell/browser/api/electron_api_menu_views.h"
#include <memory> #include <memory>
#include <utility> #include <utility>

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
#define SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #define SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
#include <map> #include <map>
#include <memory> #include <memory>
#include "base/memory/weak_ptr.h" #include "base/memory/weak_ptr.h"
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include "ui/display/screen.h" #include "ui/display/screen.h"
#include "ui/views/controls/menu/menu_runner.h" #include "ui/views/controls/menu/menu_runner.h"
@ -45,4 +45,4 @@ class MenuViews : public Menu {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_native_theme.h" #include "shell/browser/api/electron_api_native_theme.h"
#include <string> #include <string>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
#define SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_ #define SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
#include "shell/common/gin_helper/event_emitter.h" #include "shell/common/gin_helper/event_emitter.h"
#include "ui/native_theme/native_theme.h" #include "ui/native_theme/native_theme.h"
@ -62,4 +62,4 @@ struct Converter<ui::NativeTheme::ThemeSource> {
} // namespace gin } // namespace gin
#endif // SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_

View file

@ -2,10 +2,10 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_native_theme.h" #include "shell/browser/api/electron_api_native_theme.h"
#include "base/mac/sdk_forward_declarations.h" #include "base/mac/sdk_forward_declarations.h"
#include "shell/browser/mac/atom_application.h" #include "shell/browser/mac/electron_application.h"
namespace electron { namespace electron {

View file

@ -2,13 +2,13 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_net.h" #include "shell/browser/api/electron_api_net.h"
#include <string> #include <string>
#include "gin/handle.h" #include "gin/handle.h"
#include "services/network/public/cpp/features.h" #include "services/network/public/cpp/features.h"
#include "shell/browser/api/atom_api_url_loader.h" #include "shell/browser/api/electron_api_url_loader.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/object_template_builder.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_NET_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_NET_H_
#define SHELL_BROWSER_API_ATOM_API_NET_H_ #define SHELL_BROWSER_API_ELECTRON_API_NET_H_
#include "shell/common/gin_helper/wrappable.h" #include "shell/common/gin_helper/wrappable.h"
@ -32,4 +32,4 @@ class Net : public gin_helper::Wrappable<Net> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_NET_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_NET_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_net_log.h" #include "shell/browser/api/electron_api_net_log.h"
#include <utility> #include <utility>
@ -11,7 +11,7 @@
#include "components/net_log/chrome_net_log.h" #include "components/net_log/chrome_net_log.h"
#include "content/public/browser/storage_partition.h" #include "content/public/browser/storage_partition.h"
#include "electron/electron_version.h" #include "electron/electron_version.h"
#include "shell/browser/atom_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/browser/net/system_network_context_manager.h" #include "shell/browser/net/system_network_context_manager.h"
#include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_converters/file_path_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
@ -75,7 +75,7 @@ void ResolvePromiseWithNetError(gin_helper::Promise<void> promise,
namespace api { namespace api {
NetLog::NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context) NetLog::NetLog(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
: browser_context_(browser_context), weak_ptr_factory_(this) { : browser_context_(browser_context), weak_ptr_factory_(this) {
Init(isolate); Init(isolate);
file_task_runner_ = CreateFileTaskRunner(); file_task_runner_ = CreateFileTaskRunner();
@ -213,7 +213,7 @@ v8::Local<v8::Promise> NetLog::StopLogging(gin_helper::Arguments* args) {
// static // static
gin::Handle<NetLog> NetLog::Create(v8::Isolate* isolate, gin::Handle<NetLog> NetLog::Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context) { ElectronBrowserContext* browser_context) {
return gin::CreateHandle(isolate, new NetLog(isolate, browser_context)); return gin::CreateHandle(isolate, new NetLog(isolate, browser_context));
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_NET_LOG_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
#define SHELL_BROWSER_API_ATOM_API_NET_LOG_H_ #define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
#include <list> #include <list>
#include <memory> #include <memory>
@ -19,14 +19,14 @@
namespace electron { namespace electron {
class AtomBrowserContext; class ElectronBrowserContext;
namespace api { namespace api {
class NetLog : public gin_helper::TrackableObject<NetLog> { class NetLog : public gin_helper::TrackableObject<NetLog> {
public: public:
static gin::Handle<NetLog> Create(v8::Isolate* isolate, static gin::Handle<NetLog> Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context); ElectronBrowserContext* browser_context);
static void BuildPrototype(v8::Isolate* isolate, static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype); v8::Local<v8::FunctionTemplate> prototype);
@ -37,7 +37,8 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
bool IsCurrentlyLogging() const; bool IsCurrentlyLogging() const;
protected: protected:
explicit NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context); explicit NetLog(v8::Isolate* isolate,
ElectronBrowserContext* browser_context);
~NetLog() override; ~NetLog() override;
void OnConnectionError(); void OnConnectionError();
@ -49,7 +50,7 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
void NetLogStarted(int32_t error); void NetLogStarted(int32_t error);
private: private:
AtomBrowserContext* browser_context_; ElectronBrowserContext* browser_context_;
network::mojom::NetLogExporterPtr net_log_exporter_; network::mojom::NetLogExporterPtr net_log_exporter_;
@ -66,4 +67,4 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_NET_LOG_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_

View file

@ -2,13 +2,13 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_notification.h" #include "shell/browser/api/electron_api_notification.h"
#include "base/guid.h" #include "base/guid.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include "shell/browser/atom_browser_client.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/common/gin_converters/image_converter.h" #include "shell/common/gin_converters/image_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/object_template_builder.h"
@ -51,7 +51,7 @@ namespace api {
Notification::Notification(gin::Arguments* args) { Notification::Notification(gin::Arguments* args) {
InitWithArgs(args); InitWithArgs(args);
presenter_ = static_cast<AtomBrowserClient*>(AtomBrowserClient::Get()) presenter_ = static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter(); ->GetNotificationPresenter();
gin::Dictionary opts(nullptr); gin::Dictionary opts(nullptr);
@ -236,7 +236,7 @@ void Notification::Show() {
} }
bool Notification::IsSupported() { bool Notification::IsSupported() {
return !!static_cast<AtomBrowserClient*>(AtomBrowserClient::Get()) return !!static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
->GetNotificationPresenter(); ->GetNotificationPresenter();
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
#define SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_ #define SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -103,4 +103,4 @@ class Notification : public gin_helper::TrackableObject<Notification>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_power_monitor.h" #include "shell/browser/api/electron_api_power_monitor.h"
#include "base/power_monitor/power_monitor.h" #include "base/power_monitor/power_monitor.h"
#include "base/power_monitor/power_monitor_device_source.h" #include "base/power_monitor/power_monitor_device_source.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
#define SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_ #define SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
#include "base/compiler_specific.h" #include "base/compiler_specific.h"
#include "shell/browser/lib/power_observer.h" #include "shell/browser/lib/power_observer.h"
@ -77,4 +77,4 @@ class PowerMonitor : public gin_helper::TrackableObject<PowerMonitor>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_power_monitor.h" #include "shell/browser/api/electron_api_power_monitor.h"
#include <vector> #include <vector>

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_power_monitor.h" #include "shell/browser/api/electron_api_power_monitor.h"
#include <windows.h> #include <windows.h>
#include <wtsapi32.h> #include <wtsapi32.h>

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_power_save_blocker.h" #include "shell/browser/api/electron_api_power_save_blocker.h"
#include <string> #include <string>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
#define SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_ #define SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
#include <map> #include <map>
#include <memory> #include <memory>
@ -59,4 +59,4 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_protocol.h" #include "shell/browser/api/electron_api_protocol.h"
#include <memory> #include <memory>
#include <utility> #include <utility>
@ -10,8 +10,8 @@
#include "base/stl_util.h" #include "base/stl_util.h"
#include "content/public/browser/child_process_security_policy.h" #include "content/public/browser/child_process_security_policy.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/electron_browser_context.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/net_converter.h" #include "shell/common/gin_converters/net_converter.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
@ -160,7 +160,8 @@ std::string ErrorCodeToString(ProtocolError error) {
} // namespace } // namespace
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context) { Protocol::Protocol(v8::Isolate* isolate,
ElectronBrowserContext* browser_context) {
Init(isolate); Init(isolate);
AttachAsUserData(browser_context); AttachAsUserData(browser_context);
} }
@ -170,7 +171,7 @@ Protocol::~Protocol() = default;
void Protocol::RegisterURLLoaderFactories( void Protocol::RegisterURLLoaderFactories(
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories) { content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories) {
for (const auto& it : handlers_) { for (const auto& it : handlers_) {
factories->emplace(it.first, std::make_unique<AtomURLLoaderFactory>( factories->emplace(it.first, std::make_unique<ElectronURLLoaderFactory>(
it.second.first, it.second.second)); it.second.first, it.second.second));
} }
} }
@ -253,8 +254,9 @@ void Protocol::HandleOptionalCallback(gin::Arguments* args,
} }
// static // static
gin::Handle<Protocol> Protocol::Create(v8::Isolate* isolate, gin::Handle<Protocol> Protocol::Create(
AtomBrowserContext* browser_context) { v8::Isolate* isolate,
ElectronBrowserContext* browser_context) {
return gin::CreateHandle(isolate, new Protocol(isolate, browser_context)); return gin::CreateHandle(isolate, new Protocol(isolate, browser_context));
} }

View file

@ -2,21 +2,21 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
#define SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_ #define SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
#include <string> #include <string>
#include <vector> #include <vector>
#include "content/public/browser/content_browser_client.h" #include "content/public/browser/content_browser_client.h"
#include "gin/handle.h" #include "gin/handle.h"
#include "shell/browser/net/atom_url_loader_factory.h" #include "shell/browser/net/electron_url_loader_factory.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/trackable_object.h" #include "shell/common/gin_helper/trackable_object.h"
namespace electron { namespace electron {
class AtomBrowserContext; class ElectronBrowserContext;
namespace api { namespace api {
@ -38,19 +38,19 @@ enum class ProtocolError {
class Protocol : public gin_helper::TrackableObject<Protocol> { class Protocol : public gin_helper::TrackableObject<Protocol> {
public: public:
static gin::Handle<Protocol> Create(v8::Isolate* isolate, static gin::Handle<Protocol> Create(v8::Isolate* isolate,
AtomBrowserContext* browser_context); ElectronBrowserContext* browser_context);
static void BuildPrototype(v8::Isolate* isolate, static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype); v8::Local<v8::FunctionTemplate> prototype);
// Used by AtomBrowserClient for creating URLLoaderFactory. // Used by ElectronBrowserClient for creating URLLoaderFactory.
void RegisterURLLoaderFactories( void RegisterURLLoaderFactories(
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories); content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories);
const HandlersMap& intercept_handlers() const { return intercept_handlers_; } const HandlersMap& intercept_handlers() const { return intercept_handlers_; }
private: private:
Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context); Protocol(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
~Protocol() override; ~Protocol() override;
// Callback types. // Callback types.
@ -99,4 +99,4 @@ class Protocol : public gin_helper::TrackableObject<Protocol> {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_screen.h" #include "shell/browser/api/electron_api_screen.h"
#include <algorithm> #include <algorithm>
#include <string> #include <string>

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_SCREEN_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
#define SHELL_BROWSER_API_ATOM_API_SCREEN_H_ #define SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
#include <vector> #include <vector>
@ -56,4 +56,4 @@ class Screen : public gin_helper::EventEmitter<Screen>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_SCREEN_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_session.h" #include "shell/browser/api/electron_api_session.h"
#include <algorithm> #include <algorithm>
#include <map> #include <map>
@ -40,16 +40,16 @@
#include "net/http/http_cache.h" #include "net/http/http_cache.h"
#include "services/network/network_service.h" #include "services/network/network_service.h"
#include "services/network/public/cpp/features.h" #include "services/network/public/cpp/features.h"
#include "shell/browser/api/atom_api_cookies.h" #include "shell/browser/api/electron_api_cookies.h"
#include "shell/browser/api/atom_api_data_pipe_holder.h" #include "shell/browser/api/electron_api_data_pipe_holder.h"
#include "shell/browser/api/atom_api_download_item.h" #include "shell/browser/api/electron_api_download_item.h"
#include "shell/browser/api/atom_api_net_log.h" #include "shell/browser/api/electron_api_net_log.h"
#include "shell/browser/api/atom_api_protocol.h" #include "shell/browser/api/electron_api_protocol.h"
#include "shell/browser/api/atom_api_web_request.h" #include "shell/browser/api/electron_api_web_request.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/browser/atom_browser_main_parts.h"
#include "shell/browser/atom_permission_manager.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/electron_browser_context.h"
#include "shell/browser/electron_browser_main_parts.h"
#include "shell/browser/electron_permission_manager.h"
#include "shell/browser/media/media_device_id_salt.h" #include "shell/browser/media/media_device_id_salt.h"
#include "shell/browser/net/cert_verifier_client.h" #include "shell/browser/net/cert_verifier_client.h"
#include "shell/browser/session_preferences.h" #include "shell/browser/session_preferences.h"
@ -228,7 +228,7 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
} // namespace } // namespace
Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context) Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
: network_emulation_token_(base::UnguessableToken::Create()), : network_emulation_token_(base::UnguessableToken::Create()),
browser_context_(browser_context) { browser_context_(browser_context) {
// Observe DownloadManager to get download notifications. // Observe DownloadManager to get download notifications.
@ -454,23 +454,23 @@ void Session::SetCertVerifyProc(v8::Local<v8::Value> val,
void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val, void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val,
gin_helper::Arguments* args) { gin_helper::Arguments* args) {
auto* permission_manager = static_cast<AtomPermissionManager*>( auto* permission_manager = static_cast<ElectronPermissionManager*>(
browser_context()->GetPermissionControllerDelegate()); browser_context()->GetPermissionControllerDelegate());
if (val->IsNull()) { if (val->IsNull()) {
permission_manager->SetPermissionRequestHandler( permission_manager->SetPermissionRequestHandler(
AtomPermissionManager::RequestHandler()); ElectronPermissionManager::RequestHandler());
return; return;
} }
auto handler = std::make_unique<AtomPermissionManager::RequestHandler>(); auto handler = std::make_unique<ElectronPermissionManager::RequestHandler>();
if (!gin::ConvertFromV8(args->isolate(), val, handler.get())) { if (!gin::ConvertFromV8(args->isolate(), val, handler.get())) {
args->ThrowError("Must pass null or function"); args->ThrowError("Must pass null or function");
return; return;
} }
permission_manager->SetPermissionRequestHandler(base::BindRepeating( permission_manager->SetPermissionRequestHandler(base::BindRepeating(
[](AtomPermissionManager::RequestHandler* handler, [](ElectronPermissionManager::RequestHandler* handler,
content::WebContents* web_contents, content::WebContents* web_contents,
content::PermissionType permission_type, content::PermissionType permission_type,
AtomPermissionManager::StatusCallback callback, ElectronPermissionManager::StatusCallback callback,
const base::Value& details) { const base::Value& details) {
handler->Run(web_contents, permission_type, handler->Run(web_contents, permission_type,
base::AdaptCallbackForRepeating(std::move(callback)), base::AdaptCallbackForRepeating(std::move(callback)),
@ -481,12 +481,12 @@ void Session::SetPermissionRequestHandler(v8::Local<v8::Value> val,
void Session::SetPermissionCheckHandler(v8::Local<v8::Value> val, void Session::SetPermissionCheckHandler(v8::Local<v8::Value> val,
gin_helper::Arguments* args) { gin_helper::Arguments* args) {
AtomPermissionManager::CheckHandler handler; ElectronPermissionManager::CheckHandler handler;
if (!(val->IsNull() || gin::ConvertFromV8(args->isolate(), val, &handler))) { if (!(val->IsNull() || gin::ConvertFromV8(args->isolate(), val, &handler))) {
args->ThrowError("Must pass null or function"); args->ThrowError("Must pass null or function");
return; return;
} }
auto* permission_manager = static_cast<AtomPermissionManager*>( auto* permission_manager = static_cast<ElectronPermissionManager*>(
browser_context()->GetPermissionControllerDelegate()); browser_context()->GetPermissionControllerDelegate());
permission_manager->SetPermissionCheckHandler(handler); permission_manager->SetPermissionCheckHandler(handler);
} }
@ -695,7 +695,7 @@ v8::Local<v8::Value> Session::NetLog(v8::Isolate* isolate) {
} }
static void StartPreconnectOnUI( static void StartPreconnectOnUI(
scoped_refptr<AtomBrowserContext> browser_context, scoped_refptr<ElectronBrowserContext> browser_context,
const GURL& url, const GURL& url,
int num_sockets_to_preconnect) { int num_sockets_to_preconnect) {
std::vector<predictors::PreconnectRequest> requests = { std::vector<predictors::PreconnectRequest> requests = {
@ -782,8 +782,9 @@ bool Session::AddWordToSpellCheckerDictionary(const std::string& word) {
#endif #endif
// static // static
gin::Handle<Session> Session::CreateFrom(v8::Isolate* isolate, gin::Handle<Session> Session::CreateFrom(
AtomBrowserContext* browser_context) { v8::Isolate* isolate,
ElectronBrowserContext* browser_context) {
auto* existing = TrackableObject::FromWrappedClass(isolate, browser_context); auto* existing = TrackableObject::FromWrappedClass(isolate, browser_context);
if (existing) if (existing)
return gin::CreateHandle(isolate, static_cast<Session*>(existing)); return gin::CreateHandle(isolate, static_cast<Session*>(existing));
@ -803,16 +804,18 @@ gin::Handle<Session> Session::CreateFrom(v8::Isolate* isolate,
gin::Handle<Session> Session::FromPartition(v8::Isolate* isolate, gin::Handle<Session> Session::FromPartition(v8::Isolate* isolate,
const std::string& partition, const std::string& partition,
base::DictionaryValue options) { base::DictionaryValue options) {
scoped_refptr<AtomBrowserContext> browser_context; scoped_refptr<ElectronBrowserContext> browser_context;
if (partition.empty()) { if (partition.empty()) {
browser_context = AtomBrowserContext::From("", false, std::move(options)); browser_context =
ElectronBrowserContext::From("", false, std::move(options));
} else if (base::StartsWith(partition, kPersistPrefix, } else if (base::StartsWith(partition, kPersistPrefix,
base::CompareCase::SENSITIVE)) { base::CompareCase::SENSITIVE)) {
std::string name = partition.substr(8); std::string name = partition.substr(8);
browser_context = AtomBrowserContext::From(name, false, std::move(options)); browser_context =
ElectronBrowserContext::From(name, false, std::move(options));
} else { } else {
browser_context = browser_context =
AtomBrowserContext::From(partition, true, std::move(options)); ElectronBrowserContext::From(partition, true, std::move(options));
} }
return CreateFrom(isolate, browser_context.get()); return CreateFrom(isolate, browser_context.get());
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_SESSION_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
#define SHELL_BROWSER_API_ATOM_API_SESSION_H_ #define SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
#include <string> #include <string>
#include <vector> #include <vector>
@ -32,7 +32,7 @@ class ProxyConfig;
namespace electron { namespace electron {
class AtomBrowserContext; class ElectronBrowserContext;
namespace api { namespace api {
@ -40,8 +40,9 @@ class Session : public gin_helper::TrackableObject<Session>,
public content::DownloadManager::Observer { public content::DownloadManager::Observer {
public: public:
// Gets or creates Session from the |browser_context|. // Gets or creates Session from the |browser_context|.
static gin::Handle<Session> CreateFrom(v8::Isolate* isolate, static gin::Handle<Session> CreateFrom(
AtomBrowserContext* browser_context); v8::Isolate* isolate,
ElectronBrowserContext* browser_context);
// Gets the Session of |partition|. // Gets the Session of |partition|.
static gin::Handle<Session> FromPartition( static gin::Handle<Session> FromPartition(
@ -49,7 +50,9 @@ class Session : public gin_helper::TrackableObject<Session>,
const std::string& partition, const std::string& partition,
base::DictionaryValue options = base::DictionaryValue()); base::DictionaryValue options = base::DictionaryValue());
AtomBrowserContext* browser_context() const { return browser_context_.get(); } ElectronBrowserContext* browser_context() const {
return browser_context_.get();
}
// gin_helper::TrackableObject: // gin_helper::TrackableObject:
static void BuildPrototype(v8::Isolate* isolate, static void BuildPrototype(v8::Isolate* isolate,
@ -103,7 +106,7 @@ class Session : public gin_helper::TrackableObject<Session>,
#endif #endif
protected: protected:
Session(v8::Isolate* isolate, AtomBrowserContext* browser_context); Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
~Session() override; ~Session() override;
// content::DownloadManager::Observer: // content::DownloadManager::Observer:
@ -122,7 +125,7 @@ class Session : public gin_helper::TrackableObject<Session>,
// The client id to enable the network throttler. // The client id to enable the network throttler.
base::UnguessableToken network_emulation_token_; base::UnguessableToken network_emulation_token_;
scoped_refptr<AtomBrowserContext> browser_context_; scoped_refptr<ElectronBrowserContext> browser_context_;
DISALLOW_COPY_AND_ASSIGN(Session); DISALLOW_COPY_AND_ASSIGN(Session);
}; };
@ -131,4 +134,4 @@ class Session : public gin_helper::TrackableObject<Session>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_SESSION_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_SESSION_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_system_preferences.h" #include "shell/browser/api/electron_api_system_preferences.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_converters/value_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
#define SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ #define SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -165,4 +165,4 @@ class SystemPreferences : public gin_helper::EventEmitter<SystemPreferences>
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_system_preferences.h" #include "shell/browser/api/electron_api_system_preferences.h"
#include <map> #include <map>
#include <memory> #include <memory>
@ -23,8 +23,8 @@
#include "base/values.h" #include "base/values.h"
#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h" #include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.h"
#include "net/base/mac/url_conversions.h" #include "net/base/mac/url_conversions.h"
#include "shell/browser/mac/atom_application.h"
#include "shell/browser/mac/dict_util.h" #include "shell/browser/mac/dict_util.h"
#include "shell/browser/mac/electron_application.h"
#include "shell/browser/ui/cocoa/NSColor+Hex.h" #include "shell/browser/ui/cocoa/NSColor+Hex.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/value_converter.h" #include "shell/common/gin_converters/value_converter.h"

View file

@ -5,7 +5,7 @@
#include <dwmapi.h> #include <dwmapi.h>
#include <iomanip> #include <iomanip>
#include "shell/browser/api/atom_api_system_preferences.h" #include "shell/browser/api/electron_api_system_preferences.h"
#include "base/win/wrapped_window_proc.h" #include "base/win/wrapped_window_proc.h"
#include "shell/common/color_util.h" #include "shell/common/color_util.h"

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_top_level_window.h" #include "shell/browser/api/electron_api_top_level_window.h"
#include <string> #include <string>
#include <utility> #include <utility>
@ -10,10 +10,10 @@
#include "electron/buildflags/buildflags.h" #include "electron/buildflags/buildflags.h"
#include "gin/dictionary.h" #include "gin/dictionary.h"
#include "shell/browser/api/atom_api_browser_view.h" #include "shell/browser/api/electron_api_browser_view.h"
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/electron_api_view.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/common/color_util.h" #include "shell/common/color_util.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/file_path_converter.h" #include "shell/common/gin_converters/file_path_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
#define SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_ #define SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
#include <map> #include <map>
#include <memory> #include <memory>
@ -16,7 +16,7 @@
#include "gin/handle.h" #include "gin/handle.h"
#include "shell/browser/native_window.h" #include "shell/browser/native_window.h"
#include "shell/browser/native_window_observer.h" #include "shell/browser/native_window_observer.h"
#include "shell/common/api/atom_api_native_image.h" #include "shell/common/api/electron_api_native_image.h"
#include "shell/common/gin_helper/trackable_object.h" #include "shell/common/gin_helper/trackable_object.h"
namespace electron { namespace electron {
@ -266,4 +266,4 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_

View file

@ -2,14 +2,14 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_tray.h" #include "shell/browser/api/electron_api_tray.h"
#include <string> #include <string>
#include "base/threading/thread_task_runner_handle.h" #include "base/threading/thread_task_runner_handle.h"
#include "shell/browser/api/atom_api_menu.h" #include "shell/browser/api/electron_api_menu.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/common/api/atom_api_native_image.h" #include "shell/common/api/electron_api_native_image.h"
#include "shell/common/gin_converters/gfx_converter.h" #include "shell/common/gin_converters/gfx_converter.h"
#include "shell/common/gin_converters/guid_converter.h" #include "shell/common/gin_converters/guid_converter.h"
#include "shell/common/gin_converters/image_converter.h" #include "shell/common/gin_converters/image_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_TRAY_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
#define SHELL_BROWSER_API_ATOM_API_TRAY_H_ #define SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -98,4 +98,4 @@ class Tray : public gin_helper::TrackableObject<Tray>, public TrayIconObserver {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_TRAY_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_TRAY_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_url_loader.h" #include "shell/browser/api/electron_api_url_loader.h"
#include <algorithm> #include <algorithm>
#include <map> #include <map>
@ -20,8 +20,8 @@
#include "services/network/public/cpp/simple_url_loader.h" #include "services/network/public/cpp/simple_url_loader.h"
#include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h" #include "services/network/public/mojom/chunked_data_pipe_getter.mojom.h"
#include "services/network/public/mojom/url_loader_factory.mojom.h" #include "services/network/public/mojom/url_loader_factory.mojom.h"
#include "shell/browser/api/atom_api_session.h" #include "shell/browser/api/electron_api_session.h"
#include "shell/browser/atom_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/net_converter.h" #include "shell/common/gin_converters/net_converter.h"

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
#define SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_ #define SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
#include <memory> #include <memory>
#include <string> #include <string>
@ -90,4 +90,4 @@ class SimpleURLLoaderWrapper
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/electron_api_view.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h" #include "shell/common/gin_helper/object_template_builder.h"

View file

@ -2,15 +2,15 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_VIEW_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
#define SHELL_BROWSER_API_ATOM_API_VIEW_H_ #define SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
#include <memory> #include <memory>
#include <vector> #include <vector>
#include "electron/buildflags/buildflags.h" #include "electron/buildflags/buildflags.h"
#include "gin/handle.h" #include "gin/handle.h"
#include "shell/browser/api/views/atom_api_layout_manager.h" #include "shell/browser/api/views/electron_api_layout_manager.h"
#include "ui/views/view.h" #include "ui/views/view.h"
namespace electron { namespace electron {
@ -71,4 +71,4 @@ struct Converter<views::View*> {
} // namespace gin } // namespace gin
#endif // SHELL_BROWSER_API_ATOM_API_VIEW_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_VIEW_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include <memory> #include <memory>
#include <set> #include <set>
@ -47,17 +47,17 @@
#include "mojo/public/cpp/bindings/associated_remote.h" #include "mojo/public/cpp/bindings/associated_remote.h"
#include "mojo/public/cpp/system/platform_handle.h" #include "mojo/public/cpp/system/platform_handle.h"
#include "ppapi/buildflags/buildflags.h" #include "ppapi/buildflags/buildflags.h"
#include "shell/browser/api/atom_api_browser_window.h" #include "shell/browser/api/electron_api_browser_window.h"
#include "shell/browser/api/atom_api_debugger.h" #include "shell/browser/api/electron_api_debugger.h"
#include "shell/browser/api/atom_api_session.h" #include "shell/browser/api/electron_api_session.h"
#include "shell/browser/atom_autofill_driver_factory.h"
#include "shell/browser/atom_browser_client.h"
#include "shell/browser/atom_browser_context.h"
#include "shell/browser/atom_browser_main_parts.h"
#include "shell/browser/atom_javascript_dialog_manager.h"
#include "shell/browser/atom_navigation_throttle.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/child_web_contents_tracker.h" #include "shell/browser/child_web_contents_tracker.h"
#include "shell/browser/electron_autofill_driver_factory.h"
#include "shell/browser/electron_browser_client.h"
#include "shell/browser/electron_browser_context.h"
#include "shell/browser/electron_browser_main_parts.h"
#include "shell/browser/electron_javascript_dialog_manager.h"
#include "shell/browser/electron_navigation_throttle.h"
#include "shell/browser/lib/bluetooth_chooser.h" #include "shell/browser/lib/bluetooth_chooser.h"
#include "shell/browser/native_window.h" #include "shell/browser/native_window.h"
#include "shell/browser/session_preferences.h" #include "shell/browser/session_preferences.h"
@ -68,7 +68,7 @@
#include "shell/browser/web_contents_preferences.h" #include "shell/browser/web_contents_preferences.h"
#include "shell/browser/web_contents_zoom_controller.h" #include "shell/browser/web_contents_zoom_controller.h"
#include "shell/browser/web_view_guest_delegate.h" #include "shell/browser/web_view_guest_delegate.h"
#include "shell/common/api/atom_api_native_image.h" #include "shell/common/api/electron_api_native_image.h"
#include "shell/common/color_util.h" #include "shell/common/color_util.h"
#include "shell/common/gin_converters/blink_converter.h" #include "shell/common/gin_converters/blink_converter.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
@ -882,7 +882,7 @@ std::unique_ptr<content::BluetoothChooser> WebContents::RunBluetoothChooser(
content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager( content::JavaScriptDialogManager* WebContents::GetJavaScriptDialogManager(
content::WebContents* source) { content::WebContents* source) {
if (!dialog_manager_) if (!dialog_manager_)
dialog_manager_ = std::make_unique<AtomJavaScriptDialogManager>(this); dialog_manager_ = std::make_unique<ElectronJavaScriptDialogManager>(this);
return dialog_manager_.get(); return dialog_manager_.get();
} }
@ -1500,17 +1500,17 @@ void WebContents::Stop() {
} }
void WebContents::GoBack() { void WebContents::GoBack() {
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
web_contents()->GetController().GoBack(); web_contents()->GetController().GoBack();
} }
void WebContents::GoForward() { void WebContents::GoForward() {
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
web_contents()->GetController().GoForward(); web_contents()->GetController().GoForward();
} }
void WebContents::GoToOffset(int offset) { void WebContents::GoToOffset(int offset) {
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
web_contents()->GetController().GoToOffset(offset); web_contents()->GetController().GoToOffset(offset);
} }
@ -2687,8 +2687,9 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
.SetProperty("debugger", &WebContents::Debugger); .SetProperty("debugger", &WebContents::Debugger);
} }
AtomBrowserContext* WebContents::GetBrowserContext() const { ElectronBrowserContext* WebContents::GetBrowserContext() const {
return static_cast<AtomBrowserContext*>(web_contents()->GetBrowserContext()); return static_cast<ElectronBrowserContext*>(
web_contents()->GetBrowserContext());
} }
// static // static

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ #define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
#include <map> #include <map>
#include <memory> #include <memory>
@ -60,8 +60,8 @@ class ResourceRequestBody;
namespace electron { namespace electron {
class AtomBrowserContext; class ElectronBrowserContext;
class AtomJavaScriptDialogManager; class ElectronJavaScriptDialogManager;
class InspectableWebContents; class InspectableWebContents;
class WebContentsZoomController; class WebContentsZoomController;
class WebViewGuestDelegate; class WebViewGuestDelegate;
@ -497,7 +497,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
void DevToolsClosed() override; void DevToolsClosed() override;
private: private:
AtomBrowserContext* GetBrowserContext() const; ElectronBrowserContext* GetBrowserContext() const;
// Binds the given request for the ElectronBrowser API. When the // Binds the given request for the ElectronBrowser API. When the
// RenderFrameHost is destroyed, all related bindings will be removed. // RenderFrameHost is destroyed, all related bindings will be removed.
@ -556,7 +556,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
v8::Global<v8::Value> devtools_web_contents_; v8::Global<v8::Value> devtools_web_contents_;
v8::Global<v8::Value> debugger_; v8::Global<v8::Value> debugger_;
std::unique_ptr<AtomJavaScriptDialogManager> dialog_manager_; std::unique_ptr<ElectronJavaScriptDialogManager> dialog_manager_;
std::unique_ptr<WebViewGuestDelegate> guest_delegate_; std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
std::unique_ptr<FrameSubscriber> frame_subscriber_; std::unique_ptr<FrameSubscriber> frame_subscriber_;
@ -603,4 +603,4 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "content/browser/frame_host/frame_tree.h" // nogncheck #include "content/browser/frame_host/frame_tree.h" // nogncheck
#include "content/browser/frame_host/frame_tree_node.h" // nogncheck #include "content/browser/frame_host/frame_tree_node.h" // nogncheck

View file

@ -3,7 +3,7 @@
// found in the LICENSE file. // found in the LICENSE file.
#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/render_widget_host_view.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#import <Cocoa/Cocoa.h> #import <Cocoa/Cocoa.h>

View file

@ -2,10 +2,10 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_web_contents_view.h" #include "shell/browser/api/electron_api_web_contents_view.h"
#include "content/public/browser/web_contents_user_data.h" #include "content/public/browser/web_contents_user_data.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/browser.h" #include "shell/browser/browser.h"
#include "shell/browser/ui/inspectable_web_contents_view.h" #include "shell/browser/ui/inspectable_web_contents_view.h"
#include "shell/common/gin_helper/constructor.h" #include "shell/common/gin_helper/constructor.h"

View file

@ -2,11 +2,11 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_ #define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
#include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_observer.h"
#include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/electron_api_view.h"
namespace electron { namespace electron {
@ -45,4 +45,4 @@ class WebContentsView : public View, public content::WebContentsObserver {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/atom_api_web_request.h" #include "shell/browser/api/electron_api_web_request.h"
#include <memory> #include <memory>
#include <string> #include <string>
@ -13,9 +13,9 @@
#include "gin/converter.h" #include "gin/converter.h"
#include "gin/dictionary.h" #include "gin/dictionary.h"
#include "gin/object_template_builder.h" #include "gin/object_template_builder.h"
#include "shell/browser/api/atom_api_session.h" #include "shell/browser/api/electron_api_session.h"
#include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/atom_browser_context.h" #include "shell/browser/electron_browser_context.h"
#include "shell/common/gin_converters/callback_converter.h" #include "shell/common/gin_converters/callback_converter.h"
#include "shell/common/gin_converters/gurl_converter.h" #include "shell/common/gin_converters/gurl_converter.h"
#include "shell/common/gin_converters/net_converter.h" #include "shell/common/gin_converters/net_converter.h"
@ -479,8 +479,8 @@ gin::Handle<WebRequest> WebRequest::FromOrCreate(
if (handle.IsEmpty()) { if (handle.IsEmpty()) {
// Make sure the |Session| object has the |webRequest| property created. // Make sure the |Session| object has the |webRequest| property created.
v8::Local<v8::Value> web_request = v8::Local<v8::Value> web_request =
Session::CreateFrom(isolate, Session::CreateFrom(
static_cast<AtomBrowserContext*>(browser_context)) isolate, static_cast<ElectronBrowserContext*>(browser_context))
->WebRequest(isolate); ->WebRequest(isolate);
gin::ConvertFromV8(isolate, web_request, &handle); gin::ConvertFromV8(isolate, web_request, &handle);
} }

View file

@ -2,8 +2,8 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_ #ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
#define SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_ #define SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
#include <map> #include <map>
#include <set> #include <set>
@ -155,4 +155,4 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_ #endif // SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_

View file

@ -10,7 +10,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
#include "content/public/browser/web_contents.h" #include "content/public/browser/web_contents.h"
#include "shell/browser/atom_browser_context.h" #include "shell/browser/electron_browser_context.h"
namespace electron { namespace electron {

View file

@ -2,11 +2,11 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/views/atom_api_box_layout.h" #include "shell/browser/api/views/electron_api_box_layout.h"
#include <string> #include <string>
#include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/electron_api_view.h"
#include "shell/common/gin_helper/constructor.h" #include "shell/common/gin_helper/constructor.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"
#include "shell/common/node_includes.h" #include "shell/common/node_includes.h"

View file

@ -2,11 +2,11 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_ #ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_ #define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
#include "gin/handle.h" #include "gin/handle.h"
#include "shell/browser/api/views/atom_api_layout_manager.h" #include "shell/browser/api/views/electron_api_layout_manager.h"
#include "ui/views/layout/box_layout.h" #include "ui/views/layout/box_layout.h"
namespace electron { namespace electron {
@ -38,4 +38,4 @@ class BoxLayout : public LayoutManager {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_ #endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/views/atom_api_button.h" #include "shell/browser/api/views/electron_api_button.h"
#include "shell/common/gin_helper/constructor.h" #include "shell/common/gin_helper/constructor.h"
#include "shell/common/gin_helper/dictionary.h" #include "shell/common/gin_helper/dictionary.h"

View file

@ -2,11 +2,11 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_ #ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_ #define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
#include "gin/handle.h" #include "gin/handle.h"
#include "shell/browser/api/atom_api_view.h" #include "shell/browser/api/electron_api_view.h"
#include "ui/views/controls/button/button.h" #include "ui/views/controls/button/button.h"
namespace electron { namespace electron {
@ -37,4 +37,4 @@ class Button : public View, public views::ButtonListener {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_ #endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_

View file

@ -2,7 +2,7 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "shell/browser/api/views/atom_api_label_button.h" #include "shell/browser/api/views/electron_api_label_button.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "shell/common/gin_helper/constructor.h" #include "shell/common/gin_helper/constructor.h"

View file

@ -2,12 +2,12 @@
// Use of this source code is governed by the MIT license that can be // Use of this source code is governed by the MIT license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_ #ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
#define SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_ #define SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
#include <string> #include <string>
#include "shell/browser/api/views/atom_api_button.h" #include "shell/browser/api/views/electron_api_button.h"
#include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/label_button.h"
namespace electron { namespace electron {
@ -44,4 +44,4 @@ class LabelButton : public Button {
} // namespace electron } // namespace electron
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_ #endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_

Some files were not shown because too many files have changed in this diff Show more