chore: rename atom -> electron (#21986)
This commit is contained in:
parent
f14fc4b041
commit
d9321f4df7
287 changed files with 1771 additions and 1708 deletions
48
BUILD.gn
48
BUILD.gn
|
@ -136,7 +136,7 @@ webpack_build("electron_content_script_bundle") {
|
|||
out_file = "$target_gen_dir/js2c/content_script_bundle.js"
|
||||
}
|
||||
|
||||
copy("atom_js2c_copy") {
|
||||
copy("electron_js2c_copy") {
|
||||
sources = [
|
||||
"lib/common/asar.js",
|
||||
"lib/common/asar_init.js",
|
||||
|
@ -144,12 +144,12 @@ copy("atom_js2c_copy") {
|
|||
outputs = [ "$target_gen_dir/js2c/{{source_file_part}}" ]
|
||||
}
|
||||
|
||||
action("atom_js2c") {
|
||||
action("electron_js2c") {
|
||||
deps = [
|
||||
":atom_js2c_copy",
|
||||
":electron_browser_bundle",
|
||||
":electron_content_script_bundle",
|
||||
":electron_isolated_renderer_bundle",
|
||||
":electron_js2c_copy",
|
||||
":electron_renderer_bundle",
|
||||
":electron_sandboxed_renderer_bundle",
|
||||
":electron_worker_bundle",
|
||||
|
@ -170,7 +170,7 @@ action("atom_js2c") {
|
|||
]
|
||||
|
||||
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"
|
||||
args = [ rebase_path("//third_party/electron_node") ] +
|
||||
|
@ -312,7 +312,7 @@ source_set("electron_lib") {
|
|||
]
|
||||
|
||||
deps = [
|
||||
":atom_js2c",
|
||||
":electron_js2c",
|
||||
":electron_version_header",
|
||||
":manifests",
|
||||
":resources",
|
||||
|
@ -468,7 +468,7 @@ source_set("electron_lib") {
|
|||
"shell/browser/ui/views/autofill_popup_view.h",
|
||||
]
|
||||
if (is_mas_build) {
|
||||
sources += [ "shell/browser/api/atom_api_app_mas.mm" ]
|
||||
sources += [ "shell/browser/api/electron_api_app_mas.mm" ]
|
||||
sources -= [
|
||||
"shell/browser/auto_updater_mac.mm",
|
||||
"shell/common/crash_reporter/crash_reporter_mac.h",
|
||||
|
@ -595,27 +595,27 @@ source_set("electron_lib") {
|
|||
deps += [ "//third_party/webrtc/modules/desktop_capture" ]
|
||||
}
|
||||
sources += [
|
||||
"shell/browser/api/atom_api_desktop_capturer.cc",
|
||||
"shell/browser/api/atom_api_desktop_capturer.h",
|
||||
"shell/browser/api/electron_api_desktop_capturer.cc",
|
||||
"shell/browser/api/electron_api_desktop_capturer.h",
|
||||
]
|
||||
}
|
||||
|
||||
if (enable_view_api) {
|
||||
sources += [
|
||||
"shell/browser/api/views/atom_api_box_layout.cc",
|
||||
"shell/browser/api/views/atom_api_box_layout.h",
|
||||
"shell/browser/api/views/atom_api_button.cc",
|
||||
"shell/browser/api/views/atom_api_button.h",
|
||||
"shell/browser/api/views/atom_api_label_button.cc",
|
||||
"shell/browser/api/views/atom_api_label_button.h",
|
||||
"shell/browser/api/views/atom_api_layout_manager.cc",
|
||||
"shell/browser/api/views/atom_api_layout_manager.h",
|
||||
"shell/browser/api/views/atom_api_md_text_button.cc",
|
||||
"shell/browser/api/views/atom_api_md_text_button.h",
|
||||
"shell/browser/api/views/atom_api_resize_area.cc",
|
||||
"shell/browser/api/views/atom_api_resize_area.h",
|
||||
"shell/browser/api/views/atom_api_text_field.cc",
|
||||
"shell/browser/api/views/atom_api_text_field.h",
|
||||
"shell/browser/api/views/electron_api_box_layout.cc",
|
||||
"shell/browser/api/views/electron_api_box_layout.h",
|
||||
"shell/browser/api/views/electron_api_button.cc",
|
||||
"shell/browser/api/views/electron_api_button.h",
|
||||
"shell/browser/api/views/electron_api_label_button.cc",
|
||||
"shell/browser/api/views/electron_api_label_button.h",
|
||||
"shell/browser/api/views/electron_api_layout_manager.cc",
|
||||
"shell/browser/api/views/electron_api_layout_manager.h",
|
||||
"shell/browser/api/views/electron_api_md_text_button.cc",
|
||||
"shell/browser/api/views/electron_api_md_text_button.h",
|
||||
"shell/browser/api/views/electron_api_resize_area.cc",
|
||||
"shell/browser/api/views/electron_api_resize_area.h",
|
||||
"shell/browser/api/views/electron_api_text_field.cc",
|
||||
"shell/browser/api/views/electron_api_text_field.h",
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -816,7 +816,7 @@ if (is_mac) {
|
|||
}
|
||||
defines = [ "HELPER_EXECUTABLE" ]
|
||||
sources = filenames.app_sources
|
||||
sources += [ "shell/common/atom_constants.cc" ]
|
||||
sources += [ "shell/common/electron_constants.cc" ]
|
||||
include_dirs = [ "." ]
|
||||
info_plist = "shell/renderer/resources/mac/Info.plist"
|
||||
extra_substitutions =
|
||||
|
@ -918,7 +918,7 @@ if (is_mac) {
|
|||
mac_app_bundle("electron_app") {
|
||||
output_name = electron_product_name
|
||||
sources = filenames.app_sources
|
||||
sources += [ "shell/common/atom_constants.cc" ]
|
||||
sources += [ "shell/common/electron_constants.cc" ]
|
||||
include_dirs = [ "." ]
|
||||
deps = [
|
||||
":electron_app_framework_bundle_data",
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
#include <stddef.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/bind.h"
|
||||
|
@ -826,7 +826,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout(
|
|||
return PROCESS_NONE;
|
||||
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();
|
||||
it != argv.end(); ++it) {
|
||||
to_send.push_back(kTokenDelimiter);
|
||||
|
|
354
filenames.gni
354
filenames.gni
|
@ -27,90 +27,90 @@ filenames = {
|
|||
"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.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.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.h",
|
||||
"shell/browser/api/atom_api_app.cc",
|
||||
"shell/browser/api/atom_api_app.h",
|
||||
"shell/browser/api/atom_api_app_mac.mm",
|
||||
"shell/browser/api/atom_api_auto_updater.cc",
|
||||
"shell/browser/api/atom_api_auto_updater.h",
|
||||
"shell/browser/api/atom_api_browser_view.cc",
|
||||
"shell/browser/api/atom_api_browser_view.h",
|
||||
"shell/browser/api/atom_api_browser_window.cc",
|
||||
"shell/browser/api/atom_api_browser_window.h",
|
||||
"shell/browser/api/atom_api_browser_window_mac.mm",
|
||||
"shell/browser/api/atom_api_browser_window_views.cc",
|
||||
"shell/browser/api/atom_api_content_tracing.cc",
|
||||
"shell/browser/api/atom_api_cookies.cc",
|
||||
"shell/browser/api/atom_api_cookies.h",
|
||||
"shell/browser/api/atom_api_data_pipe_holder.cc",
|
||||
"shell/browser/api/atom_api_data_pipe_holder.h",
|
||||
"shell/browser/api/atom_api_debugger.cc",
|
||||
"shell/browser/api/atom_api_debugger.h",
|
||||
"shell/browser/api/atom_api_dialog.cc",
|
||||
"shell/browser/api/atom_api_download_item.cc",
|
||||
"shell/browser/api/atom_api_download_item.h",
|
||||
"shell/browser/api/atom_api_event.cc",
|
||||
"shell/browser/api/atom_api_global_shortcut.cc",
|
||||
"shell/browser/api/atom_api_global_shortcut.h",
|
||||
"shell/browser/api/atom_api_in_app_purchase.cc",
|
||||
"shell/browser/api/atom_api_in_app_purchase.h",
|
||||
"shell/browser/api/atom_api_menu.cc",
|
||||
"shell/browser/api/atom_api_menu.h",
|
||||
"shell/browser/api/atom_api_menu_mac.h",
|
||||
"shell/browser/api/atom_api_menu_mac.mm",
|
||||
"shell/browser/api/atom_api_menu_views.cc",
|
||||
"shell/browser/api/atom_api_menu_views.h",
|
||||
"shell/browser/api/atom_api_native_theme.cc",
|
||||
"shell/browser/api/atom_api_native_theme.h",
|
||||
"shell/browser/api/atom_api_native_theme_mac.mm",
|
||||
"shell/browser/api/atom_api_net.cc",
|
||||
"shell/browser/api/atom_api_net.h",
|
||||
"shell/browser/api/atom_api_net_log.cc",
|
||||
"shell/browser/api/atom_api_net_log.h",
|
||||
"shell/browser/api/atom_api_notification.cc",
|
||||
"shell/browser/api/atom_api_notification.h",
|
||||
"shell/browser/api/atom_api_power_monitor.cc",
|
||||
"shell/browser/api/atom_api_power_monitor.h",
|
||||
"shell/browser/api/atom_api_power_monitor_mac.mm",
|
||||
"shell/browser/api/atom_api_power_monitor_win.cc",
|
||||
"shell/browser/api/atom_api_power_save_blocker.cc",
|
||||
"shell/browser/api/atom_api_power_save_blocker.h",
|
||||
"shell/browser/api/atom_api_protocol.cc",
|
||||
"shell/browser/api/atom_api_protocol.h",
|
||||
"shell/browser/api/atom_api_screen.cc",
|
||||
"shell/browser/api/atom_api_screen.h",
|
||||
"shell/browser/api/atom_api_session.cc",
|
||||
"shell/browser/api/atom_api_session.h",
|
||||
"shell/browser/api/atom_api_system_preferences.cc",
|
||||
"shell/browser/api/atom_api_system_preferences.h",
|
||||
"shell/browser/api/atom_api_system_preferences_mac.mm",
|
||||
"shell/browser/api/atom_api_system_preferences_win.cc",
|
||||
"shell/browser/api/atom_api_top_level_window.cc",
|
||||
"shell/browser/api/atom_api_top_level_window.h",
|
||||
"shell/browser/api/atom_api_tray.cc",
|
||||
"shell/browser/api/atom_api_tray.h",
|
||||
"shell/browser/api/atom_api_url_loader.cc",
|
||||
"shell/browser/api/atom_api_url_loader.h",
|
||||
"shell/browser/api/atom_api_view.cc",
|
||||
"shell/browser/api/atom_api_view.h",
|
||||
"shell/browser/api/atom_api_web_contents.cc",
|
||||
"shell/browser/api/atom_api_web_contents.h",
|
||||
"shell/browser/api/atom_api_web_contents_impl.cc",
|
||||
"shell/browser/api/atom_api_web_contents_mac.mm",
|
||||
"shell/browser/api/atom_api_web_contents_view.cc",
|
||||
"shell/browser/api/atom_api_web_contents_view.h",
|
||||
"shell/browser/api/atom_api_web_request.cc",
|
||||
"shell/browser/api/atom_api_web_request.h",
|
||||
"shell/browser/api/atom_api_web_view_manager.cc",
|
||||
"shell/browser/api/electron_api_app.cc",
|
||||
"shell/browser/api/electron_api_app.h",
|
||||
"shell/browser/api/electron_api_app_mac.mm",
|
||||
"shell/browser/api/electron_api_auto_updater.cc",
|
||||
"shell/browser/api/electron_api_auto_updater.h",
|
||||
"shell/browser/api/electron_api_browser_view.cc",
|
||||
"shell/browser/api/electron_api_browser_view.h",
|
||||
"shell/browser/api/electron_api_browser_window.cc",
|
||||
"shell/browser/api/electron_api_browser_window.h",
|
||||
"shell/browser/api/electron_api_browser_window_mac.mm",
|
||||
"shell/browser/api/electron_api_browser_window_views.cc",
|
||||
"shell/browser/api/electron_api_content_tracing.cc",
|
||||
"shell/browser/api/electron_api_cookies.cc",
|
||||
"shell/browser/api/electron_api_cookies.h",
|
||||
"shell/browser/api/electron_api_data_pipe_holder.cc",
|
||||
"shell/browser/api/electron_api_data_pipe_holder.h",
|
||||
"shell/browser/api/electron_api_debugger.cc",
|
||||
"shell/browser/api/electron_api_debugger.h",
|
||||
"shell/browser/api/electron_api_dialog.cc",
|
||||
"shell/browser/api/electron_api_download_item.cc",
|
||||
"shell/browser/api/electron_api_download_item.h",
|
||||
"shell/browser/api/electron_api_event.cc",
|
||||
"shell/browser/api/electron_api_global_shortcut.cc",
|
||||
"shell/browser/api/electron_api_global_shortcut.h",
|
||||
"shell/browser/api/electron_api_in_app_purchase.cc",
|
||||
"shell/browser/api/electron_api_in_app_purchase.h",
|
||||
"shell/browser/api/electron_api_menu.cc",
|
||||
"shell/browser/api/electron_api_menu.h",
|
||||
"shell/browser/api/electron_api_menu_mac.h",
|
||||
"shell/browser/api/electron_api_menu_mac.mm",
|
||||
"shell/browser/api/electron_api_menu_views.cc",
|
||||
"shell/browser/api/electron_api_menu_views.h",
|
||||
"shell/browser/api/electron_api_native_theme.cc",
|
||||
"shell/browser/api/electron_api_native_theme.h",
|
||||
"shell/browser/api/electron_api_native_theme_mac.mm",
|
||||
"shell/browser/api/electron_api_net.cc",
|
||||
"shell/browser/api/electron_api_net.h",
|
||||
"shell/browser/api/electron_api_net_log.cc",
|
||||
"shell/browser/api/electron_api_net_log.h",
|
||||
"shell/browser/api/electron_api_notification.cc",
|
||||
"shell/browser/api/electron_api_notification.h",
|
||||
"shell/browser/api/electron_api_power_monitor.cc",
|
||||
"shell/browser/api/electron_api_power_monitor.h",
|
||||
"shell/browser/api/electron_api_power_monitor_mac.mm",
|
||||
"shell/browser/api/electron_api_power_monitor_win.cc",
|
||||
"shell/browser/api/electron_api_power_save_blocker.cc",
|
||||
"shell/browser/api/electron_api_power_save_blocker.h",
|
||||
"shell/browser/api/electron_api_protocol.cc",
|
||||
"shell/browser/api/electron_api_protocol.h",
|
||||
"shell/browser/api/electron_api_screen.cc",
|
||||
"shell/browser/api/electron_api_screen.h",
|
||||
"shell/browser/api/electron_api_session.cc",
|
||||
"shell/browser/api/electron_api_session.h",
|
||||
"shell/browser/api/electron_api_system_preferences.cc",
|
||||
"shell/browser/api/electron_api_system_preferences.h",
|
||||
"shell/browser/api/electron_api_system_preferences_mac.mm",
|
||||
"shell/browser/api/electron_api_system_preferences_win.cc",
|
||||
"shell/browser/api/electron_api_top_level_window.cc",
|
||||
"shell/browser/api/electron_api_top_level_window.h",
|
||||
"shell/browser/api/electron_api_tray.cc",
|
||||
"shell/browser/api/electron_api_tray.h",
|
||||
"shell/browser/api/electron_api_url_loader.cc",
|
||||
"shell/browser/api/electron_api_url_loader.h",
|
||||
"shell/browser/api/electron_api_view.cc",
|
||||
"shell/browser/api/electron_api_view.h",
|
||||
"shell/browser/api/electron_api_web_contents.cc",
|
||||
"shell/browser/api/electron_api_web_contents.h",
|
||||
"shell/browser/api/electron_api_web_contents_impl.cc",
|
||||
"shell/browser/api/electron_api_web_contents_mac.mm",
|
||||
"shell/browser/api/electron_api_web_contents_view.cc",
|
||||
"shell/browser/api/electron_api_web_contents_view.h",
|
||||
"shell/browser/api/electron_api_web_request.cc",
|
||||
"shell/browser/api/electron_api_web_request.h",
|
||||
"shell/browser/api/electron_api_web_view_manager.cc",
|
||||
"shell/browser/api/event.cc",
|
||||
"shell/browser/api/event.h",
|
||||
"shell/browser/api/frame_subscriber.cc",
|
||||
|
@ -123,35 +123,6 @@ filenames = {
|
|||
"shell/browser/api/process_metric.h",
|
||||
"shell/browser/api/save_page_handler.cc",
|
||||
"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.h",
|
||||
"shell/browser/auto_updater_mac.mm",
|
||||
|
@ -171,6 +142,35 @@ filenames = {
|
|||
"shell/browser/common_web_contents_delegate_views.cc",
|
||||
"shell/browser/cookie_change_notifier.cc",
|
||||
"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.h",
|
||||
"shell/browser/font_defaults.cc",
|
||||
|
@ -186,12 +186,12 @@ filenames = {
|
|||
"shell/browser/linux/unity_service.h",
|
||||
"shell/browser/login_handler.cc",
|
||||
"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.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.mm",
|
||||
"shell/browser/mac/in_app_purchase_observer.h",
|
||||
|
@ -222,10 +222,10 @@ filenames = {
|
|||
"shell/browser/native_window_views_win.cc",
|
||||
"shell/browser/net/asar/asar_url_loader.cc",
|
||||
"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.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.h",
|
||||
"shell/browser/net/network_context_service_factory.cc",
|
||||
|
@ -289,8 +289,6 @@ filenames = {
|
|||
"shell/browser/special_storage_policy.h",
|
||||
"shell/browser/ui/accelerator_util.cc",
|
||||
"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.h",
|
||||
"shell/browser/ui/certificate_trust.h",
|
||||
|
@ -300,24 +298,24 @@ filenames = {
|
|||
"shell/browser/ui/cocoa/NSColor+Hex.mm",
|
||||
"shell/browser/ui/cocoa/NSString+ANSI.h",
|
||||
"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.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.mm",
|
||||
"shell/browser/ui/cocoa/root_view_mac.h",
|
||||
|
@ -331,6 +329,8 @@ filenames = {
|
|||
"shell/browser/ui/drag_util.h",
|
||||
"shell/browser/ui/drag_util_mac.mm",
|
||||
"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_gtk.cc",
|
||||
"shell/browser/ui/file_dialog_mac.mm",
|
||||
|
@ -357,11 +357,11 @@ filenames = {
|
|||
"shell/browser/ui/tray_icon_gtk.h",
|
||||
"shell/browser/ui/tray_icon_observer.h",
|
||||
"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.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.h",
|
||||
"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/win_frame_view.cc",
|
||||
"shell/browser/ui/views/win_frame_view.h",
|
||||
"shell/browser/ui/win/atom_desktop_native_widget_aura.cc",
|
||||
"shell/browser/ui/win/atom_desktop_native_widget_aura.h",
|
||||
"shell/browser/ui/win/atom_desktop_window_tree_host_win.cc",
|
||||
"shell/browser/ui/win/atom_desktop_window_tree_host_win.h",
|
||||
"shell/browser/ui/win/electron_desktop_native_widget_aura.cc",
|
||||
"shell/browser/ui/win/electron_desktop_native_widget_aura.h",
|
||||
"shell/browser/ui/win/electron_desktop_window_tree_host_win.cc",
|
||||
"shell/browser/ui/win/electron_desktop_window_tree_host_win.h",
|
||||
"shell/browser/ui/win/jump_list.cc",
|
||||
"shell/browser/ui/win/jump_list.h",
|
||||
"shell/browser/ui/win/notify_icon.cc",
|
||||
|
@ -421,18 +421,18 @@ filenames = {
|
|||
"shell/browser/window_list_observer.h",
|
||||
"shell/browser/zoom_level_delegate.cc",
|
||||
"shell/browser/zoom_level_delegate.h",
|
||||
"shell/common/api/atom_api_asar.cc",
|
||||
"shell/common/api/atom_api_clipboard.cc",
|
||||
"shell/common/api/atom_api_clipboard.h",
|
||||
"shell/common/api/atom_api_clipboard_mac.mm",
|
||||
"shell/common/api/atom_api_command_line.cc",
|
||||
"shell/common/api/atom_api_crash_reporter.cc",
|
||||
"shell/common/api/atom_api_key_weak_map.h",
|
||||
"shell/common/api/atom_api_native_image.cc",
|
||||
"shell/common/api/atom_api_native_image.h",
|
||||
"shell/common/api/atom_api_native_image_mac.mm",
|
||||
"shell/common/api/atom_api_shell.cc",
|
||||
"shell/common/api/atom_api_v8_util.cc",
|
||||
"shell/common/api/electron_api_asar.cc",
|
||||
"shell/common/api/electron_api_clipboard.cc",
|
||||
"shell/common/api/electron_api_clipboard.h",
|
||||
"shell/common/api/electron_api_clipboard_mac.mm",
|
||||
"shell/common/api/electron_api_command_line.cc",
|
||||
"shell/common/api/electron_api_crash_reporter.cc",
|
||||
"shell/common/api/electron_api_key_weak_map.h",
|
||||
"shell/common/api/electron_api_native_image.cc",
|
||||
"shell/common/api/electron_api_native_image.h",
|
||||
"shell/common/api/electron_api_native_image_mac.mm",
|
||||
"shell/common/api/electron_api_shell.cc",
|
||||
"shell/common/api/electron_api_v8_util.cc",
|
||||
"shell/common/api/electron_bindings.cc",
|
||||
"shell/common/api/electron_bindings.h",
|
||||
"shell/common/api/features.cc",
|
||||
|
@ -447,10 +447,6 @@ filenames = {
|
|||
"shell/common/asar/asar_util.h",
|
||||
"shell/common/asar/scoped_temporary_file.cc",
|
||||
"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.h",
|
||||
"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/win/crash_service_main.cc",
|
||||
"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.h",
|
||||
"shell/common/gin_converters/blink_converter.cc",
|
||||
|
@ -551,38 +551,38 @@ filenames = {
|
|||
"shell/common/skia_util.h",
|
||||
"shell/common/v8_value_converter.cc",
|
||||
"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.h",
|
||||
"shell/renderer/atom_autofill_agent.cc",
|
||||
"shell/renderer/atom_autofill_agent.h",
|
||||
"shell/renderer/atom_render_frame_observer.cc",
|
||||
"shell/renderer/atom_render_frame_observer.h",
|
||||
"shell/renderer/atom_renderer_client.cc",
|
||||
"shell/renderer/atom_renderer_client.h",
|
||||
"shell/renderer/atom_sandboxed_renderer_client.cc",
|
||||
"shell/renderer/atom_sandboxed_renderer_client.h",
|
||||
"shell/renderer/api/electron_api_context_bridge.cc",
|
||||
"shell/renderer/api/electron_api_context_bridge.h",
|
||||
"shell/renderer/api/electron_api_renderer_ipc.cc",
|
||||
"shell/renderer/api/electron_api_spell_check_client.cc",
|
||||
"shell/renderer/api/electron_api_spell_check_client.h",
|
||||
"shell/renderer/api/electron_api_web_frame.cc",
|
||||
"shell/renderer/browser_exposed_renderer_interfaces.cc",
|
||||
"shell/renderer/browser_exposed_renderer_interfaces.h",
|
||||
"shell/renderer/content_settings_observer.cc",
|
||||
"shell/renderer/content_settings_observer.h",
|
||||
"shell/renderer/electron_api_service_impl.cc",
|
||||
"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.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.h",
|
||||
"shell/renderer/renderer_client_base.cc",
|
||||
"shell/renderer/renderer_client_base.h",
|
||||
"shell/renderer/web_worker_observer.cc",
|
||||
"shell/renderer/web_worker_observer.h",
|
||||
"shell/utility/atom_content_utility_client.cc",
|
||||
"shell/utility/atom_content_utility_client.h",
|
||||
"shell/utility/electron_content_utility_client.cc",
|
||||
"shell/utility/electron_content_utility_client.h",
|
||||
]
|
||||
|
||||
lib_sources_nss = [
|
||||
|
@ -632,14 +632,14 @@ filenames = {
|
|||
]
|
||||
|
||||
app_sources = [
|
||||
"shell/app/atom_main.cc",
|
||||
"shell/app/atom_main.h",
|
||||
"shell/app/electron_main.cc",
|
||||
"shell/app/electron_main.h",
|
||||
]
|
||||
|
||||
framework_sources = [
|
||||
"shell/app/atom_library_main.h",
|
||||
"shell/app/atom_library_main.mm",
|
||||
"shell/app/electron_library_main.h",
|
||||
"shell/app/electron_library_main.mm",
|
||||
]
|
||||
|
||||
login_helper_sources = [ "shell/app/atom_login_helper.mm" ]
|
||||
login_helper_sources = [ "shell/app/electron_login_helper.mm" ]
|
||||
}
|
||||
|
|
|
@ -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
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b9771984944f087
|
||||
index 0000000000000000000000000000000000000000..ec06e14dd327cdf89dc6fd584b6972ae64311ea0
|
||||
--- /dev/null
|
||||
+++ b/BUILD.gn
|
||||
@@ -0,0 +1,370 @@
|
||||
|
@ -228,7 +228,7 @@ index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b977198
|
|||
+ ]
|
||||
+ public_deps = [
|
||||
+ "deps/uv",
|
||||
+ "//electron:atom_js2c",
|
||||
+ "//electron:electron_js2c",
|
||||
+ "//v8",
|
||||
+ ]
|
||||
+ configs += [ ":node_internal_config" ]
|
||||
|
@ -253,7 +253,7 @@ index 0000000000000000000000000000000000000000..5bc9ff072414a4c3bae896a08b977198
|
|||
+
|
||||
+ sources = node_files.node_sources
|
||||
+ sources += [
|
||||
+ "$root_gen_dir/atom_natives.cc",
|
||||
+ "$root_gen_dir/electron_natives.cc",
|
||||
+ "$target_gen_dir/node_javascript.cc",
|
||||
+ "src/node_code_cache_stub.cc",
|
||||
+ "src/node_snapshot_stub.cc",
|
||||
|
|
|
@ -53,10 +53,14 @@ function cpplint (args) {
|
|||
}
|
||||
}
|
||||
|
||||
function isObjCHeader (filename) {
|
||||
return /\/(mac|cocoa)\//.test(filename)
|
||||
}
|
||||
|
||||
const LINTERS = [ {
|
||||
key: 'c++',
|
||||
roots: ['shell'],
|
||||
test: filename => filename.endsWith('.cc') || filename.endsWith('.h'),
|
||||
test: filename => filename.endsWith('.cc') || (filename.endsWith('.h') && !isObjCHeader(filename)),
|
||||
run: (opts, filenames) => {
|
||||
if (opts.fix) {
|
||||
spawnAndCheckExitCode('python', ['script/run-clang-format.py', '--fix', ...filenames])
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/app/atom_content_client.h"
|
||||
#include "shell/app/electron_content_client.h"
|
||||
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
@ -18,7 +18,7 @@
|
|||
#include "electron/buildflags/buildflags.h"
|
||||
#include "extensions/common/constants.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 "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
|
@ -33,10 +33,10 @@
|
|||
#endif // defined(WIDEVINE_CDM_AVAILABLE)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
#include "pdf/pdf.h" // nogncheck
|
||||
#include "pdf/pdf_ppapi.h" // nogncheck
|
||||
#include "shell/common/atom_constants.h" // nogncheck
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
#include "pdf/pdf.h" // nogncheck
|
||||
#include "pdf/pdf_ppapi.h" // nogncheck
|
||||
#include "shell/common/electron_constants.h" // nogncheck
|
||||
#endif // BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLUGINS)
|
||||
#include "content/public/common/pepper_plugin_info.h"
|
||||
|
@ -187,33 +187,33 @@ void AppendDelimitedSwitchToVector(const base::StringPiece cmd_switch,
|
|||
|
||||
} // 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);
|
||||
}
|
||||
|
||||
base::StringPiece AtomContentClient::GetDataResource(
|
||||
base::StringPiece ElectronContentClient::GetDataResource(
|
||||
int resource_id,
|
||||
ui::ScaleFactor scale_factor) {
|
||||
return ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
|
||||
resource_id, scale_factor);
|
||||
}
|
||||
|
||||
gfx::Image& AtomContentClient::GetNativeImageNamed(int resource_id) {
|
||||
gfx::Image& ElectronContentClient::GetNativeImageNamed(int resource_id) {
|
||||
return ui::ResourceBundle::GetSharedInstance().GetNativeImageNamed(
|
||||
resource_id);
|
||||
}
|
||||
|
||||
base::RefCountedMemory* AtomContentClient::GetDataResourceBytes(
|
||||
base::RefCountedMemory* ElectronContentClient::GetDataResourceBytes(
|
||||
int resource_id) {
|
||||
return ui::ResourceBundle::GetSharedInstance().LoadDataResourceBytes(
|
||||
resource_id);
|
||||
}
|
||||
|
||||
void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
void ElectronContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
||||
AppendDelimitedSwitchToVector(switches::kServiceWorkerSchemes,
|
||||
&schemes->service_worker_schemes);
|
||||
AppendDelimitedSwitchToVector(switches::kStandardSchemes,
|
||||
|
@ -229,7 +229,7 @@ void AtomContentClient::AddAdditionalSchemes(Schemes* schemes) {
|
|||
schemes->standard_schemes.emplace_back(extensions::kExtensionScheme);
|
||||
}
|
||||
|
||||
void AtomContentClient::AddPepperPlugins(
|
||||
void ElectronContentClient::AddPepperPlugins(
|
||||
std::vector<content::PepperPluginInfo>* plugins) {
|
||||
#if BUILDFLAG(ENABLE_PEPPER_FLASH)
|
||||
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
@ -240,7 +240,7 @@ void AtomContentClient::AddPepperPlugins(
|
|||
#endif // BUILDFLAG(ENABLE_PLUGINS)
|
||||
}
|
||||
|
||||
void AtomContentClient::AddContentDecryptionModules(
|
||||
void ElectronContentClient::AddContentDecryptionModules(
|
||||
std::vector<content::CdmInfo>* cdms,
|
||||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) {
|
||||
if (cdms) {
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_APP_ATOM_CONTENT_CLIENT_H_
|
||||
#define SHELL_APP_ATOM_CONTENT_CLIENT_H_
|
||||
#ifndef SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|
||||
#define SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
|
@ -14,10 +14,10 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomContentClient : public content::ContentClient {
|
||||
class ElectronContentClient : public content::ContentClient {
|
||||
public:
|
||||
AtomContentClient();
|
||||
~AtomContentClient() override;
|
||||
ElectronContentClient();
|
||||
~ElectronContentClient() override;
|
||||
|
||||
protected:
|
||||
// content::ContentClient:
|
||||
|
@ -33,9 +33,9 @@ class AtomContentClient : public content::ContentClient {
|
|||
std::vector<media::CdmHostFilePath>* cdm_host_file_paths) override;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomContentClient);
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronContentClient);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_CONTENT_CLIENT_H_
|
||||
#endif // SHELL_APP_ELECTRON_CONTENT_CLIENT_H_
|
|
@ -2,22 +2,22 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_APP_ATOM_LIBRARY_MAIN_H_
|
||||
#define SHELL_APP_ATOM_LIBRARY_MAIN_H_
|
||||
#ifndef SHELL_APP_ELECTRON_LIBRARY_MAIN_H_
|
||||
#define SHELL_APP_ELECTRON_LIBRARY_MAIN_H_
|
||||
|
||||
#include "build/build_config.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
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)
|
||||
__attribute__((visibility("default"))) int AtomInitializeICUandStartNode(
|
||||
__attribute__((visibility("default"))) int ElectronInitializeICUandStartNode(
|
||||
int argc,
|
||||
char* argv[]);
|
||||
#endif
|
||||
}
|
||||
#endif // OS_MACOSX
|
||||
|
||||
#endif // SHELL_APP_ATOM_LIBRARY_MAIN_H_
|
||||
#endif // SHELL_APP_ELECTRON_LIBRARY_MAIN_H_
|
|
@ -2,29 +2,29 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/i18n/icu_util.h"
|
||||
#include "base/mac/bundle_locations.h"
|
||||
#include "base/mac/scoped_nsautorelease_pool.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/common/atom_command_line.h"
|
||||
#include "shell/common/electron_command_line.h"
|
||||
#include "shell/common/mac/main_application_bundle.h"
|
||||
|
||||
int AtomMain(int argc, char* argv[]) {
|
||||
electron::AtomMainDelegate delegate;
|
||||
int ElectronMain(int argc, char* argv[]) {
|
||||
electron::ElectronMainDelegate delegate;
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.argc = argc;
|
||||
params.argv = const_cast<const char**>(argv);
|
||||
electron::AtomCommandLine::Init(argc, argv);
|
||||
electron::ElectronCommandLine::Init(argc, argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||
int AtomInitializeICUandStartNode(int argc, char* argv[]) {
|
||||
int ElectronInitializeICUandStartNode(int argc, char* argv[]) {
|
||||
base::AtExitManager atexit_manager;
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
base::mac::SetOverrideFrameworkBundlePath(
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/app/atom_main.h"
|
||||
#include "shell/app/electron_main.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdlib>
|
||||
|
@ -23,27 +23,27 @@
|
|||
#include "base/win/windows_version.h"
|
||||
#include "content/public/app/sandbox_helper_win.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/electron_main_delegate.h"
|
||||
#include "shell/common/crash_reporter/win/crash_service_main.h"
|
||||
#elif defined(OS_LINUX) // defined(OS_WIN)
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include "content/public/app/content_main.h"
|
||||
#include "shell/app/atom_main_delegate.h" // NOLINT
|
||||
#else // defined(OS_LINUX)
|
||||
#include "shell/app/electron_main_delegate.h" // NOLINT
|
||||
#else // defined(OS_LINUX)
|
||||
#include <mach-o/dyld.h>
|
||||
#include <unistd.h>
|
||||
#include <cstdio>
|
||||
#include "shell/app/atom_library_main.h"
|
||||
#include "shell/app/electron_library_main.h"
|
||||
#endif // defined(OS_MACOSX)
|
||||
|
||||
#include "base/at_exit.h"
|
||||
#include "base/i18n/icu_util.h"
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "shell/app/node_main.h"
|
||||
#include "shell/common/atom_command_line.h"
|
||||
#include "shell/common/atom_constants.h"
|
||||
#include "shell/common/electron_command_line.h"
|
||||
#include "shell/common/electron_constants.h"
|
||||
|
||||
#if defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
|
||||
#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};
|
||||
content::InitializeSandboxInfo(&sandbox_info);
|
||||
electron::AtomMainDelegate delegate;
|
||||
electron::ElectronMainDelegate delegate;
|
||||
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.instance = instance;
|
||||
params.sandbox_info = &sandbox_info;
|
||||
electron::AtomCommandLine::Init(arguments.argc, arguments.argv);
|
||||
electron::ElectronCommandLine::Init(arguments.argc, arguments.argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
|
@ -171,11 +171,11 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
#endif
|
||||
|
||||
electron::AtomMainDelegate delegate;
|
||||
electron::ElectronMainDelegate delegate;
|
||||
content::ContentMainParams params(&delegate);
|
||||
params.argc = argc;
|
||||
params.argv = const_cast<const char**>(argv);
|
||||
electron::AtomCommandLine::Init(argc, argv);
|
||||
electron::ElectronCommandLine::Init(argc, argv);
|
||||
return content::ContentMain(params);
|
||||
}
|
||||
|
||||
|
@ -186,7 +186,7 @@ int main(int argc, char* argv[]) {
|
|||
|
||||
#if BUILDFLAG(ENABLE_RUN_AS_NODE)
|
||||
if (IsEnvSet(electron::kRunAsNode)) {
|
||||
return AtomInitializeICUandStartNode(argc, argv);
|
||||
return ElectronInitializeICUandStartNode(argc, argv);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -219,7 +219,7 @@ int main(int argc, char* argv[]) {
|
|||
}
|
||||
#endif // defined(HELPER_EXECUTABLE) && !defined(MAS_BUILD)
|
||||
|
||||
return AtomMain(argc, argv);
|
||||
return ElectronMain(argc, argv);
|
||||
}
|
||||
|
||||
#endif // defined(OS_MACOSX)
|
|
@ -2,9 +2,9 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_APP_ATOM_MAIN_H_
|
||||
#define SHELL_APP_ATOM_MAIN_H_
|
||||
#ifndef SHELL_APP_ELECTRON_MAIN_H_
|
||||
#define SHELL_APP_ELECTRON_MAIN_H_
|
||||
|
||||
#include "content/public/app/content_main.h"
|
||||
|
||||
#endif // SHELL_APP_ATOM_MAIN_H_
|
||||
#endif // SHELL_APP_ELECTRON_MAIN_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/app/atom_main_delegate.h"
|
||||
#include "shell/app/electron_main_delegate.h"
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
@ -27,21 +27,21 @@
|
|||
#include "services/service_manager/embedder/switches.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
#include "services/tracing/public/cpp/stack_sampling/tracing_sampler_profiler.h"
|
||||
#include "shell/app/atom_content_client.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/atom_gpu_client.h"
|
||||
#include "shell/app/electron_content_client.h"
|
||||
#include "shell/browser/electron_browser_client.h"
|
||||
#include "shell/browser/electron_gpu_client.h"
|
||||
#include "shell/browser/feature_list.h"
|
||||
#include "shell/browser/relauncher.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/renderer/atom_renderer_client.h"
|
||||
#include "shell/renderer/atom_sandboxed_renderer_client.h"
|
||||
#include "shell/utility/atom_content_utility_client.h"
|
||||
#include "shell/renderer/electron_renderer_client.h"
|
||||
#include "shell/renderer/electron_sandboxed_renderer_client.h"
|
||||
#include "shell/utility/electron_content_utility_client.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/resource/resource_bundle.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
#include "shell/app/atom_main_delegate_mac.h"
|
||||
#include "shell/app/electron_main_delegate_mac.h"
|
||||
#endif
|
||||
|
||||
#if defined(OS_WIN)
|
||||
|
@ -129,16 +129,16 @@ void LoadResourceBundle(const std::string& locale) {
|
|||
#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};
|
||||
const size_t AtomMainDelegate::kNonWildcardDomainNonPortSchemesSize =
|
||||
const size_t ElectronMainDelegate::kNonWildcardDomainNonPortSchemesSize =
|
||||
base::size(kNonWildcardDomainNonPortSchemes);
|
||||
|
||||
bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
bool ElectronMainDelegate::BasicStartupComplete(int* exit_code) {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
logging::LoggingSettings settings;
|
||||
|
@ -224,13 +224,13 @@ bool AtomMainDelegate::BasicStartupComplete(int* exit_code) {
|
|||
<< " is not supported. See https://crbug.com/638180.";
|
||||
#endif
|
||||
|
||||
content_client_ = std::make_unique<AtomContentClient>();
|
||||
content_client_ = std::make_unique<ElectronContentClient>();
|
||||
SetContentClient(content_client_.get());
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) {
|
||||
void ElectronMainDelegate::PostEarlyInitialization(bool is_running_tests) {
|
||||
std::string custom_locale;
|
||||
ui::ResourceBundle::InitSharedInstanceWithLocale(
|
||||
custom_locale, nullptr, ui::ResourceBundle::LOAD_COMMON_RESOURCES);
|
||||
|
@ -256,11 +256,11 @@ void AtomMainDelegate::PostEarlyInitialization(bool is_running_tests) {
|
|||
|
||||
LoadResourceBundle(custom_locale);
|
||||
|
||||
AtomBrowserClient::SetApplicationLocale(
|
||||
ElectronBrowserClient::SetApplicationLocale(
|
||||
l10n_util::GetApplicationLocale(custom_locale));
|
||||
}
|
||||
|
||||
void AtomMainDelegate::PreSandboxStartup() {
|
||||
void ElectronMainDelegate::PreSandboxStartup() {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
std::string process_type =
|
||||
|
@ -287,7 +287,7 @@ void AtomMainDelegate::PreSandboxStartup() {
|
|||
#endif
|
||||
}
|
||||
|
||||
void AtomMainDelegate::PreCreateMainMessageLoop() {
|
||||
void ElectronMainDelegate::PreCreateMainMessageLoop() {
|
||||
// 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
|
||||
// service manager reads the features.
|
||||
|
@ -297,35 +297,37 @@ void AtomMainDelegate::PreCreateMainMessageLoop() {
|
|||
#endif
|
||||
}
|
||||
|
||||
content::ContentBrowserClient* AtomMainDelegate::CreateContentBrowserClient() {
|
||||
browser_client_ = std::make_unique<AtomBrowserClient>();
|
||||
content::ContentBrowserClient*
|
||||
ElectronMainDelegate::CreateContentBrowserClient() {
|
||||
browser_client_ = std::make_unique<ElectronBrowserClient>();
|
||||
return browser_client_.get();
|
||||
}
|
||||
|
||||
content::ContentGpuClient* AtomMainDelegate::CreateContentGpuClient() {
|
||||
gpu_client_ = std::make_unique<AtomGpuClient>();
|
||||
content::ContentGpuClient* ElectronMainDelegate::CreateContentGpuClient() {
|
||||
gpu_client_ = std::make_unique<ElectronGpuClient>();
|
||||
return gpu_client_.get();
|
||||
}
|
||||
|
||||
content::ContentRendererClient*
|
||||
AtomMainDelegate::CreateContentRendererClient() {
|
||||
ElectronMainDelegate::CreateContentRendererClient() {
|
||||
auto* command_line = base::CommandLine::ForCurrentProcess();
|
||||
|
||||
if (IsSandboxEnabled(command_line)) {
|
||||
renderer_client_ = std::make_unique<AtomSandboxedRendererClient>();
|
||||
renderer_client_ = std::make_unique<ElectronSandboxedRendererClient>();
|
||||
} else {
|
||||
renderer_client_ = std::make_unique<AtomRendererClient>();
|
||||
renderer_client_ = std::make_unique<ElectronRendererClient>();
|
||||
}
|
||||
|
||||
return renderer_client_.get();
|
||||
}
|
||||
|
||||
content::ContentUtilityClient* AtomMainDelegate::CreateContentUtilityClient() {
|
||||
utility_client_ = std::make_unique<AtomContentUtilityClient>();
|
||||
content::ContentUtilityClient*
|
||||
ElectronMainDelegate::CreateContentUtilityClient() {
|
||||
utility_client_ = std::make_unique<ElectronContentUtilityClient>();
|
||||
return utility_client_.get();
|
||||
}
|
||||
|
||||
int AtomMainDelegate::RunProcess(
|
||||
int ElectronMainDelegate::RunProcess(
|
||||
const std::string& process_type,
|
||||
const content::MainFunctionParams& main_function_params) {
|
||||
if (process_type == kRelauncherProcess)
|
||||
|
@ -335,13 +337,13 @@ int AtomMainDelegate::RunProcess(
|
|||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool AtomMainDelegate::DelaySandboxInitialization(
|
||||
bool ElectronMainDelegate::DelaySandboxInitialization(
|
||||
const std::string& process_type) {
|
||||
return process_type == kRelauncherProcess;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool AtomMainDelegate::ShouldCreateFeatureList() {
|
||||
bool ElectronMainDelegate::ShouldCreateFeatureList() {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_H_
|
||||
#define SHELL_APP_ATOM_MAIN_DELEGATE_H_
|
||||
#ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|
||||
#define SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -19,12 +19,12 @@ namespace electron {
|
|||
|
||||
void LoadResourceBundle(const std::string& locale);
|
||||
|
||||
class AtomMainDelegate : public content::ContentMainDelegate {
|
||||
class ElectronMainDelegate : public content::ContentMainDelegate {
|
||||
public:
|
||||
static const char* const kNonWildcardDomainNonPortSchemes[];
|
||||
static const size_t kNonWildcardDomainNonPortSchemesSize;
|
||||
AtomMainDelegate();
|
||||
~AtomMainDelegate() override;
|
||||
ElectronMainDelegate();
|
||||
~ElectronMainDelegate() override;
|
||||
|
||||
protected:
|
||||
// content::ContentMainDelegate:
|
||||
|
@ -58,9 +58,9 @@ class AtomMainDelegate : public content::ContentMainDelegate {
|
|||
std::unique_ptr<content::ContentUtilityClient> utility_client_;
|
||||
std::unique_ptr<tracing::TracingSamplerProfiler> tracing_sampler_profiler_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate);
|
||||
DISALLOW_COPY_AND_ASSIGN(ElectronMainDelegate);
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_H_
|
||||
#endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_H_
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
#define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
#ifndef SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_
|
||||
#define SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
@ -12,4 +12,4 @@ void RegisterAtomCrApp();
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_
|
||||
#endif // SHELL_APP_ELECTRON_MAIN_DELEGATE_MAC_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/app/atom_main_delegate.h"
|
||||
#include "shell/app/electron_main_delegate.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
|||
#include "base/strings/sys_string_conversions.h"
|
||||
#include "content/common/mac_helpers.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/mac/main_application_bundle.h"
|
||||
|
||||
|
@ -53,12 +53,12 @@ base::FilePath GetHelperAppPath(const base::FilePath& frameworks_path,
|
|||
|
||||
} // namespace
|
||||
|
||||
void AtomMainDelegate::OverrideFrameworkBundlePath() {
|
||||
void ElectronMainDelegate::OverrideFrameworkBundlePath() {
|
||||
base::mac::SetOverrideFrameworkBundlePath(
|
||||
GetFrameworksPath().Append(ELECTRON_PRODUCT_NAME " Framework.framework"));
|
||||
}
|
||||
|
||||
void AtomMainDelegate::OverrideChildProcessPath() {
|
||||
void ElectronMainDelegate::OverrideChildProcessPath() {
|
||||
base::FilePath frameworks_path = GetFrameworksPath();
|
||||
base::FilePath helper_path =
|
||||
GetHelperAppPath(frameworks_path, ELECTRON_PRODUCT_NAME);
|
||||
|
@ -69,7 +69,7 @@ void AtomMainDelegate::OverrideChildProcessPath() {
|
|||
base::PathService::Override(content::CHILD_PROCESS_EXE, helper_path);
|
||||
}
|
||||
|
||||
void AtomMainDelegate::SetUpBundleOverrides() {
|
||||
void ElectronMainDelegate::SetUpBundleOverrides() {
|
||||
base::mac::ScopedNSAutoreleasePool pool;
|
||||
NSBundle* bundle = MainApplicationBundle();
|
||||
std::string base_bundle_id =
|
||||
|
@ -82,7 +82,7 @@ void AtomMainDelegate::SetUpBundleOverrides() {
|
|||
|
||||
void RegisterAtomCrApp() {
|
||||
// Force the NSApplication subclass to be used.
|
||||
[AtomApplication sharedApplication];
|
||||
[ElectronApplication sharedApplication];
|
||||
}
|
||||
|
||||
} // namespace electron
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
|
@ -33,17 +33,17 @@
|
|||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "net/ssl/ssl_cert_request_info.h"
|
||||
#include "services/service_manager/sandbox/switches.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/api/gpuinfo_manager.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/atom_browser_main_parts.h"
|
||||
#include "shell/browser/atom_paths.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/browser/electron_browser_main_parts.h"
|
||||
#include "shell/browser/electron_paths.h"
|
||||
#include "shell/browser/login_handler.h"
|
||||
#include "shell/browser/relauncher.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/file_path_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
|
@ -63,7 +63,7 @@
|
|||
|
||||
#if defined(OS_MACOSX)
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
#include "shell/browser/ui/cocoa/atom_bundle_mover.h"
|
||||
#include "shell/browser/ui/cocoa/electron_bundle_mover.h"
|
||||
#endif
|
||||
|
||||
using electron::Browser;
|
||||
|
@ -536,7 +536,8 @@ void OnIconDataAvailable(gin_helper::Promise<gfx::Image> promise,
|
|||
} // namespace
|
||||
|
||||
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);
|
||||
content::GpuDataManager::GetInstance()->AddObserver(this);
|
||||
|
||||
|
@ -549,7 +550,7 @@ App::App(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
App::~App() {
|
||||
static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->set_delegate(nullptr);
|
||||
Browser::Get()->RemoveObserver(this);
|
||||
content::GpuDataManager::GetInstance()->RemoveObserver(this);
|
||||
|
@ -573,7 +574,7 @@ void App::OnWindowAllClosed() {
|
|||
}
|
||||
|
||||
void App::OnQuit() {
|
||||
int exitCode = AtomBrowserMainParts::Get()->GetExitCode();
|
||||
int exitCode = ElectronBrowserMainParts::Get()->GetExitCode();
|
||||
Emit("quit", exitCode);
|
||||
|
||||
if (process_singleton_) {
|
||||
|
@ -786,7 +787,7 @@ void App::RenderProcessReady(content::RenderProcessHost* host) {
|
|||
// `WebContents` instances, but this was implicitly happening before in
|
||||
// `RenderProcessPreferences`, so this is at least more explicit...
|
||||
content::WebContents* web_contents =
|
||||
AtomBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
|
||||
ElectronBrowserClient::Get()->GetWebContentsFromProcessID(host->GetID());
|
||||
if (web_contents)
|
||||
WebContents::FromOrCreate(v8::Isolate::GetCurrent(), web_contents);
|
||||
}
|
||||
|
@ -991,7 +992,8 @@ bool App::Relaunch(gin_helper::Arguments* js_args) {
|
|||
}
|
||||
|
||||
if (!override_argv) {
|
||||
const relauncher::StringVector& argv = electron::AtomCommandLine::argv();
|
||||
const relauncher::StringVector& argv =
|
||||
electron::ElectronCommandLine::argv();
|
||||
return relauncher::RelaunchApp(argv);
|
||||
}
|
||||
|
||||
|
@ -1065,7 +1067,7 @@ Browser::LoginItemSettings App::GetLoginItemSettings(
|
|||
#if defined(USE_NSS_CERTS)
|
||||
void App::ImportCertificate(const base::DictionaryValue& options,
|
||||
net::CompletionRepeatingCallback callback) {
|
||||
auto browser_context = AtomBrowserContext::From("", false);
|
||||
auto browser_context = ElectronBrowserContext::From("", false);
|
||||
if (!certificate_manager_model_) {
|
||||
auto copy = base::DictionaryValue::From(
|
||||
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);
|
||||
}
|
||||
|
||||
auto* icon_manager = AtomBrowserMainParts::Get()->GetIconManager();
|
||||
auto* icon_manager = ElectronBrowserMainParts::Get()->GetIconManager();
|
||||
gfx::Image* icon =
|
||||
icon_manager->LookupIconFromFilepath(normalized_path, icon_size);
|
||||
if (icon) {
|
||||
|
@ -1314,28 +1316,28 @@ void App::EnableSandbox(gin_helper::ErrorThrower thrower) {
|
|||
}
|
||||
|
||||
void App::SetUserAgentFallback(const std::string& user_agent) {
|
||||
AtomBrowserClient::Get()->SetUserAgent(user_agent);
|
||||
ElectronBrowserClient::Get()->SetUserAgent(user_agent);
|
||||
}
|
||||
|
||||
std::string App::GetUserAgentFallback() {
|
||||
return AtomBrowserClient::Get()->GetUserAgent();
|
||||
return ElectronBrowserClient::Get()->GetUserAgent();
|
||||
}
|
||||
|
||||
void App::SetBrowserClientCanUseCustomSiteInstance(bool should_disable) {
|
||||
AtomBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable);
|
||||
ElectronBrowserClient::Get()->SetCanUseCustomSiteInstance(should_disable);
|
||||
}
|
||||
bool App::CanBrowserClientUseCustomSiteInstance() {
|
||||
return AtomBrowserClient::Get()->CanUseCustomSiteInstance();
|
||||
return ElectronBrowserClient::Get()->CanUseCustomSiteInstance();
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
bool App::MoveToApplicationsFolder(gin_helper::ErrorThrower thrower,
|
||||
gin::Arguments* args) {
|
||||
return AtomBundleMover::Move(thrower, args);
|
||||
return ElectronBundleMover::Move(thrower, args);
|
||||
}
|
||||
|
||||
bool App::IsInApplicationsFolder() {
|
||||
return AtomBundleMover::IsCurrentAppInApplicationsFolder();
|
||||
return ElectronBundleMover::IsCurrentAppInApplicationsFolder();
|
||||
}
|
||||
|
||||
int DockBounce(gin_helper::Arguments* args) {
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_APP_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_APP_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -22,9 +22,9 @@
|
|||
#include "net/base/completion_repeating_callback.h"
|
||||
#include "net/ssl/client_cert_identity.h"
|
||||
#include "shell/browser/api/process_metric.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/browser.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/error_thrower.h"
|
||||
#include "shell/common/gin_helper/event_emitter.h"
|
||||
|
@ -46,7 +46,7 @@ enum class JumpListResult : int;
|
|||
|
||||
namespace api {
|
||||
|
||||
class App : public AtomBrowserClient::Delegate,
|
||||
class App : public ElectronBrowserClient::Delegate,
|
||||
public gin_helper::EventEmitter<App>,
|
||||
public BrowserObserver,
|
||||
public content::GpuDataManagerObserver,
|
||||
|
@ -244,4 +244,4 @@ class App : public AtomBrowserClient::Delegate,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_APP_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_APP_H_
|
|
@ -3,8 +3,8 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
#include "base/path_service.h"
|
||||
#include "shell/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/atom_paths.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
#include "shell/browser/electron_paths.h"
|
||||
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_app.h"
|
||||
#include "shell/browser/api/electron_api_app.h"
|
||||
|
||||
#include <string>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "shell/browser/browser.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -57,4 +57,4 @@ class AutoUpdater : public gin_helper::EventEmitter<AutoUpdater>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_AUTO_UPDATER_H_
|
|
@ -2,9 +2,9 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/native_browser_view.h"
|
||||
#include "shell/common/color_util.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -70,4 +70,4 @@ class BrowserView : public gin_helper::TrackableObject<BrowserView>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_VIEW_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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>
|
||||
|
|
@ -2,16 +2,16 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "base/cancelable_callback.h"
|
||||
#include "shell/browser/api/atom_api_top_level_window.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_top_level_window.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/common/gin_helper/error_thrower.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -129,4 +129,4 @@ class BrowserWindow : public TopLevelWindow,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_BROWSER_WINDOW_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <vector>
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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"
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_cookies.h"
|
||||
#include "shell/browser/api/electron_api_cookies.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
@ -18,8 +18,8 @@
|
|||
#include "net/cookies/canonical_cookie.h"
|
||||
#include "net/cookies/cookie_store.h"
|
||||
#include "net/cookies/cookie_util.h"
|
||||
#include "shell/browser/atom_browser_context.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/value_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -173,7 +173,7 @@ std::string InclusionStatusToString(
|
|||
|
||||
} // namespace
|
||||
|
||||
Cookies::Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
Cookies::Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: browser_context_(browser_context) {
|
||||
Init(isolate);
|
||||
cookie_change_subscription_ =
|
||||
|
@ -322,7 +322,7 @@ void Cookies::OnCookieChanged(const net::CookieChangeInfo& change) {
|
|||
|
||||
// static
|
||||
gin::Handle<Cookies> Cookies::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new Cookies(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -29,21 +29,21 @@ class URLRequestContextGetter;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
class Cookies : public gin_helper::TrackableObject<Cookies> {
|
||||
public:
|
||||
static gin::Handle<Cookies> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// gin_helper::TrackableObject:
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
protected:
|
||||
Cookies(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Cookies(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Cookies() override;
|
||||
|
||||
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(
|
||||
const net::CookieChangeInfo& change)>::Subscription>
|
||||
cookie_change_subscription_;
|
||||
scoped_refptr<AtomBrowserContext> browser_context_;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Cookies);
|
||||
};
|
||||
|
@ -67,4 +67,4 @@ class Cookies : public gin_helper::TrackableObject<Cookies> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_COOKIES_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_COOKIES_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <vector>
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
||||
|
||||
#include <string>
|
||||
|
||||
|
@ -51,4 +51,4 @@ class DataPipeHolder : public gin::Wrappable<DataPipeHolder> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DATA_PIPE_HOLDER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DATA_PIPE_HOLDER_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_debugger.h"
|
||||
#include "shell/browser/api/electron_api_debugger.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -72,4 +72,4 @@ class Debugger : public gin_helper::TrackableObject<Debugger>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DEBUGGER_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <utility>
|
||||
|
@ -14,7 +14,7 @@
|
|||
#include "chrome/browser/media/webrtc/desktop_media_list.h"
|
||||
#include "chrome/browser/media/webrtc/window_icon_util.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_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -76,4 +76,4 @@ class DesktopCapturer : public gin_helper::TrackableObject<DesktopCapturer>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DESKTOP_CAPTURER_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "base/strings/utf_string_conversions.h"
|
||||
#include "base/threading/thread_task_runner_handle.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_path_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -71,4 +71,4 @@ class DownloadItem : public gin_helper::TrackableObject<DownloadItem>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_DOWNLOAD_ITEM_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <vector>
|
||||
|
||||
#include "base/stl_util.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/callback_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
@ -55,4 +55,4 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_GLOBAL_SHORTCUT_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <utility>
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -49,4 +49,4 @@ class InAppPurchase : public gin_helper::EventEmitter<InAppPurchase>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_IN_APP_PURCHASE_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
|
||||
#include <map>
|
||||
#include <utility>
|
||||
|
@ -28,7 +28,7 @@ namespace electron {
|
|||
|
||||
namespace api {
|
||||
|
||||
Menu::Menu(gin::Arguments* args) : model_(new AtomMenuModel(this)) {
|
||||
Menu::Menu(gin::Arguments* args) : model_(new ElectronMenuModel(this)) {
|
||||
InitWithArgs(args);
|
||||
model_->AddObserver(this);
|
||||
}
|
|
@ -2,16 +2,16 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "gin/arguments.h"
|
||||
#include "shell/browser/api/atom_api_top_level_window.h"
|
||||
#include "shell/browser/ui/atom_menu_model.h"
|
||||
#include "shell/browser/api/electron_api_top_level_window.h"
|
||||
#include "shell/browser/ui/electron_menu_model.h"
|
||||
#include "shell/common/gin_helper/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
@ -19,8 +19,8 @@ namespace electron {
|
|||
namespace api {
|
||||
|
||||
class Menu : public gin_helper::TrackableObject<Menu>,
|
||||
public AtomMenuModel::Delegate,
|
||||
public AtomMenuModel::Observer {
|
||||
public ElectronMenuModel::Delegate,
|
||||
public ElectronMenuModel::Observer {
|
||||
public:
|
||||
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);
|
||||
#endif
|
||||
|
||||
AtomMenuModel* model() const { return model_.get(); }
|
||||
ElectronMenuModel* model() const { return model_.get(); }
|
||||
|
||||
protected:
|
||||
explicit Menu(gin::Arguments* args);
|
||||
|
@ -64,7 +64,7 @@ class Menu : public gin_helper::TrackableObject<Menu>,
|
|||
base::OnceClosure callback) = 0;
|
||||
virtual void ClosePopupAt(int32_t window_id) = 0;
|
||||
|
||||
std::unique_ptr<AtomMenuModel> model_;
|
||||
std::unique_ptr<ElectronMenuModel> model_;
|
||||
Menu* parent_ = nullptr;
|
||||
|
||||
// Observable:
|
||||
|
@ -130,10 +130,10 @@ class Menu : public gin_helper::TrackableObject<Menu>,
|
|||
namespace gin {
|
||||
|
||||
template <>
|
||||
struct Converter<electron::AtomMenuModel*> {
|
||||
struct Converter<electron::ElectronMenuModel*> {
|
||||
static bool FromV8(v8::Isolate* isolate,
|
||||
v8::Local<v8::Value> val,
|
||||
electron::AtomMenuModel** out) {
|
||||
electron::ElectronMenuModel** out) {
|
||||
// null would be tranfered to NULL.
|
||||
if (val->IsNull()) {
|
||||
*out = nullptr;
|
||||
|
@ -150,4 +150,4 @@ struct Converter<electron::AtomMenuModel*> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_H_
|
|
@ -2,15 +2,15 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_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 <string>
|
||||
|
||||
#import "shell/browser/ui/cocoa/atom_menu_controller.h"
|
||||
#import "shell/browser/ui/cocoa/electron_menu_controller.h"
|
||||
|
||||
using base::scoped_nsobject;
|
||||
|
||||
|
@ -42,10 +42,10 @@ class MenuMac : public Menu {
|
|||
|
||||
void OnClosed(int32_t window_id, base::OnceClosure callback);
|
||||
|
||||
scoped_nsobject<AtomMenuController> menu_controller_;
|
||||
scoped_nsobject<ElectronMenuController> menu_controller_;
|
||||
|
||||
// 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_;
|
||||
|
||||
|
@ -56,4 +56,4 @@ class MenuMac : public Menu {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_MAC_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <utility>
|
||||
|
@ -67,9 +67,9 @@ void MenuMac::PopupOnUI(const base::WeakPtr<NativeWindow>& native_window,
|
|||
base::OnceClosure close_callback =
|
||||
base::BindOnce(&MenuMac::OnClosed, weak_factory_.GetWeakPtr(), window_id,
|
||||
std::move(callback));
|
||||
popup_controllers_[window_id] = base::scoped_nsobject<AtomMenuController>(
|
||||
[[AtomMenuController alloc] initWithModel:model()
|
||||
useDefaultAccelerator:NO]);
|
||||
popup_controllers_[window_id] = base::scoped_nsobject<ElectronMenuController>(
|
||||
[[ElectronMenuController alloc] initWithModel:model()
|
||||
useDefaultAccelerator:NO]);
|
||||
NSMenu* menu = [popup_controllers_[window_id] menu];
|
||||
NSView* view = [nswindow contentView];
|
||||
|
||||
|
@ -150,9 +150,9 @@ void MenuMac::OnClosed(int32_t window_id, base::OnceClosure callback) {
|
|||
// static
|
||||
void Menu::SetApplicationMenu(Menu* base_menu) {
|
||||
MenuMac* menu = static_cast<MenuMac*>(base_menu);
|
||||
base::scoped_nsobject<AtomMenuController> menu_controller(
|
||||
[[AtomMenuController alloc] initWithModel:menu->model_.get()
|
||||
useDefaultAccelerator:YES]);
|
||||
base::scoped_nsobject<ElectronMenuController> menu_controller(
|
||||
[[ElectronMenuController alloc] initWithModel:menu->model_.get()
|
||||
useDefaultAccelerator:YES]);
|
||||
|
||||
NSRunLoop* currentRunLoop = [NSRunLoop currentRunLoop];
|
||||
[currentRunLoop cancelPerformSelector:@selector(setMainMenu:)
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <utility>
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
||||
#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/views/controls/menu/menu_runner.h"
|
||||
|
||||
|
@ -45,4 +45,4 @@ class MenuViews : public Menu {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_MENU_VIEWS_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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>
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
||||
|
||||
#include "shell/common/gin_helper/event_emitter.h"
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
|
@ -62,4 +62,4 @@ struct Converter<ui::NativeTheme::ThemeSource> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NATIVE_THEME_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NATIVE_THEME_H_
|
|
@ -2,10 +2,10 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "shell/browser/mac/atom_application.h"
|
||||
#include "shell/browser/mac/electron_application.h"
|
||||
|
||||
namespace electron {
|
||||
|
|
@ -2,13 +2,13 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_net.h"
|
||||
#include "shell/browser/api/electron_api_net.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "gin/handle.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/object_template_builder.h"
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_NET_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NET_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
||||
|
||||
#include "shell/common/gin_helper/wrappable.h"
|
||||
|
||||
|
@ -32,4 +32,4 @@ class Net : public gin_helper::Wrappable<Net> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NET_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NET_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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>
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
|||
#include "components/net_log/chrome_net_log.h"
|
||||
#include "content/public/browser/storage_partition.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/common/gin_converters/file_path_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -75,7 +75,7 @@ void ResolvePromiseWithNetError(gin_helper::Promise<void> promise,
|
|||
|
||||
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) {
|
||||
Init(isolate);
|
||||
file_task_runner_ = CreateFileTaskRunner();
|
||||
|
@ -213,7 +213,7 @@ v8::Local<v8::Promise> NetLog::StopLogging(gin_helper::Arguments* args) {
|
|||
|
||||
// static
|
||||
gin::Handle<NetLog> NetLog::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new NetLog(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
|
@ -19,14 +19,14 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
class NetLog : public gin_helper::TrackableObject<NetLog> {
|
||||
public:
|
||||
static gin::Handle<NetLog> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
@ -37,7 +37,8 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
bool IsCurrentlyLogging() const;
|
||||
|
||||
protected:
|
||||
explicit NetLog(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
explicit NetLog(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
~NetLog() override;
|
||||
|
||||
void OnConnectionError();
|
||||
|
@ -49,7 +50,7 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
void NetLogStarted(int32_t error);
|
||||
|
||||
private:
|
||||
AtomBrowserContext* browser_context_;
|
||||
ElectronBrowserContext* browser_context_;
|
||||
|
||||
network::mojom::NetLogExporterPtr net_log_exporter_;
|
||||
|
||||
|
@ -66,4 +67,4 @@ class NetLog : public gin_helper::TrackableObject<NetLog> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NET_LOG_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NET_LOG_H_
|
|
@ -2,13 +2,13 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/strings/utf_string_conversions.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/atom_browser_client.h"
|
||||
#include "shell/browser/api/electron_api_menu.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_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
|
@ -51,7 +51,7 @@ namespace api {
|
|||
Notification::Notification(gin::Arguments* args) {
|
||||
InitWithArgs(args);
|
||||
|
||||
presenter_ = static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
presenter_ = static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->GetNotificationPresenter();
|
||||
|
||||
gin::Dictionary opts(nullptr);
|
||||
|
@ -236,7 +236,7 @@ void Notification::Show() {
|
|||
}
|
||||
|
||||
bool Notification::IsSupported() {
|
||||
return !!static_cast<AtomBrowserClient*>(AtomBrowserClient::Get())
|
||||
return !!static_cast<ElectronBrowserClient*>(ElectronBrowserClient::Get())
|
||||
->GetNotificationPresenter();
|
||||
}
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -103,4 +103,4 @@ class Notification : public gin_helper::TrackableObject<Notification>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_NOTIFICATION_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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_device_source.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
||||
|
||||
#include "base/compiler_specific.h"
|
||||
#include "shell/browser/lib/power_observer.h"
|
||||
|
@ -77,4 +77,4 @@ class PowerMonitor : public gin_helper::TrackableObject<PowerMonitor>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_MONITOR_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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>
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <wtsapi32.h>
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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>
|
||||
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -59,4 +59,4 @@ class PowerSaveBlocker : public gin::Wrappable<PowerSaveBlocker> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_POWER_SAVE_BLOCKER_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_protocol.h"
|
||||
#include "shell/browser/api/electron_api_protocol.h"
|
||||
|
||||
#include <memory>
|
||||
#include <utility>
|
||||
|
@ -10,8 +10,8 @@
|
|||
|
||||
#include "base/stl_util.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/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
|
@ -160,7 +160,8 @@ std::string ErrorCodeToString(ProtocolError error) {
|
|||
|
||||
} // namespace
|
||||
|
||||
Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context) {
|
||||
Protocol::Protocol(v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
Init(isolate);
|
||||
AttachAsUserData(browser_context);
|
||||
}
|
||||
|
@ -170,7 +171,7 @@ Protocol::~Protocol() = default;
|
|||
void Protocol::RegisterURLLoaderFactories(
|
||||
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories) {
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
@ -253,8 +254,9 @@ void Protocol::HandleOptionalCallback(gin::Arguments* args,
|
|||
}
|
||||
|
||||
// static
|
||||
gin::Handle<Protocol> Protocol::Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
gin::Handle<Protocol> Protocol::Create(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
return gin::CreateHandle(isolate, new Protocol(isolate, browser_context));
|
||||
}
|
||||
|
|
@ -2,21 +2,21 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "content/public/browser/content_browser_client.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/trackable_object.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
|
@ -38,19 +38,19 @@ enum class ProtocolError {
|
|||
class Protocol : public gin_helper::TrackableObject<Protocol> {
|
||||
public:
|
||||
static gin::Handle<Protocol> Create(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
v8::Local<v8::FunctionTemplate> prototype);
|
||||
|
||||
// Used by AtomBrowserClient for creating URLLoaderFactory.
|
||||
// Used by ElectronBrowserClient for creating URLLoaderFactory.
|
||||
void RegisterURLLoaderFactories(
|
||||
content::ContentBrowserClient::NonNetworkURLLoaderFactoryMap* factories);
|
||||
|
||||
const HandlersMap& intercept_handlers() const { return intercept_handlers_; }
|
||||
|
||||
private:
|
||||
Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Protocol(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Protocol() override;
|
||||
|
||||
// Callback types.
|
||||
|
@ -99,4 +99,4 @@ class Protocol : public gin_helper::TrackableObject<Protocol> {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_PROTOCOL_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_screen.h"
|
||||
#include "shell/browser/api/electron_api_screen.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string>
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
@ -56,4 +56,4 @@ class Screen : public gin_helper::EventEmitter<Screen>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SCREEN_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SCREEN_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
|
@ -40,16 +40,16 @@
|
|||
#include "net/http/http_cache.h"
|
||||
#include "services/network/network_service.h"
|
||||
#include "services/network/public/cpp/features.h"
|
||||
#include "shell/browser/api/atom_api_cookies.h"
|
||||
#include "shell/browser/api/atom_api_data_pipe_holder.h"
|
||||
#include "shell/browser/api/atom_api_download_item.h"
|
||||
#include "shell/browser/api/atom_api_net_log.h"
|
||||
#include "shell/browser/api/atom_api_protocol.h"
|
||||
#include "shell/browser/api/atom_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/api/electron_api_cookies.h"
|
||||
#include "shell/browser/api/electron_api_data_pipe_holder.h"
|
||||
#include "shell/browser/api/electron_api_download_item.h"
|
||||
#include "shell/browser/api/electron_api_net_log.h"
|
||||
#include "shell/browser/api/electron_api_protocol.h"
|
||||
#include "shell/browser/api/electron_api_web_request.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/net/cert_verifier_client.h"
|
||||
#include "shell/browser/session_preferences.h"
|
||||
|
@ -228,7 +228,7 @@ void DestroyGlobalHandle(v8::Isolate* isolate,
|
|||
|
||||
} // namespace
|
||||
|
||||
Session::Session(v8::Isolate* isolate, AtomBrowserContext* browser_context)
|
||||
Session::Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context)
|
||||
: network_emulation_token_(base::UnguessableToken::Create()),
|
||||
browser_context_(browser_context) {
|
||||
// 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,
|
||||
gin_helper::Arguments* args) {
|
||||
auto* permission_manager = static_cast<AtomPermissionManager*>(
|
||||
auto* permission_manager = static_cast<ElectronPermissionManager*>(
|
||||
browser_context()->GetPermissionControllerDelegate());
|
||||
if (val->IsNull()) {
|
||||
permission_manager->SetPermissionRequestHandler(
|
||||
AtomPermissionManager::RequestHandler());
|
||||
ElectronPermissionManager::RequestHandler());
|
||||
return;
|
||||
}
|
||||
auto handler = std::make_unique<AtomPermissionManager::RequestHandler>();
|
||||
auto handler = std::make_unique<ElectronPermissionManager::RequestHandler>();
|
||||
if (!gin::ConvertFromV8(args->isolate(), val, handler.get())) {
|
||||
args->ThrowError("Must pass null or function");
|
||||
return;
|
||||
}
|
||||
permission_manager->SetPermissionRequestHandler(base::BindRepeating(
|
||||
[](AtomPermissionManager::RequestHandler* handler,
|
||||
[](ElectronPermissionManager::RequestHandler* handler,
|
||||
content::WebContents* web_contents,
|
||||
content::PermissionType permission_type,
|
||||
AtomPermissionManager::StatusCallback callback,
|
||||
ElectronPermissionManager::StatusCallback callback,
|
||||
const base::Value& details) {
|
||||
handler->Run(web_contents, permission_type,
|
||||
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,
|
||||
gin_helper::Arguments* args) {
|
||||
AtomPermissionManager::CheckHandler handler;
|
||||
ElectronPermissionManager::CheckHandler handler;
|
||||
if (!(val->IsNull() || gin::ConvertFromV8(args->isolate(), val, &handler))) {
|
||||
args->ThrowError("Must pass null or function");
|
||||
return;
|
||||
}
|
||||
auto* permission_manager = static_cast<AtomPermissionManager*>(
|
||||
auto* permission_manager = static_cast<ElectronPermissionManager*>(
|
||||
browser_context()->GetPermissionControllerDelegate());
|
||||
permission_manager->SetPermissionCheckHandler(handler);
|
||||
}
|
||||
|
@ -695,7 +695,7 @@ v8::Local<v8::Value> Session::NetLog(v8::Isolate* isolate) {
|
|||
}
|
||||
|
||||
static void StartPreconnectOnUI(
|
||||
scoped_refptr<AtomBrowserContext> browser_context,
|
||||
scoped_refptr<ElectronBrowserContext> browser_context,
|
||||
const GURL& url,
|
||||
int num_sockets_to_preconnect) {
|
||||
std::vector<predictors::PreconnectRequest> requests = {
|
||||
|
@ -782,8 +782,9 @@ bool Session::AddWordToSpellCheckerDictionary(const std::string& word) {
|
|||
#endif
|
||||
|
||||
// static
|
||||
gin::Handle<Session> Session::CreateFrom(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context) {
|
||||
gin::Handle<Session> Session::CreateFrom(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context) {
|
||||
auto* existing = TrackableObject::FromWrappedClass(isolate, browser_context);
|
||||
if (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,
|
||||
const std::string& partition,
|
||||
base::DictionaryValue options) {
|
||||
scoped_refptr<AtomBrowserContext> browser_context;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context;
|
||||
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,
|
||||
base::CompareCase::SENSITIVE)) {
|
||||
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 {
|
||||
browser_context =
|
||||
AtomBrowserContext::From(partition, true, std::move(options));
|
||||
ElectronBrowserContext::From(partition, true, std::move(options));
|
||||
}
|
||||
return CreateFrom(isolate, browser_context.get());
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -32,7 +32,7 @@ class ProxyConfig;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class ElectronBrowserContext;
|
||||
|
||||
namespace api {
|
||||
|
||||
|
@ -40,8 +40,9 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
public content::DownloadManager::Observer {
|
||||
public:
|
||||
// Gets or creates Session from the |browser_context|.
|
||||
static gin::Handle<Session> CreateFrom(v8::Isolate* isolate,
|
||||
AtomBrowserContext* browser_context);
|
||||
static gin::Handle<Session> CreateFrom(
|
||||
v8::Isolate* isolate,
|
||||
ElectronBrowserContext* browser_context);
|
||||
|
||||
// Gets the Session of |partition|.
|
||||
static gin::Handle<Session> FromPartition(
|
||||
|
@ -49,7 +50,9 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
const std::string& partition,
|
||||
base::DictionaryValue options = base::DictionaryValue());
|
||||
|
||||
AtomBrowserContext* browser_context() const { return browser_context_.get(); }
|
||||
ElectronBrowserContext* browser_context() const {
|
||||
return browser_context_.get();
|
||||
}
|
||||
|
||||
// gin_helper::TrackableObject:
|
||||
static void BuildPrototype(v8::Isolate* isolate,
|
||||
|
@ -103,7 +106,7 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
#endif
|
||||
|
||||
protected:
|
||||
Session(v8::Isolate* isolate, AtomBrowserContext* browser_context);
|
||||
Session(v8::Isolate* isolate, ElectronBrowserContext* browser_context);
|
||||
~Session() override;
|
||||
|
||||
// content::DownloadManager::Observer:
|
||||
|
@ -122,7 +125,7 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
// The client id to enable the network throttler.
|
||||
base::UnguessableToken network_emulation_token_;
|
||||
|
||||
scoped_refptr<AtomBrowserContext> browser_context_;
|
||||
scoped_refptr<ElectronBrowserContext> browser_context_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(Session);
|
||||
};
|
||||
|
@ -131,4 +134,4 @@ class Session : public gin_helper::TrackableObject<Session>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SESSION_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SESSION_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/value_converter.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -165,4 +165,4 @@ class SystemPreferences : public gin_helper::EventEmitter<SystemPreferences>
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_SYSTEM_PREFERENCES_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <memory>
|
||||
|
@ -23,8 +23,8 @@
|
|||
#include "base/values.h"
|
||||
#include "chrome/browser/media/webrtc/system_media_capture_permissions_mac.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/electron_application.h"
|
||||
#include "shell/browser/ui/cocoa/NSColor+Hex.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/value_converter.h"
|
|
@ -5,7 +5,7 @@
|
|||
#include <dwmapi.h>
|
||||
#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 "shell/common/color_util.h"
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <utility>
|
||||
|
@ -10,10 +10,10 @@
|
|||
|
||||
#include "electron/buildflags/buildflags.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "shell/browser/api/atom_api_browser_view.h"
|
||||
#include "shell/browser/api/atom_api_menu.h"
|
||||
#include "shell/browser/api/atom_api_view.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/api/electron_api_browser_view.h"
|
||||
#include "shell/browser/api/electron_api_menu.h"
|
||||
#include "shell/browser/api/electron_api_view.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/common/color_util.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/file_path_converter.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -16,7 +16,7 @@
|
|||
#include "gin/handle.h"
|
||||
#include "shell/browser/native_window.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"
|
||||
|
||||
namespace electron {
|
||||
|
@ -266,4 +266,4 @@ class TopLevelWindow : public gin_helper::TrackableObject<TopLevelWindow>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_TOP_LEVEL_WINDOW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_TOP_LEVEL_WINDOW_H_
|
|
@ -2,14 +2,14 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/api/atom_api_tray.h"
|
||||
#include "shell/browser/api/electron_api_tray.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#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/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/guid_converter.h"
|
||||
#include "shell/common/gin_converters/image_converter.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -98,4 +98,4 @@ class Tray : public gin_helper::TrackableObject<Tray>, public TrayIconObserver {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_TRAY_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_TRAY_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <map>
|
||||
|
@ -20,8 +20,8 @@
|
|||
#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/url_loader_factory.mojom.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -90,4 +90,4 @@ class SimpleURLLoaderWrapper
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_URL_LOADER_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_URL_LOADER_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/object_template_builder.h"
|
|
@ -2,15 +2,15 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
||||
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
#include "electron/buildflags/buildflags.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"
|
||||
|
||||
namespace electron {
|
||||
|
@ -71,4 +71,4 @@ struct Converter<views::View*> {
|
|||
|
||||
} // namespace gin
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_VIEW_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <set>
|
||||
|
@ -47,17 +47,17 @@
|
|||
#include "mojo/public/cpp/bindings/associated_remote.h"
|
||||
#include "mojo/public/cpp/system/platform_handle.h"
|
||||
#include "ppapi/buildflags/buildflags.h"
|
||||
#include "shell/browser/api/atom_api_browser_window.h"
|
||||
#include "shell/browser/api/atom_api_debugger.h"
|
||||
#include "shell/browser/api/atom_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/api/electron_api_browser_window.h"
|
||||
#include "shell/browser/api/electron_api_debugger.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/browser.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/native_window.h"
|
||||
#include "shell/browser/session_preferences.h"
|
||||
|
@ -68,7 +68,7 @@
|
|||
#include "shell/browser/web_contents_preferences.h"
|
||||
#include "shell/browser/web_contents_zoom_controller.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/gin_converters/blink_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::WebContents* source) {
|
||||
if (!dialog_manager_)
|
||||
dialog_manager_ = std::make_unique<AtomJavaScriptDialogManager>(this);
|
||||
dialog_manager_ = std::make_unique<ElectronJavaScriptDialogManager>(this);
|
||||
|
||||
return dialog_manager_.get();
|
||||
}
|
||||
|
@ -1500,17 +1500,17 @@ void WebContents::Stop() {
|
|||
}
|
||||
|
||||
void WebContents::GoBack() {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoBack();
|
||||
}
|
||||
|
||||
void WebContents::GoForward() {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoForward();
|
||||
}
|
||||
|
||||
void WebContents::GoToOffset(int offset) {
|
||||
electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
electron::ElectronBrowserClient::SuppressRendererProcessRestartForOnce();
|
||||
web_contents()->GetController().GoToOffset(offset);
|
||||
}
|
||||
|
||||
|
@ -2687,8 +2687,9 @@ void WebContents::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetProperty("debugger", &WebContents::Debugger);
|
||||
}
|
||||
|
||||
AtomBrowserContext* WebContents::GetBrowserContext() const {
|
||||
return static_cast<AtomBrowserContext*>(web_contents()->GetBrowserContext());
|
||||
ElectronBrowserContext* WebContents::GetBrowserContext() const {
|
||||
return static_cast<ElectronBrowserContext*>(
|
||||
web_contents()->GetBrowserContext());
|
||||
}
|
||||
|
||||
// static
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -60,8 +60,8 @@ class ResourceRequestBody;
|
|||
|
||||
namespace electron {
|
||||
|
||||
class AtomBrowserContext;
|
||||
class AtomJavaScriptDialogManager;
|
||||
class ElectronBrowserContext;
|
||||
class ElectronJavaScriptDialogManager;
|
||||
class InspectableWebContents;
|
||||
class WebContentsZoomController;
|
||||
class WebViewGuestDelegate;
|
||||
|
@ -497,7 +497,7 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
void DevToolsClosed() override;
|
||||
|
||||
private:
|
||||
AtomBrowserContext* GetBrowserContext() const;
|
||||
ElectronBrowserContext* GetBrowserContext() const;
|
||||
|
||||
// Binds the given request for the ElectronBrowser API. When the
|
||||
// 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> debugger_;
|
||||
|
||||
std::unique_ptr<AtomJavaScriptDialogManager> dialog_manager_;
|
||||
std::unique_ptr<ElectronJavaScriptDialogManager> dialog_manager_;
|
||||
std::unique_ptr<WebViewGuestDelegate> guest_delegate_;
|
||||
std::unique_ptr<FrameSubscriber> frame_subscriber_;
|
||||
|
||||
|
@ -603,4 +603,4 @@ class WebContents : public gin_helper::TrackableObject<WebContents>,
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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_node.h" // nogncheck
|
|
@ -3,7 +3,7 @@
|
|||
// found in the LICENSE file.
|
||||
|
||||
#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>
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "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/ui/inspectable_web_contents_view.h"
|
||||
#include "shell/common/gin_helper/constructor.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_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 {
|
||||
|
||||
|
@ -45,4 +45,4 @@ class WebContentsView : public View, public content::WebContentsObserver {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_CONTENTS_VIEW_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 <string>
|
||||
|
@ -13,9 +13,9 @@
|
|||
#include "gin/converter.h"
|
||||
#include "gin/dictionary.h"
|
||||
#include "gin/object_template_builder.h"
|
||||
#include "shell/browser/api/atom_api_session.h"
|
||||
#include "shell/browser/api/atom_api_web_contents.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/api/electron_api_session.h"
|
||||
#include "shell/browser/api/electron_api_web_contents.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "shell/common/gin_converters/callback_converter.h"
|
||||
#include "shell/common/gin_converters/gurl_converter.h"
|
||||
#include "shell/common/gin_converters/net_converter.h"
|
||||
|
@ -479,8 +479,8 @@ gin::Handle<WebRequest> WebRequest::FromOrCreate(
|
|||
if (handle.IsEmpty()) {
|
||||
// Make sure the |Session| object has the |webRequest| property created.
|
||||
v8::Local<v8::Value> web_request =
|
||||
Session::CreateFrom(isolate,
|
||||
static_cast<AtomBrowserContext*>(browser_context))
|
||||
Session::CreateFrom(
|
||||
isolate, static_cast<ElectronBrowserContext*>(browser_context))
|
||||
->WebRequest(isolate);
|
||||
gin::ConvertFromV8(isolate, web_request, &handle);
|
||||
}
|
|
@ -2,8 +2,8 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#define SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#ifndef SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
||||
#define SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
|
@ -155,4 +155,4 @@ class WebRequest : public gin::Wrappable<WebRequest>, public WebRequestAPI {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_
|
||||
#endif // SHELL_BROWSER_API_ELECTRON_API_WEB_REQUEST_H_
|
|
@ -10,7 +10,7 @@
|
|||
#include "base/callback.h"
|
||||
#include "base/files/file_path.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "shell/browser/atom_browser_context.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "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/dictionary.h"
|
||||
#include "shell/common/node_includes.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_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"
|
||||
|
||||
namespace electron {
|
||||
|
@ -38,4 +38,4 @@ class BoxLayout : public LayoutManager {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BOX_LAYOUT_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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/dictionary.h"
|
|
@ -2,11 +2,11 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_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"
|
||||
|
||||
namespace electron {
|
||||
|
@ -37,4 +37,4 @@ class Button : public View, public views::ButtonListener {
|
|||
|
||||
} // namespace electron
|
||||
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_
|
||||
#endif // SHELL_BROWSER_API_VIEWS_ELECTRON_API_BUTTON_H_
|
|
@ -2,7 +2,7 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// 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 "shell/common/gin_helper/constructor.h"
|
|
@ -2,12 +2,12 @@
|
|||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_
|
||||
#ifndef SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
|
||||
#define SHELL_BROWSER_API_VIEWS_ELECTRON_API_LABEL_BUTTON_H_
|
||||
|
||||
#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"
|
||||
|
||||
namespace electron {
|
||||
|
@ -44,4 +44,4 @@ class LabelButton : public Button {
|
|||
|
||||
} // 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
Loading…
Reference in a new issue