From 34c4c8d5088fa183f56baea28809de6f2a427e02 Mon Sep 17 00:00:00 2001 From: Samuel Attard Date: Wed, 19 Jun 2019 14:23:04 -0700 Subject: [PATCH] refactor: rename the atom namespace to electron --- .../chrome/browser/process_singleton_posix.cc | 2 +- .../frame/global_menu_bar_registrar_x11.cc | 4 +- shell/app/atom_content_client.cc | 4 +- shell/app/atom_content_client.h | 4 +- shell/app/atom_library_main.mm | 8 ++-- shell/app/atom_main.cc | 20 ++++----- shell/app/atom_main_delegate.cc | 4 +- shell/app/atom_main_delegate.h | 4 +- shell/app/atom_main_delegate_mac.h | 4 +- shell/app/atom_main_delegate_mac.mm | 4 +- shell/app/command_line_args.cc | 4 +- shell/app/command_line_args.h | 4 +- shell/app/manifests.cc | 4 +- shell/app/node_main.cc | 4 +- shell/app/node_main.h | 4 +- shell/app/uv_task_runner.cc | 4 +- shell/app/uv_task_runner.h | 4 +- shell/browser/api/atom_api_app.cc | 36 ++++++++-------- shell/browser/api/atom_api_app.h | 7 +-- shell/browser/api/atom_api_app_mac.mm | 4 +- shell/browser/api/atom_api_app_mas.mm | 4 +- shell/browser/api/atom_api_auto_updater.cc | 6 +-- shell/browser/api/atom_api_auto_updater.h | 4 +- shell/browser/api/atom_api_browser_view.cc | 20 ++++----- shell/browser/api/atom_api_browser_view.h | 4 +- shell/browser/api/atom_api_browser_window.cc | 8 ++-- shell/browser/api/atom_api_browser_window.h | 4 +- .../api/atom_api_browser_window_mac.mm | 4 +- .../api/atom_api_browser_window_views.cc | 4 +- shell/browser/api/atom_api_content_tracing.cc | 28 ++++++------ shell/browser/api/atom_api_cookies.cc | 4 +- shell/browser/api/atom_api_cookies.h | 4 +- shell/browser/api/atom_api_debugger.cc | 10 ++--- shell/browser/api/atom_api_debugger.h | 6 +-- .../browser/api/atom_api_desktop_capturer.cc | 15 ++++--- shell/browser/api/atom_api_desktop_capturer.h | 4 +- shell/browser/api/atom_api_dialog.cc | 21 ++++----- shell/browser/api/atom_api_download_item.cc | 6 +-- shell/browser/api/atom_api_download_item.h | 4 +- shell/browser/api/atom_api_global_shortcut.cc | 8 ++-- shell/browser/api/atom_api_global_shortcut.h | 4 +- shell/browser/api/atom_api_in_app_purchase.cc | 14 +++--- shell/browser/api/atom_api_in_app_purchase.h | 4 +- shell/browser/api/atom_api_menu.cc | 6 +-- shell/browser/api/atom_api_menu.h | 12 +++--- shell/browser/api/atom_api_menu_mac.h | 4 +- shell/browser/api/atom_api_menu_mac.mm | 6 +-- shell/browser/api/atom_api_menu_views.cc | 6 +-- shell/browser/api/atom_api_menu_views.h | 4 +- shell/browser/api/atom_api_net.cc | 8 ++-- shell/browser/api/atom_api_net.h | 4 +- shell/browser/api/atom_api_net_log.cc | 4 +- shell/browser/api/atom_api_net_log.h | 4 +- shell/browser/api/atom_api_notification.cc | 18 ++++---- shell/browser/api/atom_api_notification.h | 14 +++--- shell/browser/api/atom_api_power_monitor.cc | 6 +-- shell/browser/api/atom_api_power_monitor.h | 4 +- .../browser/api/atom_api_power_monitor_mac.mm | 10 ++--- .../browser/api/atom_api_power_monitor_win.cc | 4 +- .../api/atom_api_power_save_blocker.cc | 7 +-- .../browser/api/atom_api_power_save_blocker.h | 4 +- shell/browser/api/atom_api_protocol.cc | 23 +++++----- shell/browser/api/atom_api_protocol.h | 4 +- shell/browser/api/atom_api_protocol_ns.cc | 4 +- shell/browser/api/atom_api_protocol_ns.h | 4 +- shell/browser/api/atom_api_screen.cc | 10 ++--- shell/browser/api/atom_api_screen.h | 4 +- shell/browser/api/atom_api_session.cc | 22 +++++----- shell/browser/api/atom_api_session.h | 4 +- .../api/atom_api_system_preferences.cc | 6 +-- .../browser/api/atom_api_system_preferences.h | 4 +- .../api/atom_api_system_preferences_mac.mm | 4 +- .../api/atom_api_system_preferences_win.cc | 4 +- .../browser/api/atom_api_top_level_window.cc | 10 ++--- shell/browser/api/atom_api_top_level_window.h | 13 +++--- shell/browser/api/atom_api_tray.cc | 12 +++--- shell/browser/api/atom_api_tray.h | 4 +- shell/browser/api/atom_api_url_request.cc | 4 +- shell/browser/api/atom_api_url_request.h | 4 +- shell/browser/api/atom_api_view.cc | 6 +-- shell/browser/api/atom_api_view.h | 8 ++-- shell/browser/api/atom_api_web_contents.cc | 26 +++++------ shell/browser/api/atom_api_web_contents.h | 4 +- .../browser/api/atom_api_web_contents_impl.cc | 4 +- .../browser/api/atom_api_web_contents_mac.mm | 4 +- .../browser/api/atom_api_web_contents_view.cc | 8 ++-- .../browser/api/atom_api_web_contents_view.h | 4 +- shell/browser/api/atom_api_web_request.cc | 4 +- shell/browser/api/atom_api_web_request.h | 4 +- .../browser/api/atom_api_web_view_manager.cc | 10 ++--- shell/browser/api/event.h | 3 +- shell/browser/api/event_emitter.cc | 2 +- shell/browser/api/event_emitter.h | 5 ++- shell/browser/api/frame_subscriber.cc | 4 +- shell/browser/api/frame_subscriber.h | 4 +- shell/browser/api/gpu_info_enumerator.cc | 4 +- shell/browser/api/gpu_info_enumerator.h | 4 +- shell/browser/api/gpuinfo_manager.cc | 4 +- shell/browser/api/gpuinfo_manager.h | 4 +- shell/browser/api/process_metric.cc | 4 +- shell/browser/api/process_metric.h | 4 +- shell/browser/api/save_page_handler.cc | 4 +- shell/browser/api/save_page_handler.h | 8 ++-- shell/browser/api/stream_subscriber.cc | 18 ++++---- shell/browser/api/stream_subscriber.h | 6 +-- shell/browser/api/trackable_object.cc | 2 +- shell/browser/api/trackable_object.h | 6 +-- .../browser/api/views/atom_api_box_layout.cc | 6 +-- shell/browser/api/views/atom_api_box_layout.h | 4 +- shell/browser/api/views/atom_api_button.cc | 6 +-- shell/browser/api/views/atom_api_button.h | 4 +- .../api/views/atom_api_label_button.cc | 6 +-- .../browser/api/views/atom_api_label_button.h | 4 +- .../api/views/atom_api_layout_manager.cc | 6 +-- .../api/views/atom_api_layout_manager.h | 4 +- .../api/views/atom_api_md_text_button.cc | 6 +-- .../api/views/atom_api_md_text_button.h | 4 +- .../browser/api/views/atom_api_resize_area.cc | 6 +-- .../browser/api/views/atom_api_resize_area.h | 4 +- .../browser/api/views/atom_api_text_field.cc | 6 +-- shell/browser/api/views/atom_api_text_field.h | 4 +- shell/browser/atom_blob_reader.cc | 4 +- shell/browser/atom_blob_reader.h | 6 +-- shell/browser/atom_browser_client.cc | 4 +- shell/browser/atom_browser_client.h | 4 +- shell/browser/atom_browser_context.cc | 4 +- shell/browser/atom_browser_context.h | 4 +- shell/browser/atom_browser_main_parts.cc | 4 +- shell/browser/atom_browser_main_parts.h | 4 +- shell/browser/atom_browser_main_parts_mac.mm | 4 +- .../browser/atom_browser_main_parts_posix.cc | 4 +- .../browser/atom_download_manager_delegate.cc | 6 +-- .../browser/atom_download_manager_delegate.h | 4 +- shell/browser/atom_gpu_client.cc | 4 +- shell/browser/atom_gpu_client.h | 4 +- .../browser/atom_javascript_dialog_manager.cc | 8 ++-- .../browser/atom_javascript_dialog_manager.h | 4 +- shell/browser/atom_navigation_throttle.cc | 6 +-- shell/browser/atom_navigation_throttle.h | 4 +- shell/browser/atom_paths.h | 4 +- shell/browser/atom_permission_manager.cc | 4 +- shell/browser/atom_permission_manager.h | 4 +- .../browser/atom_quota_permission_context.cc | 4 +- shell/browser/atom_quota_permission_context.h | 4 +- ...tom_speech_recognition_manager_delegate.cc | 4 +- ...atom_speech_recognition_manager_delegate.h | 4 +- .../browser/atom_web_ui_controller_factory.cc | 4 +- .../browser/atom_web_ui_controller_factory.h | 4 +- shell/browser/auto_updater_mac.mm | 2 +- shell/browser/browser.cc | 12 +++--- shell/browser/browser.h | 4 +- shell/browser/browser_linux.cc | 4 +- shell/browser/browser_mac.mm | 4 +- shell/browser/browser_observer.h | 4 +- shell/browser/browser_win.cc | 6 +-- shell/browser/child_web_contents_tracker.cc | 4 +- shell/browser/child_web_contents_tracker.h | 4 +- shell/browser/common_web_contents_delegate.cc | 6 +-- shell/browser/common_web_contents_delegate.h | 4 +- .../common_web_contents_delegate_mac.mm | 4 +- .../common_web_contents_delegate_views.cc | 4 +- shell/browser/cookie_change_notifier.cc | 4 +- shell/browser/cookie_change_notifier.h | 4 +- shell/browser/fake_location_provider.cc | 4 +- shell/browser/fake_location_provider.h | 4 +- shell/browser/feature_list.cc | 4 +- shell/browser/feature_list.h | 2 +- shell/browser/font_defaults.cc | 4 +- shell/browser/font_defaults.h | 4 +- shell/browser/io_thread.cc | 4 +- shell/browser/io_thread.h | 10 +++-- shell/browser/javascript_environment.cc | 4 +- shell/browser/javascript_environment.h | 4 +- shell/browser/lib/bluetooth_chooser.cc | 12 +++--- shell/browser/lib/bluetooth_chooser.h | 4 +- shell/browser/lib/power_observer.h | 4 +- shell/browser/lib/power_observer_linux.cc | 4 +- shell/browser/lib/power_observer_linux.h | 4 +- .../loader/layered_resource_handler.cc | 4 +- .../browser/loader/layered_resource_handler.h | 4 +- shell/browser/login_handler.cc | 4 +- shell/browser/login_handler.h | 4 +- shell/browser/mac/atom_application.mm | 16 +++---- shell/browser/mac/atom_application_delegate.h | 2 +- .../browser/mac/atom_application_delegate.mm | 24 +++++------ shell/browser/mac/dict_util.h | 4 +- shell/browser/mac/dict_util.mm | 4 +- .../media/media_capture_devices_dispatcher.cc | 4 +- .../media/media_capture_devices_dispatcher.h | 4 +- shell/browser/media/media_device_id_salt.cc | 4 +- shell/browser/media/media_device_id_salt.h | 4 +- .../media/media_stream_devices_controller.cc | 4 +- .../media/media_stream_devices_controller.h | 4 +- shell/browser/microtasks_runner.cc | 4 +- shell/browser/microtasks_runner.h | 4 +- shell/browser/native_browser_view.cc | 4 +- shell/browser/native_browser_view.h | 4 +- shell/browser/native_browser_view_mac.h | 4 +- shell/browser/native_browser_view_mac.mm | 4 +- shell/browser/native_browser_view_views.cc | 4 +- shell/browser/native_browser_view_views.h | 4 +- shell/browser/native_window.cc | 4 +- shell/browser/native_window.h | 4 +- shell/browser/native_window_mac.h | 4 +- shell/browser/native_window_mac.mm | 10 ++--- shell/browser/native_window_observer.h | 4 +- shell/browser/native_window_views.cc | 6 +-- shell/browser/native_window_views.h | 4 +- shell/browser/native_window_views_win.cc | 4 +- shell/browser/net/about_protocol_handler.cc | 4 +- shell/browser/net/about_protocol_handler.h | 4 +- .../browser/net/asar/url_request_asar_job.cc | 2 +- shell/browser/net/atom_cert_verifier.cc | 4 +- shell/browser/net/atom_cert_verifier.h | 4 +- shell/browser/net/atom_network_delegate.cc | 6 +-- shell/browser/net/atom_network_delegate.h | 4 +- shell/browser/net/atom_url_loader_factory.cc | 18 ++++---- shell/browser/net/atom_url_loader_factory.h | 4 +- shell/browser/net/atom_url_request.cc | 4 +- shell/browser/net/atom_url_request.h | 4 +- .../net/atom_url_request_job_factory.cc | 4 +- .../net/atom_url_request_job_factory.h | 4 +- shell/browser/net/cookie_details.h | 4 +- shell/browser/net/http_protocol_handler.cc | 4 +- shell/browser/net/http_protocol_handler.h | 4 +- shell/browser/net/js_asker.cc | 4 +- shell/browser/net/js_asker.h | 4 +- shell/browser/net/network_context_service.cc | 4 +- shell/browser/net/network_context_service.h | 4 +- .../net/network_context_service_factory.cc | 4 +- .../net/network_context_service_factory.h | 4 +- shell/browser/net/node_stream_loader.cc | 4 +- shell/browser/net/node_stream_loader.h | 4 +- .../net/proxying_url_loader_factory.cc | 4 +- .../browser/net/proxying_url_loader_factory.h | 4 +- shell/browser/net/require_ct_delegate.cc | 4 +- shell/browser/net/require_ct_delegate.h | 4 +- shell/browser/net/resolve_proxy_helper.cc | 4 +- shell/browser/net/resolve_proxy_helper.h | 4 +- .../net/system_network_context_manager.cc | 19 ++++---- .../net/system_network_context_manager.h | 2 +- shell/browser/net/url_pipe_loader.cc | 4 +- shell/browser/net/url_pipe_loader.h | 4 +- shell/browser/net/url_request_about_job.cc | 4 +- shell/browser/net/url_request_about_job.h | 4 +- .../browser/net/url_request_async_asar_job.cc | 4 +- .../browser/net/url_request_async_asar_job.h | 4 +- shell/browser/net/url_request_buffer_job.cc | 4 +- shell/browser/net/url_request_buffer_job.h | 4 +- .../browser/net/url_request_context_getter.cc | 6 +-- .../browser/net/url_request_context_getter.h | 4 +- shell/browser/net/url_request_fetch_job.cc | 4 +- shell/browser/net/url_request_fetch_job.h | 4 +- shell/browser/net/url_request_stream_job.cc | 4 +- shell/browser/net/url_request_stream_job.h | 4 +- shell/browser/net/url_request_string_job.cc | 4 +- shell/browser/net/url_request_string_job.h | 4 +- shell/browser/node_debugger.cc | 4 +- shell/browser/node_debugger.h | 4 +- .../linux/libnotify_notification.cc | 4 +- .../linux/libnotify_notification.h | 4 +- .../linux/notification_presenter_linux.cc | 4 +- .../linux/notification_presenter_linux.h | 4 +- .../notifications/mac/cocoa_notification.h | 4 +- .../notifications/mac/cocoa_notification.mm | 4 +- .../mac/notification_center_delegate.h | 7 +-- .../mac/notification_center_delegate.mm | 3 +- .../mac/notification_presenter_mac.h | 4 +- .../mac/notification_presenter_mac.mm | 4 +- shell/browser/notifications/notification.cc | 4 +- shell/browser/notifications/notification.h | 4 +- .../notifications/notification_delegate.h | 4 +- .../notifications/notification_presenter.cc | 4 +- .../notifications/notification_presenter.h | 4 +- .../platform_notification_service.cc | 8 ++-- .../platform_notification_service.h | 4 +- .../win/notification_presenter_win.cc | 4 +- .../win/notification_presenter_win.h | 4 +- .../win/notification_presenter_win7.cc | 6 +-- .../win/notification_presenter_win7.h | 6 +-- .../win/win32_desktop_notifications/common.h | 4 +- .../desktop_notification_controller.cc | 4 +- .../desktop_notification_controller.h | 4 +- .../win/win32_desktop_notifications/toast.cc | 4 +- .../win/win32_desktop_notifications/toast.h | 4 +- .../win32_desktop_notifications/toast_uia.cc | 4 +- .../win32_desktop_notifications/toast_uia.h | 4 +- .../notifications/win/win32_notification.cc | 4 +- .../notifications/win/win32_notification.h | 6 +-- .../win/windows_toast_notification.cc | 4 +- .../win/windows_toast_notification.h | 4 +- shell/browser/osr/osr_host_display_client.cc | 4 +- shell/browser/osr/osr_host_display_client.h | 4 +- .../osr/osr_host_display_client_mac.mm | 4 +- .../osr/osr_render_widget_host_view.cc | 4 +- .../browser/osr/osr_render_widget_host_view.h | 4 +- shell/browser/osr/osr_video_consumer.cc | 4 +- shell/browser/osr/osr_video_consumer.h | 4 +- shell/browser/osr/osr_view_proxy.cc | 4 +- shell/browser/osr/osr_view_proxy.h | 4 +- shell/browser/osr/osr_web_contents_view.cc | 4 +- shell/browser/osr/osr_web_contents_view.h | 4 +- .../browser/osr/osr_web_contents_view_mac.mm | 4 +- shell/browser/pref_store_delegate.cc | 4 +- shell/browser/pref_store_delegate.h | 4 +- .../printing/print_preview_message_handler.cc | 6 +-- .../printing/print_preview_message_handler.h | 6 +-- shell/browser/relauncher.cc | 2 +- shell/browser/session_preferences.cc | 4 +- shell/browser/session_preferences.h | 4 +- shell/browser/special_storage_policy.cc | 4 +- shell/browser/special_storage_policy.h | 4 +- shell/browser/ui/accelerator_util.cc | 8 ++-- shell/browser/ui/accelerator_util.h | 4 +- shell/browser/ui/atom_menu_model.cc | 4 +- shell/browser/ui/atom_menu_model.h | 4 +- shell/browser/ui/autofill_popup.cc | 4 +- shell/browser/ui/autofill_popup.h | 4 +- shell/browser/ui/certificate_trust.h | 6 +-- shell/browser/ui/certificate_trust_mac.mm | 12 +++--- shell/browser/ui/certificate_trust_win.cc | 4 +- shell/browser/ui/cocoa/atom_bundle_mover.h | 4 +- shell/browser/ui/cocoa/atom_bundle_mover.mm | 8 ++-- .../atom_inspectable_web_contents_view.h | 6 +-- shell/browser/ui/cocoa/atom_menu_controller.h | 11 ++--- .../browser/ui/cocoa/atom_menu_controller.mm | 26 +++++------ .../browser/ui/cocoa/atom_native_widget_mac.h | 4 +- .../ui/cocoa/atom_native_widget_mac.mm | 4 +- shell/browser/ui/cocoa/atom_ns_window.h | 10 ++--- shell/browser/ui/cocoa/atom_ns_window.mm | 16 +++---- .../ui/cocoa/atom_ns_window_delegate.h | 6 +-- .../ui/cocoa/atom_ns_window_delegate.mm | 6 +-- shell/browser/ui/cocoa/atom_touch_bar.h | 4 +- shell/browser/ui/cocoa/atom_touch_bar.mm | 7 +-- .../ui/cocoa/delayed_native_view_host.cc | 4 +- .../ui/cocoa/delayed_native_view_host.h | 4 +- shell/browser/ui/cocoa/root_view_mac.h | 4 +- shell/browser/ui/cocoa/root_view_mac.mm | 4 +- shell/browser/ui/cocoa/views_delegate_mac.h | 4 +- shell/browser/ui/cocoa/views_delegate_mac.mm | 4 +- shell/browser/ui/devtools_manager_delegate.cc | 4 +- shell/browser/ui/devtools_manager_delegate.h | 4 +- shell/browser/ui/devtools_ui.cc | 4 +- shell/browser/ui/devtools_ui.h | 4 +- shell/browser/ui/drag_util.h | 4 +- shell/browser/ui/drag_util_mac.mm | 4 +- shell/browser/ui/drag_util_views.cc | 4 +- shell/browser/ui/file_dialog.h | 8 ++-- shell/browser/ui/file_dialog_gtk.cc | 23 +++++----- shell/browser/ui/file_dialog_mac.mm | 12 +++--- shell/browser/ui/file_dialog_win.cc | 16 +++---- shell/browser/ui/inspectable_web_contents.cc | 4 +- shell/browser/ui/inspectable_web_contents.h | 4 +- .../ui/inspectable_web_contents_delegate.h | 4 +- .../ui/inspectable_web_contents_impl.cc | 4 +- .../ui/inspectable_web_contents_impl.h | 4 +- .../ui/inspectable_web_contents_view.h | 4 +- .../inspectable_web_contents_view_delegate.cc | 4 +- .../inspectable_web_contents_view_delegate.h | 4 +- .../ui/inspectable_web_contents_view_mac.h | 4 +- .../ui/inspectable_web_contents_view_mac.mm | 4 +- shell/browser/ui/message_box.h | 10 ++--- shell/browser/ui/message_box_gtk.cc | 10 ++--- shell/browser/ui/message_box_mac.mm | 4 +- shell/browser/ui/message_box_win.cc | 12 +++--- shell/browser/ui/tray_icon.cc | 4 +- shell/browser/ui/tray_icon.h | 4 +- shell/browser/ui/tray_icon_cocoa.h | 4 +- shell/browser/ui/tray_icon_cocoa.mm | 18 ++++---- shell/browser/ui/tray_icon_gtk.cc | 4 +- shell/browser/ui/tray_icon_gtk.h | 4 +- shell/browser/ui/tray_icon_observer.h | 4 +- shell/browser/ui/tray_icon_win.cc | 4 +- shell/browser/ui/views/atom_views_delegate.cc | 4 +- shell/browser/ui/views/atom_views_delegate.h | 4 +- shell/browser/ui/views/autofill_popup_view.cc | 4 +- shell/browser/ui/views/autofill_popup_view.h | 4 +- shell/browser/ui/views/frameless_view.cc | 4 +- shell/browser/ui/views/frameless_view.h | 4 +- shell/browser/ui/views/global_menu_bar_x11.cc | 4 +- shell/browser/ui/views/global_menu_bar_x11.h | 4 +- .../inspectable_web_contents_view_views.cc | 4 +- .../inspectable_web_contents_view_views.h | 4 +- shell/browser/ui/views/menu_bar.cc | 12 +++--- shell/browser/ui/views/menu_bar.h | 8 ++-- shell/browser/ui/views/menu_delegate.cc | 4 +- shell/browser/ui/views/menu_delegate.h | 4 +- shell/browser/ui/views/menu_model_adapter.cc | 4 +- shell/browser/ui/views/menu_model_adapter.h | 4 +- shell/browser/ui/views/native_frame_view.cc | 4 +- shell/browser/ui/views/native_frame_view.h | 4 +- shell/browser/ui/views/root_view.cc | 4 +- shell/browser/ui/views/root_view.h | 4 +- shell/browser/ui/views/submenu_button.cc | 4 +- shell/browser/ui/views/submenu_button.h | 4 +- shell/browser/ui/views/win_frame_view.cc | 4 +- shell/browser/ui/views/win_frame_view.h | 4 +- shell/browser/ui/webui/pdf_viewer_handler.cc | 4 +- shell/browser/ui/webui/pdf_viewer_handler.h | 4 +- shell/browser/ui/webui/pdf_viewer_ui.cc | 12 +++--- shell/browser/ui/webui/pdf_viewer_ui.h | 4 +- .../ui/win/atom_desktop_native_widget_aura.cc | 4 +- .../ui/win/atom_desktop_native_widget_aura.h | 4 +- .../win/atom_desktop_window_tree_host_win.cc | 4 +- .../win/atom_desktop_window_tree_host_win.h | 4 +- shell/browser/ui/win/jump_list.cc | 10 ++--- shell/browser/ui/win/jump_list.h | 4 +- shell/browser/ui/win/notify_icon.cc | 4 +- shell/browser/ui/win/notify_icon.h | 4 +- shell/browser/ui/win/notify_icon_host.cc | 4 +- shell/browser/ui/win/notify_icon_host.h | 4 +- shell/browser/ui/win/taskbar_host.cc | 4 +- shell/browser/ui/win/taskbar_host.h | 4 +- shell/browser/ui/x/event_disabler.cc | 4 +- shell/browser/ui/x/event_disabler.h | 4 +- shell/browser/ui/x/window_state_watcher.cc | 4 +- shell/browser/ui/x/window_state_watcher.h | 4 +- shell/browser/ui/x/x_window_utils.cc | 4 +- shell/browser/ui/x/x_window_utils.h | 4 +- shell/browser/unresponsive_suppressor.cc | 4 +- shell/browser/unresponsive_suppressor.h | 4 +- .../browser/web_contents_permission_helper.cc | 4 +- .../browser/web_contents_permission_helper.h | 4 +- shell/browser/web_contents_preferences.cc | 4 +- shell/browser/web_contents_preferences.h | 4 +- shell/browser/web_contents_zoom_controller.cc | 4 +- shell/browser/web_contents_zoom_controller.h | 4 +- shell/browser/web_dialog_helper.cc | 16 +++---- shell/browser/web_dialog_helper.h | 4 +- shell/browser/web_view_guest_delegate.cc | 4 +- shell/browser/web_view_guest_delegate.h | 4 +- shell/browser/web_view_manager.cc | 4 +- shell/browser/web_view_manager.h | 4 +- shell/browser/win/scoped_hstring.cc | 4 +- shell/browser/win/scoped_hstring.h | 4 +- shell/browser/window_list.cc | 4 +- shell/browser/window_list.h | 4 +- shell/browser/window_list_observer.h | 4 +- shell/browser/zoom_level_delegate.cc | 4 +- shell/browser/zoom_level_delegate.h | 4 +- shell/common/api/api.mojom | 2 +- shell/common/api/atom_api_clipboard.cc | 43 ++++++++++--------- shell/common/api/atom_api_clipboard.h | 4 +- shell/common/api/atom_api_clipboard_mac.mm | 4 +- shell/common/api/atom_api_key_weak_map.h | 6 +-- shell/common/api/atom_api_native_image.cc | 19 ++++---- shell/common/api/atom_api_native_image.h | 10 ++--- shell/common/api/atom_api_native_image_mac.mm | 4 +- shell/common/api/atom_api_shell.cc | 4 +- shell/common/api/atom_api_v8_util.cc | 12 +++--- shell/common/api/electron_bindings.cc | 6 +-- shell/common/api/electron_bindings.h | 4 +- shell/common/api/object_life_monitor.cc | 4 +- shell/common/api/object_life_monitor.h | 4 +- shell/common/api/remote_callback_freer.cc | 4 +- shell/common/api/remote_callback_freer.h | 4 +- shell/common/api/remote_object_freer.cc | 4 +- shell/common/api/remote_object_freer.h | 4 +- shell/common/application_info.cc | 4 +- shell/common/application_info.h | 4 +- shell/common/application_info_linux.cc | 4 +- shell/common/application_info_mac.mm | 4 +- shell/common/application_info_win.cc | 4 +- shell/common/atom_command_line.cc | 4 +- shell/common/atom_command_line.h | 4 +- shell/common/atom_constants.cc | 4 +- shell/common/atom_constants.h | 4 +- shell/common/color_util.cc | 4 +- shell/common/color_util.h | 4 +- shell/common/crash_reporter/crash_reporter.cc | 2 +- .../crash_reporter/crash_reporter_win.cc | 8 ++-- shell/common/deprecate_util.cc | 4 +- shell/common/deprecate_util.h | 4 +- shell/common/heap_snapshot.cc | 4 +- shell/common/heap_snapshot.h | 4 +- shell/common/key_weak_map.h | 4 +- shell/common/keyboard_util.cc | 4 +- shell/common/keyboard_util.h | 4 +- shell/common/mac/main_application_bundle.h | 4 +- shell/common/mac/main_application_bundle.mm | 4 +- shell/common/mouse_util.cc | 4 +- shell/common/mouse_util.h | 4 +- .../native_mate_converters/blink_converter.cc | 4 +- .../content_converter.cc | 6 +-- .../file_dialog_converter.cc | 3 +- .../native_mate_converters/image_converter.cc | 4 +- .../message_box_converter.cc | 6 +-- .../message_box_converter.h | 4 +- .../native_mate_converters/net_converter.cc | 4 +- .../native_mate_converters/net_converter.h | 4 +- .../v8_value_converter.cc | 4 +- .../v8_value_converter.h | 4 +- .../native_mate_converters/value_converter.cc | 12 +++--- shell/common/node_bindings.cc | 4 +- shell/common/node_bindings.h | 4 +- shell/common/node_bindings_linux.cc | 4 +- shell/common/node_bindings_linux.h | 4 +- shell/common/node_bindings_mac.cc | 4 +- shell/common/node_bindings_mac.h | 4 +- shell/common/node_bindings_win.cc | 4 +- shell/common/node_bindings_win.h | 4 +- shell/common/options_switches.cc | 4 +- shell/common/options_switches.h | 4 +- shell/common/promise_util.cc | 8 ++-- shell/common/promise_util.h | 8 ++-- shell/renderer/api/atom_api_renderer_ipc.cc | 13 +++--- .../api/atom_api_spell_check_client.cc | 4 +- .../api/atom_api_spell_check_client.h | 4 +- shell/renderer/api/atom_api_web_frame.cc | 10 ++--- shell/renderer/atom_autofill_agent.cc | 4 +- shell/renderer/atom_autofill_agent.h | 4 +- shell/renderer/atom_render_frame_observer.cc | 4 +- shell/renderer/atom_render_frame_observer.h | 4 +- shell/renderer/atom_renderer_client.cc | 4 +- shell/renderer/atom_renderer_client.h | 6 +-- .../atom_sandboxed_renderer_client.cc | 4 +- .../renderer/atom_sandboxed_renderer_client.h | 6 +-- shell/renderer/content_settings_observer.cc | 4 +- shell/renderer/content_settings_observer.h | 4 +- shell/renderer/electron_api_service_impl.cc | 7 +-- shell/renderer/electron_api_service_impl.h | 4 +- shell/renderer/guest_view_container.cc | 4 +- shell/renderer/guest_view_container.h | 4 +- .../print_render_frame_helper_delegate.cc | 4 +- .../print_render_frame_helper_delegate.h | 4 +- shell/renderer/renderer_client_base.cc | 7 +-- shell/renderer/renderer_client_base.h | 4 +- shell/renderer/web_worker_observer.cc | 4 +- shell/renderer/web_worker_observer.h | 4 +- shell/utility/atom_content_utility_client.cc | 4 +- shell/utility/atom_content_utility_client.h | 4 +- 531 files changed, 1456 insertions(+), 1428 deletions(-) diff --git a/chromium_src/chrome/browser/process_singleton_posix.cc b/chromium_src/chrome/browser/process_singleton_posix.cc index 25b0007bae..d3d4924db1 100644 --- a/chromium_src/chrome/browser/process_singleton_posix.cc +++ b/chromium_src/chrome/browser/process_singleton_posix.cc @@ -827,7 +827,7 @@ ProcessSingleton::NotifyResult ProcessSingleton::NotifyOtherProcessWithTimeout( return PROCESS_NONE; to_send.append(current_dir.value()); - const std::vector& argv = atom::AtomCommandLine::argv(); + const std::vector& argv = electron::AtomCommandLine::argv(); for (std::vector::const_iterator it = argv.begin(); it != argv.end(); ++it) { to_send.push_back(kTokenDelimiter); diff --git a/chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc b/chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc index bf13c3f01b..ec1fb9b81e 100644 --- a/chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc +++ b/chromium_src/chrome/browser/ui/views/frame/global_menu_bar_registrar_x11.cc @@ -65,7 +65,7 @@ GlobalMenuBarRegistrarX11::~GlobalMenuBarRegistrarX11() { void GlobalMenuBarRegistrarX11::RegisterXID(unsigned long xid) { DCHECK(registrar_proxy_); - std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid); + std::string path = electron::GlobalMenuBarX11::GetPathForWindow(xid); ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087 // TODO(erg): The mozilla implementation goes to a lot of callback trouble @@ -82,7 +82,7 @@ void GlobalMenuBarRegistrarX11::RegisterXID(unsigned long xid) { void GlobalMenuBarRegistrarX11::UnregisterXID(unsigned long xid) { DCHECK(registrar_proxy_); - std::string path = atom::GlobalMenuBarX11::GetPathForWindow(xid); + std::string path = electron::GlobalMenuBarX11::GetPathForWindow(xid); ANNOTATE_SCOPED_MEMORY_LEAK; // http://crbug.com/314087 // TODO(erg): The mozilla implementation goes to a lot of callback trouble diff --git a/shell/app/atom_content_client.cc b/shell/app/atom_content_client.cc index d11636b73a..296ee75737 100644 --- a/shell/app/atom_content_client.cc +++ b/shell/app/atom_content_client.cc @@ -34,7 +34,7 @@ #include "shell/common/atom_constants.h" #endif // BUILDFLAG(ENABLE_PDF_VIEWER) -namespace atom { +namespace electron { namespace { @@ -272,4 +272,4 @@ bool AtomContentClient::IsDataResourceGzipped(int resource_id) const { return ui::ResourceBundle::GetSharedInstance().IsGzipped(resource_id); } -} // namespace atom +} // namespace electron diff --git a/shell/app/atom_content_client.h b/shell/app/atom_content_client.h index f5f4528f38..a56e5a552c 100644 --- a/shell/app/atom_content_client.h +++ b/shell/app/atom_content_client.h @@ -11,7 +11,7 @@ #include "content/public/common/content_client.h" -namespace atom { +namespace electron { class AtomContentClient : public content::ContentClient { public: @@ -37,6 +37,6 @@ class AtomContentClient : public content::ContentClient { DISALLOW_COPY_AND_ASSIGN(AtomContentClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_APP_ATOM_CONTENT_CLIENT_H_ diff --git a/shell/app/atom_library_main.mm b/shell/app/atom_library_main.mm index 3474e95dbe..b53e296716 100644 --- a/shell/app/atom_library_main.mm +++ b/shell/app/atom_library_main.mm @@ -15,11 +15,11 @@ #include "shell/common/mac/main_application_bundle.h" int AtomMain(int argc, char* argv[]) { - atom::AtomMainDelegate delegate; + electron::AtomMainDelegate delegate; content::ContentMainParams params(&delegate); params.argc = argc; params.argv = const_cast(argv); - atom::AtomCommandLine::Init(argc, argv); + electron::AtomCommandLine::Init(argc, argv); return content::ContentMain(params); } @@ -28,11 +28,11 @@ int AtomInitializeICUandStartNode(int argc, char* argv[]) { base::AtExitManager atexit_manager; base::mac::ScopedNSAutoreleasePool pool; base::mac::SetOverrideFrameworkBundlePath( - atom::MainApplicationBundlePath() + electron::MainApplicationBundlePath() .Append("Contents") .Append("Frameworks") .Append(ELECTRON_PRODUCT_NAME " Framework.framework")); base::i18n::InitializeICU(); - return atom::NodeMain(argc, argv); + return electron::NodeMain(argc, argv); } #endif diff --git a/shell/app/atom_main.cc b/shell/app/atom_main.cc index f294704f2e..e58a68b016 100644 --- a/shell/app/atom_main.cc +++ b/shell/app/atom_main.cc @@ -125,7 +125,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { #endif #if BUILDFLAG(ENABLE_RUN_AS_NODE) - bool run_as_node = IsEnvSet(atom::kRunAsNode); + bool run_as_node = IsEnvSet(electron::kRunAsNode); #else bool run_as_node = false; #endif @@ -158,7 +158,7 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { if (run_as_node) { base::AtExitManager atexit_manager; base::i18n::InitializeICU(); - auto ret = atom::NodeMain(argv.size(), argv.data()); + auto ret = electron::NodeMain(argv.size(), argv.data()); std::for_each(argv.begin(), argv.end(), free); return ret; } @@ -171,17 +171,17 @@ int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t* cmd, int) { return crash_service::Main(&argv); } - if (!atom::CheckCommandLineArguments(arguments.argc, arguments.argv)) + if (!electron::CheckCommandLineArguments(arguments.argc, arguments.argv)) return -1; sandbox::SandboxInterfaceInfo sandbox_info = {0}; content::InitializeSandboxInfo(&sandbox_info); - atom::AtomMainDelegate delegate; + electron::AtomMainDelegate delegate; content::ContentMainParams params(&delegate); params.instance = instance; params.sandbox_info = &sandbox_info; - atom::AtomCommandLine::Init(arguments.argc, arguments.argv); + electron::AtomCommandLine::Init(arguments.argc, arguments.argv); return content::ContentMain(params); } @@ -191,18 +191,18 @@ int main(int argc, char* argv[]) { FixStdioStreams(); #if BUILDFLAG(ENABLE_RUN_AS_NODE) - if (IsEnvSet(atom::kRunAsNode)) { + if (IsEnvSet(electron::kRunAsNode)) { base::i18n::InitializeICU(); base::AtExitManager atexit_manager; - return atom::NodeMain(argc, argv); + return electron::NodeMain(argc, argv); } #endif - atom::AtomMainDelegate delegate; + electron::AtomMainDelegate delegate; content::ContentMainParams params(&delegate); params.argc = argc; params.argv = const_cast(argv); - atom::AtomCommandLine::Init(argc, argv); + electron::AtomCommandLine::Init(argc, argv); return content::ContentMain(params); } @@ -212,7 +212,7 @@ int main(int argc, char* argv[]) { FixStdioStreams(); #if BUILDFLAG(ENABLE_RUN_AS_NODE) - if (IsEnvSet(atom::kRunAsNode)) { + if (IsEnvSet(electron::kRunAsNode)) { return AtomInitializeICUandStartNode(argc, argv); } #endif diff --git a/shell/app/atom_main_delegate.cc b/shell/app/atom_main_delegate.cc index 1d5b224bc3..838ca9406f 100644 --- a/shell/app/atom_main_delegate.cc +++ b/shell/app/atom_main_delegate.cc @@ -48,7 +48,7 @@ #endif #endif -namespace atom { +namespace electron { namespace { @@ -326,4 +326,4 @@ bool AtomMainDelegate::ShouldCreateFeatureList() { return false; } -} // namespace atom +} // namespace electron diff --git a/shell/app/atom_main_delegate.h b/shell/app/atom_main_delegate.h index 0a1c9f392c..8b2e951395 100644 --- a/shell/app/atom_main_delegate.h +++ b/shell/app/atom_main_delegate.h @@ -11,7 +11,7 @@ #include "content/public/app/content_main_delegate.h" #include "content/public/common/content_client.h" -namespace atom { +namespace electron { void LoadResourceBundle(const std::string& locale); @@ -56,6 +56,6 @@ class AtomMainDelegate : public content::ContentMainDelegate { DISALLOW_COPY_AND_ASSIGN(AtomMainDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_APP_ATOM_MAIN_DELEGATE_H_ diff --git a/shell/app/atom_main_delegate_mac.h b/shell/app/atom_main_delegate_mac.h index 766ec316b7..ba49e2456e 100644 --- a/shell/app/atom_main_delegate_mac.h +++ b/shell/app/atom_main_delegate_mac.h @@ -5,11 +5,11 @@ #ifndef SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ #define SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ -namespace atom { +namespace electron { // Initializes NSApplication. void RegisterAtomCrApp(); -} // namespace atom +} // namespace electron #endif // SHELL_APP_ATOM_MAIN_DELEGATE_MAC_H_ diff --git a/shell/app/atom_main_delegate_mac.mm b/shell/app/atom_main_delegate_mac.mm index 5c5be9e7c3..4ca4f634da 100644 --- a/shell/app/atom_main_delegate_mac.mm +++ b/shell/app/atom_main_delegate_mac.mm @@ -18,7 +18,7 @@ #include "shell/common/application_info.h" #include "shell/common/mac/main_application_bundle.h" -namespace atom { +namespace electron { namespace { @@ -68,4 +68,4 @@ void RegisterAtomCrApp() { [AtomApplication sharedApplication]; } -} // namespace atom +} // namespace electron diff --git a/shell/app/command_line_args.cc b/shell/app/command_line_args.cc index 3a24af87e0..3dbc56c1e6 100644 --- a/shell/app/command_line_args.cc +++ b/shell/app/command_line_args.cc @@ -33,7 +33,7 @@ bool IsUrlArg(const base::CommandLine::CharType* arg) { } // namespace -namespace atom { +namespace electron { bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) { const base::CommandLine::StringType dashdash(2, '-'); @@ -50,4 +50,4 @@ bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv) { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/app/command_line_args.h b/shell/app/command_line_args.h index 6f416d916a..c7d0823497 100644 --- a/shell/app/command_line_args.h +++ b/shell/app/command_line_args.h @@ -7,10 +7,10 @@ #include "base/command_line.h" -namespace atom { +namespace electron { bool CheckCommandLineArguments(int argc, base::CommandLine::CharType** argv); -} // namespace atom +} // namespace electron #endif // SHELL_APP_COMMAND_LINE_ARGS_H_ diff --git a/shell/app/manifests.cc b/shell/app/manifests.cc index cb9b8d3494..adb7881fe7 100644 --- a/shell/app/manifests.cc +++ b/shell/app/manifests.cc @@ -5,7 +5,7 @@ #include "shell/app/manifests.h" #include "base/no_destructor.h" -#include "electron/atom/common/api/api.mojom.h" +#include "electron/shell/common/api/api.mojom.h" #include "printing/buildflags/buildflags.h" #include "services/proxy_resolver/public/cpp/manifest.h" #include "services/service_manager/public/cpp/manifest_builder.h" @@ -45,7 +45,7 @@ const service_manager::Manifest& GetElectronContentBrowserOverlayManifest() { .ExposeInterfaceFilterCapability_Deprecated( "navigation:frame", "renderer", service_manager::Manifest::InterfaceList< - atom::mojom::ElectronBrowser>()) + electron::mojom::ElectronBrowser>()) .Build()}; return *manifest; } diff --git a/shell/app/node_main.cc b/shell/app/node_main.cc index 64be627ef0..fb6afeb6c9 100644 --- a/shell/app/node_main.cc +++ b/shell/app/node_main.cc @@ -29,7 +29,7 @@ #include "shell/common/crash_reporter/crash_reporter_win.h" #endif -namespace atom { +namespace electron { int NodeMain(int argc, char* argv[]) { base::CommandLine::Init(argc, argv); @@ -130,4 +130,4 @@ int NodeMain(int argc, char* argv[]) { return exit_code; } -} // namespace atom +} // namespace electron diff --git a/shell/app/node_main.h b/shell/app/node_main.h index e1475284aa..e5168f51a3 100644 --- a/shell/app/node_main.h +++ b/shell/app/node_main.h @@ -5,10 +5,10 @@ #ifndef SHELL_APP_NODE_MAIN_H_ #define SHELL_APP_NODE_MAIN_H_ -namespace atom { +namespace electron { int NodeMain(int argc, char* argv[]); -} // namespace atom +} // namespace electron #endif // SHELL_APP_NODE_MAIN_H_ diff --git a/shell/app/uv_task_runner.cc b/shell/app/uv_task_runner.cc index fdc10a8dfc..8f7ea8498e 100644 --- a/shell/app/uv_task_runner.cc +++ b/shell/app/uv_task_runner.cc @@ -8,7 +8,7 @@ #include "base/stl_util.h" -namespace atom { +namespace electron { UvTaskRunner::UvTaskRunner(uv_loop_t* loop) : loop_(loop) {} @@ -57,4 +57,4 @@ void UvTaskRunner::OnClose(uv_handle_t* handle) { delete reinterpret_cast(handle); } -} // namespace atom +} // namespace electron diff --git a/shell/app/uv_task_runner.h b/shell/app/uv_task_runner.h index 8928cc54aa..e3abf385f7 100644 --- a/shell/app/uv_task_runner.h +++ b/shell/app/uv_task_runner.h @@ -12,7 +12,7 @@ #include "base/single_thread_task_runner.h" #include "uv.h" // NOLINT(build/include) -namespace atom { +namespace electron { // TaskRunner implementation that posts tasks into libuv's default loop. class UvTaskRunner : public base::SingleThreadTaskRunner { @@ -40,6 +40,6 @@ class UvTaskRunner : public base::SingleThreadTaskRunner { DISALLOW_COPY_AND_ASSIGN(UvTaskRunner); }; -} // namespace atom +} // namespace electron #endif // SHELL_APP_UV_TASK_RUNNER_H_ diff --git a/shell/browser/api/atom_api_app.cc b/shell/browser/api/atom_api_app.cc index bf0a2b0b2f..076f20f64e 100644 --- a/shell/browser/api/atom_api_app.cc +++ b/shell/browser/api/atom_api_app.cc @@ -64,23 +64,23 @@ #include "shell/browser/ui/cocoa/atom_bundle_mover.h" #endif -using atom::Browser; +using electron::Browser; namespace mate { #if defined(OS_WIN) template <> -struct Converter { +struct Converter { static v8::Local ToV8(v8::Isolate* isolate, - atom::ProcessIntegrityLevel value) { + electron::ProcessIntegrityLevel value) { switch (value) { - case atom::ProcessIntegrityLevel::Untrusted: + case electron::ProcessIntegrityLevel::Untrusted: return mate::StringToV8(isolate, "untrusted"); - case atom::ProcessIntegrityLevel::Low: + case electron::ProcessIntegrityLevel::Low: return mate::StringToV8(isolate, "low"); - case atom::ProcessIntegrityLevel::Medium: + case electron::ProcessIntegrityLevel::Medium: return mate::StringToV8(isolate, "medium"); - case atom::ProcessIntegrityLevel::High: + case electron::ProcessIntegrityLevel::High: return mate::StringToV8(isolate, "high"); default: return mate::StringToV8(isolate, "unknown"); @@ -109,9 +109,9 @@ struct Converter { } }; -using atom::JumpListCategory; -using atom::JumpListItem; -using atom::JumpListResult; +using electron::JumpListCategory; +using electron::JumpListItem; +using electron::JumpListResult; template <> struct Converter { @@ -374,7 +374,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -547,7 +547,7 @@ App::App(v8::Isolate* isolate) { content::GpuDataManager::GetInstance()->AddObserver(this); base::ProcessId pid = base::GetCurrentProcId(); - auto process_metric = std::make_unique( + auto process_metric = std::make_unique( content::PROCESS_TYPE_BROWSER, base::GetCurrentProcessHandle(), base::ProcessMetrics::CreateCurrentProcessMetrics()); app_metrics_[pid] = std::move(process_metric); @@ -828,7 +828,7 @@ void App::ChildProcessLaunched(int process_type, base::ProcessHandle handle) { #else auto metrics = base::ProcessMetrics::CreateProcessMetrics(handle); #endif - app_metrics_[pid] = std::make_unique( + app_metrics_[pid] = std::make_unique( process_type, handle, std::move(metrics)); } @@ -998,7 +998,7 @@ bool App::Relaunch(mate::Arguments* js_args) { } if (!override_argv) { - const relauncher::StringVector& argv = atom::AtomCommandLine::argv(); + const relauncher::StringVector& argv = electron::AtomCommandLine::argv(); return relauncher::RelaunchApp(argv); } @@ -1327,7 +1327,7 @@ int DockBounce(const std::string& type) { return request_id; } -void DockSetMenu(atom::api::Menu* menu) { +void DockSetMenu(electron::api::Menu* menu) { Browser::Get()->DockSetMenu(menu->model()); } @@ -1500,7 +1500,7 @@ void App::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -1510,10 +1510,10 @@ void Initialize(v8::Local exports, void* priv) { v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary dict(isolate, exports); - dict.Set("App", atom::api::App::GetConstructor(isolate) + dict.Set("App", electron::api::App::GetConstructor(isolate) ->GetFunction(context) .ToLocalChecked()); - dict.Set("app", atom::api::App::Create(isolate)); + dict.Set("app", electron::api::App::Create(isolate)); } } // namespace diff --git a/shell/browser/api/atom_api_app.h b/shell/browser/api/atom_api_app.h index 07725980de..df07c14bf3 100644 --- a/shell/browser/api/atom_api_app.h +++ b/shell/browser/api/atom_api_app.h @@ -42,7 +42,7 @@ namespace mate { class Arguments; } // namespace mate -namespace atom { +namespace electron { #if defined(OS_WIN) enum class JumpListResult : int; @@ -236,7 +236,8 @@ class App : public AtomBrowserClient::Delegate, base::FilePath app_path_; using ProcessMetricMap = - std::unordered_map>; + std::unordered_map>; ProcessMetricMap app_metrics_; DISALLOW_COPY_AND_ASSIGN(App); @@ -244,6 +245,6 @@ class App : public AtomBrowserClient::Delegate, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_APP_H_ diff --git a/shell/browser/api/atom_api_app_mac.mm b/shell/browser/api/atom_api_app_mac.mm index 69df58ebca..e74a765a5d 100644 --- a/shell/browser/api/atom_api_app_mac.mm +++ b/shell/browser/api/atom_api_app_mac.mm @@ -9,7 +9,7 @@ #import -namespace atom { +namespace electron { namespace api { @@ -35,4 +35,4 @@ void App::SetAppLogsPath(mate::Arguments* args) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_app_mas.mm b/shell/browser/api/atom_api_app_mas.mm index 302f6c2254..381074fc24 100644 --- a/shell/browser/api/atom_api_app_mas.mm +++ b/shell/browser/api/atom_api_app_mas.mm @@ -10,7 +10,7 @@ #include "base/strings/sys_string_conversions.h" -namespace atom { +namespace electron { namespace api { @@ -63,4 +63,4 @@ base::RepeatingCallback App::StartAccessingSecurityScopedResource( } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_auto_updater.cc b/shell/browser/api/atom_api_auto_updater.cc index a3712286de..9a0a4ab21d 100644 --- a/shell/browser/api/atom_api_auto_updater.cc +++ b/shell/browser/api/atom_api_auto_updater.cc @@ -31,7 +31,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -141,11 +141,11 @@ void AutoUpdater::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::AutoUpdater; +using electron::api::AutoUpdater; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_auto_updater.h b/shell/browser/api/atom_api_auto_updater.h index 40e048e674..ab361cf663 100644 --- a/shell/browser/api/atom_api_auto_updater.h +++ b/shell/browser/api/atom_api_auto_updater.h @@ -13,7 +13,7 @@ #include "shell/browser/auto_updater.h" #include "shell/browser/window_list_observer.h" -namespace atom { +namespace electron { namespace api { @@ -56,6 +56,6 @@ class AutoUpdater : public mate::EventEmitter, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_AUTO_UPDATER_H_ diff --git a/shell/browser/api/atom_api_browser_view.cc b/shell/browser/api/atom_api_browser_view.cc index 9c4d418126..c9c9cba9b8 100644 --- a/shell/browser/api/atom_api_browser_view.cc +++ b/shell/browser/api/atom_api_browser_view.cc @@ -19,10 +19,10 @@ namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::AutoResizeFlags* auto_resize_flags) { + electron::AutoResizeFlags* auto_resize_flags) { mate::Dictionary params; if (!ConvertFromV8(isolate, val, ¶ms)) { return false; @@ -31,29 +31,29 @@ struct Converter { uint8_t flags = 0; bool width = false; if (params.Get("width", &width) && width) { - flags |= atom::kAutoResizeWidth; + flags |= electron::kAutoResizeWidth; } bool height = false; if (params.Get("height", &height) && height) { - flags |= atom::kAutoResizeHeight; + flags |= electron::kAutoResizeHeight; } bool horizontal = false; if (params.Get("horizontal", &horizontal) && horizontal) { - flags |= atom::kAutoResizeHorizontal; + flags |= electron::kAutoResizeHorizontal; } bool vertical = false; if (params.Get("vertical", &vertical) && vertical) { - flags |= atom::kAutoResizeVertical; + flags |= electron::kAutoResizeVertical; } - *auto_resize_flags = static_cast(flags); + *auto_resize_flags = static_cast(flags); return true; } }; } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -154,11 +154,11 @@ void BrowserView::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::BrowserView; +using electron::api::BrowserView; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_browser_view.h b/shell/browser/api/atom_api_browser_view.h index 5ed8be71c9..85398536ad 100644 --- a/shell/browser/api/atom_api_browser_view.h +++ b/shell/browser/api/atom_api_browser_view.h @@ -22,7 +22,7 @@ class Arguments; class Dictionary; } // namespace mate -namespace atom { +namespace electron { class NativeBrowserView; @@ -73,6 +73,6 @@ class BrowserView : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_BROWSER_VIEW_H_ diff --git a/shell/browser/api/atom_api_browser_window.cc b/shell/browser/api/atom_api_browser_window.cc index 856e697022..01e3ab0ab3 100644 --- a/shell/browser/api/atom_api_browser_window.cc +++ b/shell/browser/api/atom_api_browser_window.cc @@ -25,7 +25,7 @@ #include "shell/common/options_switches.h" #include "ui/gl/gpu_switching_manager.h" -namespace atom { +namespace electron { namespace api { @@ -456,12 +456,12 @@ v8::Local BrowserWindow::From(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::BrowserWindow; -using atom::api::TopLevelWindow; +using electron::api::BrowserWindow; +using electron::api::TopLevelWindow; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_browser_window.h b/shell/browser/api/atom_api_browser_window.h index a266c334f2..a979bc55be 100644 --- a/shell/browser/api/atom_api_browser_window.h +++ b/shell/browser/api/atom_api_browser_window.h @@ -13,7 +13,7 @@ #include "shell/browser/api/atom_api_top_level_window.h" #include "shell/browser/api/atom_api_web_contents.h" -namespace atom { +namespace electron { namespace api { @@ -125,6 +125,6 @@ class BrowserWindow : public TopLevelWindow, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_BROWSER_WINDOW_H_ diff --git a/shell/browser/api/atom_api_browser_window_mac.mm b/shell/browser/api/atom_api_browser_window_mac.mm index ec8e6f0f91..6ff670738e 100644 --- a/shell/browser/api/atom_api_browser_window_mac.mm +++ b/shell/browser/api/atom_api_browser_window_mac.mm @@ -33,7 +33,7 @@ @end -namespace atom { +namespace electron { namespace api { @@ -137,4 +137,4 @@ void BrowserWindow::UpdateDraggableRegions( } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_browser_window_views.cc b/shell/browser/api/atom_api_browser_window_views.cc index 569d0704c2..be5bbecf29 100644 --- a/shell/browser/api/atom_api_browser_window_views.cc +++ b/shell/browser/api/atom_api_browser_window_views.cc @@ -6,7 +6,7 @@ #include "shell/browser/native_window_views.h" -namespace atom { +namespace electron { namespace api { @@ -20,4 +20,4 @@ void BrowserWindow::UpdateDraggableRegions( } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_content_tracing.cc b/shell/browser/api/atom_api_content_tracing.cc index f3f376e572..62f603de04 100644 --- a/shell/browser/api/atom_api_content_tracing.cc +++ b/shell/browser/api/atom_api_content_tracing.cc @@ -64,13 +64,14 @@ base::Optional CreateTemporaryFileOnIO() { return base::make_optional(std::move(temp_file_path)); } -void StopTracing(atom::util::Promise promise, +void StopTracing(electron::util::Promise promise, base::Optional file_path) { if (file_path) { auto endpoint = TracingController::CreateFileEndpoint( - *file_path, base::AdaptCallbackForRepeating(base::BindOnce( - &atom::util::Promise::ResolvePromise, - std::move(promise), *file_path))); + *file_path, + base::AdaptCallbackForRepeating(base::BindOnce( + &electron::util::Promise::ResolvePromise, + std::move(promise), *file_path))); TracingController::GetInstance()->StopTracing(endpoint); } else { promise.RejectWithErrorMessage( @@ -79,7 +80,7 @@ void StopTracing(atom::util::Promise promise, } v8::Local StopRecording(mate::Arguments* args) { - atom::util::Promise promise(args->isolate()); + electron::util::Promise promise(args->isolate()); v8::Local handle = promise.GetHandle(); base::FilePath path; @@ -97,12 +98,12 @@ v8::Local StopRecording(mate::Arguments* args) { } v8::Local GetCategories(v8::Isolate* isolate) { - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); // Note: This method always succeeds. TracingController::GetInstance()->GetCategories(base::BindOnce( - atom::util::Promise::ResolvePromise&>, + electron::util::Promise::ResolvePromise&>, std::move(promise))); return handle; @@ -111,22 +112,23 @@ v8::Local GetCategories(v8::Isolate* isolate) { v8::Local StartTracing( v8::Isolate* isolate, const base::trace_event::TraceConfig& trace_config) { - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); if (!TracingController::GetInstance()->StartTracing( - trace_config, base::BindOnce(atom::util::Promise::ResolveEmptyPromise, - std::move(promise)))) { + trace_config, + base::BindOnce(electron::util::Promise::ResolveEmptyPromise, + std::move(promise)))) { // If StartTracing returns false, that means it didn't invoke its callback. // Return an already-resolved promise and abandon the previous promise (it // was std::move()d into the StartTracing callback and has been deleted by // this point). - return atom::util::Promise::ResolvedPromise(isolate); + return electron::util::Promise::ResolvedPromise(isolate); } return handle; } -void OnTraceBufferUsageAvailable(atom::util::Promise promise, +void OnTraceBufferUsageAvailable(electron::util::Promise promise, float percent_full, size_t approximate_count) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); @@ -137,7 +139,7 @@ void OnTraceBufferUsageAvailable(atom::util::Promise promise, } v8::Local GetTraceBufferUsage(v8::Isolate* isolate) { - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); // Note: This method always succeeds. diff --git a/shell/browser/api/atom_api_cookies.cc b/shell/browser/api/atom_api_cookies.cc index 344df2cec1..ec7b0618d0 100644 --- a/shell/browser/api/atom_api_cookies.cc +++ b/shell/browser/api/atom_api_cookies.cc @@ -74,7 +74,7 @@ struct Converter { } // namespace gin -namespace atom { +namespace electron { namespace api { @@ -343,4 +343,4 @@ void Cookies::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_cookies.h b/shell/browser/api/atom_api_cookies.h index 3c46f45557..bc273db963 100644 --- a/shell/browser/api/atom_api_cookies.h +++ b/shell/browser/api/atom_api_cookies.h @@ -23,7 +23,7 @@ namespace net { class URLRequestContextGetter; } -namespace atom { +namespace electron { class AtomBrowserContext; @@ -60,6 +60,6 @@ class Cookies : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_COOKIES_H_ diff --git a/shell/browser/api/atom_api_debugger.cc b/shell/browser/api/atom_api_debugger.cc index 285828f217..e8f3d4fdef 100644 --- a/shell/browser/api/atom_api_debugger.cc +++ b/shell/browser/api/atom_api_debugger.cc @@ -19,7 +19,7 @@ using content::DevToolsAgentHost; -namespace atom { +namespace electron { namespace api { @@ -65,7 +65,7 @@ void Debugger::DispatchProtocolMessage(DevToolsAgentHost* agent_host, if (it == pending_requests_.end()) return; - atom::util::Promise promise = std::move(it->second); + electron::util::Promise promise = std::move(it->second); pending_requests_.erase(it); base::DictionaryValue* error = nullptr; @@ -129,7 +129,7 @@ void Debugger::Detach() { } v8::Local Debugger::SendCommand(mate::Arguments* args) { - atom::util::Promise promise(isolate()); + electron::util::Promise promise(isolate()); v8::Local handle = promise.GetHandle(); if (!agent_host_) { @@ -186,11 +186,11 @@ void Debugger::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Debugger; +using electron::api::Debugger; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_debugger.h b/shell/browser/api/atom_api_debugger.h index 18f5a5a515..1d921cf2cb 100644 --- a/shell/browser/api/atom_api_debugger.h +++ b/shell/browser/api/atom_api_debugger.h @@ -25,7 +25,7 @@ namespace mate { class Arguments; } -namespace atom { +namespace electron { namespace api { @@ -54,7 +54,7 @@ class Debugger : public mate::TrackableObject, content::RenderFrameHost* new_rfh) override; private: - using PendingRequestMap = std::map; + using PendingRequestMap = std::map; void Attach(mate::Arguments* args); bool IsAttached(); @@ -73,6 +73,6 @@ class Debugger : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_DEBUGGER_H_ diff --git a/shell/browser/api/atom_api_desktop_capturer.cc b/shell/browser/api/atom_api_desktop_capturer.cc index 88cef42884..fc92c6d9fb 100644 --- a/shell/browser/api/atom_api_desktop_capturer.cc +++ b/shell/browser/api/atom_api_desktop_capturer.cc @@ -30,22 +30,22 @@ namespace mate { template <> -struct Converter { +struct Converter { static v8::Local ToV8( v8::Isolate* isolate, - const atom::api::DesktopCapturer::Source& source) { + const electron::api::DesktopCapturer::Source& source) { mate::Dictionary dict(isolate, v8::Object::New(isolate)); content::DesktopMediaID id = source.media_list_source.id; dict.Set("name", base::UTF16ToUTF8(source.media_list_source.name)); dict.Set("id", id.ToString()); dict.Set("thumbnail", - atom::api::NativeImage::Create( + electron::api::NativeImage::Create( isolate, gfx::Image(source.media_list_source.thumbnail))); dict.Set("display_id", source.display_id); if (source.fetch_icon) { dict.Set( "appIcon", - atom::api::NativeImage::Create( + electron::api::NativeImage::Create( isolate, gfx::Image(GetWindowIcon(source.media_list_source.id)))); } return ConvertToV8(isolate, dict); @@ -54,7 +54,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -216,7 +216,7 @@ void DesktopCapturer::BuildPrototype( } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -226,7 +226,8 @@ void Initialize(v8::Local exports, void* priv) { v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary dict(isolate, exports); - dict.SetMethod("createDesktopCapturer", &atom::api::DesktopCapturer::Create); + dict.SetMethod("createDesktopCapturer", + &electron::api::DesktopCapturer::Create); } } // namespace diff --git a/shell/browser/api/atom_api_desktop_capturer.h b/shell/browser/api/atom_api_desktop_capturer.h index af7a141bea..72b2ff0cf9 100644 --- a/shell/browser/api/atom_api_desktop_capturer.h +++ b/shell/browser/api/atom_api_desktop_capturer.h @@ -14,7 +14,7 @@ #include "native_mate/handle.h" #include "shell/browser/api/trackable_object.h" -namespace atom { +namespace electron { namespace api { @@ -73,6 +73,6 @@ class DesktopCapturer : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_DESKTOP_CAPTURER_H_ diff --git a/shell/browser/api/atom_api_dialog.cc b/shell/browser/api/atom_api_dialog.cc index b5bec17839..c9dd53ace6 100644 --- a/shell/browser/api/atom_api_dialog.cc +++ b/shell/browser/api/atom_api_dialog.cc @@ -23,11 +23,11 @@ namespace { -int ShowMessageBoxSync(const atom::MessageBoxSettings& settings) { - return atom::ShowMessageBoxSync(settings); +int ShowMessageBoxSync(const electron::MessageBoxSettings& settings) { + return electron::ShowMessageBoxSync(settings); } -void ResolvePromiseObject(atom::util::Promise promise, +void ResolvePromiseObject(electron::util::Promise promise, int result, bool checkbox_checked) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); @@ -38,13 +38,14 @@ void ResolvePromiseObject(atom::util::Promise promise, promise.Resolve(dict.GetHandle()); } -v8::Local ShowMessageBox(const atom::MessageBoxSettings& settings, - mate::Arguments* args) { +v8::Local ShowMessageBox( + const electron::MessageBoxSettings& settings, + mate::Arguments* args) { v8::Isolate* isolate = args->isolate(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); - atom::ShowMessageBox( + electron::ShowMessageBox( settings, base::BindOnce(&ResolvePromiseObject, std::move(promise))); return handle; @@ -60,7 +61,7 @@ void ShowOpenDialogSync(const file_dialog::DialogSettings& settings, v8::Local ShowOpenDialog( const file_dialog::DialogSettings& settings, mate::Arguments* args) { - atom::util::Promise promise(args->isolate()); + electron::util::Promise promise(args->isolate()); v8::Local handle = promise.GetHandle(); file_dialog::ShowOpenDialog(settings, std::move(promise)); return handle; @@ -76,7 +77,7 @@ void ShowSaveDialogSync(const file_dialog::DialogSettings& settings, v8::Local ShowSaveDialog( const file_dialog::DialogSettings& settings, mate::Arguments* args) { - atom::util::Promise promise(args->isolate()); + electron::util::Promise promise(args->isolate()); v8::Local handle = promise.GetHandle(); file_dialog::ShowSaveDialog(settings, std::move(promise)); @@ -90,7 +91,7 @@ void Initialize(v8::Local exports, mate::Dictionary dict(context->GetIsolate(), exports); dict.SetMethod("showMessageBoxSync", &ShowMessageBoxSync); dict.SetMethod("showMessageBox", &ShowMessageBox); - dict.SetMethod("showErrorBox", &atom::ShowErrorBox); + dict.SetMethod("showErrorBox", &electron::ShowErrorBox); dict.SetMethod("showOpenDialogSync", &ShowOpenDialogSync); dict.SetMethod("showOpenDialog", &ShowOpenDialog); dict.SetMethod("showSaveDialogSync", &ShowSaveDialogSync); diff --git a/shell/browser/api/atom_api_download_item.cc b/shell/browser/api/atom_api_download_item.cc index 2f19a08ca3..be5d43d362 100644 --- a/shell/browser/api/atom_api_download_item.cc +++ b/shell/browser/api/atom_api_download_item.cc @@ -47,7 +47,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -233,7 +233,7 @@ mate::Handle DownloadItem::Create(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -243,7 +243,7 @@ void Initialize(v8::Local exports, void* priv) { v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary(isolate, exports) - .Set("DownloadItem", atom::api::DownloadItem::GetConstructor(isolate) + .Set("DownloadItem", electron::api::DownloadItem::GetConstructor(isolate) ->GetFunction(context) .ToLocalChecked()); } diff --git a/shell/browser/api/atom_api_download_item.h b/shell/browser/api/atom_api_download_item.h index e658846050..e2310e5666 100644 --- a/shell/browser/api/atom_api_download_item.h +++ b/shell/browser/api/atom_api_download_item.h @@ -15,7 +15,7 @@ #include "shell/browser/ui/file_dialog.h" #include "url/gurl.h" -namespace atom { +namespace electron { namespace api { @@ -69,6 +69,6 @@ class DownloadItem : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_DOWNLOAD_ITEM_H_ diff --git a/shell/browser/api/atom_api_global_shortcut.cc b/shell/browser/api/atom_api_global_shortcut.cc index 3c6ddc1934..7cfc821ae2 100644 --- a/shell/browser/api/atom_api_global_shortcut.cc +++ b/shell/browser/api/atom_api_global_shortcut.cc @@ -33,7 +33,7 @@ bool RegisteringMediaKeyForUntrustedClient(const ui::Accelerator& accelerator) { if (std::find(std::begin(mediaKeys), std::end(mediaKeys), accelerator.key_code()) != std::end(mediaKeys)) { bool trusted = - atom::api::SystemPreferences::IsTrustedAccessibilityClient(false); + electron::api::SystemPreferences::IsTrustedAccessibilityClient(false); if (!trusted) return true; } @@ -44,7 +44,7 @@ bool RegisteringMediaKeyForUntrustedClient(const ui::Accelerator& accelerator) { } // namespace -namespace atom { +namespace electron { namespace api { @@ -150,7 +150,7 @@ void GlobalShortcut::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -160,7 +160,7 @@ void Initialize(v8::Local exports, void* priv) { v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary dict(isolate, exports); - dict.Set("globalShortcut", atom::api::GlobalShortcut::Create(isolate)); + dict.Set("globalShortcut", electron::api::GlobalShortcut::Create(isolate)); } } // namespace diff --git a/shell/browser/api/atom_api_global_shortcut.h b/shell/browser/api/atom_api_global_shortcut.h index ec580dcf15..456a554524 100644 --- a/shell/browser/api/atom_api_global_shortcut.h +++ b/shell/browser/api/atom_api_global_shortcut.h @@ -15,7 +15,7 @@ #include "shell/browser/api/trackable_object.h" #include "ui/base/accelerators/accelerator.h" -namespace atom { +namespace electron { namespace api { @@ -53,6 +53,6 @@ class GlobalShortcut : public extensions::GlobalShortcutListener::Observer, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_GLOBAL_SHORTCUT_H_ diff --git a/shell/browser/api/atom_api_in_app_purchase.cc b/shell/browser/api/atom_api_in_app_purchase.cc index 6c3c0b72f7..914a1bb722 100644 --- a/shell/browser/api/atom_api_in_app_purchase.cc +++ b/shell/browser/api/atom_api_in_app_purchase.cc @@ -69,7 +69,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -104,7 +104,7 @@ v8::Local InAppPurchase::PurchaseProduct( const std::string& product_id, mate::Arguments* args) { v8::Isolate* isolate = args->isolate(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); int quantity = 1; @@ -112,7 +112,7 @@ v8::Local InAppPurchase::PurchaseProduct( in_app_purchase::PurchaseProduct( product_id, quantity, - base::BindOnce(atom::util::Promise::ResolvePromise, + base::BindOnce(electron::util::Promise::ResolvePromise, std::move(promise))); return handle; @@ -122,11 +122,11 @@ v8::Local InAppPurchase::GetProducts( const std::vector& productIDs, mate::Arguments* args) { v8::Isolate* isolate = args->isolate(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); in_app_purchase::GetProducts( - productIDs, base::BindOnce(atom::util::Promise::ResolvePromise< + productIDs, base::BindOnce(electron::util::Promise::ResolvePromise< std::vector>, std::move(promise))); @@ -141,11 +141,11 @@ void InAppPurchase::OnTransactionsUpdated( } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::InAppPurchase; +using electron::api::InAppPurchase; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_in_app_purchase.h b/shell/browser/api/atom_api_in_app_purchase.h index f595f26a2c..3e42673f8d 100644 --- a/shell/browser/api/atom_api_in_app_purchase.h +++ b/shell/browser/api/atom_api_in_app_purchase.h @@ -15,7 +15,7 @@ #include "shell/browser/mac/in_app_purchase_product.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { namespace api { @@ -47,6 +47,6 @@ class InAppPurchase : public mate::EventEmitter, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_IN_APP_PURCHASE_H_ diff --git a/shell/browser/api/atom_api_menu.cc b/shell/browser/api/atom_api_menu.cc index 8af1344100..017430c2de 100644 --- a/shell/browser/api/atom_api_menu.cc +++ b/shell/browser/api/atom_api_menu.cc @@ -14,7 +14,7 @@ #include "shell/common/native_mate_converters/string16_converter.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -230,11 +230,11 @@ void Menu::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Menu; +using electron::api::Menu; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_menu.h b/shell/browser/api/atom_api_menu.h index 10530138ef..351ce2e185 100644 --- a/shell/browser/api/atom_api_menu.h +++ b/shell/browser/api/atom_api_menu.h @@ -13,7 +13,7 @@ #include "shell/browser/api/trackable_object.h" #include "shell/browser/ui/atom_menu_model.h" -namespace atom { +namespace electron { namespace api { @@ -117,23 +117,23 @@ class Menu : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::AtomMenuModel** out) { + electron::AtomMenuModel** out) { // null would be tranfered to NULL. if (val->IsNull()) { *out = nullptr; return true; } - atom::api::Menu* menu; - if (!Converter::FromV8(isolate, val, &menu)) + electron::api::Menu* menu; + if (!Converter::FromV8(isolate, val, &menu)) return false; *out = menu->model(); return true; diff --git a/shell/browser/api/atom_api_menu_mac.h b/shell/browser/api/atom_api_menu_mac.h index 68130495e9..67c3b9d9ff 100644 --- a/shell/browser/api/atom_api_menu_mac.h +++ b/shell/browser/api/atom_api_menu_mac.h @@ -14,7 +14,7 @@ using base::scoped_nsobject; -namespace atom { +namespace electron { namespace api { @@ -53,6 +53,6 @@ class MenuMac : public Menu { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_MENU_MAC_H_ diff --git a/shell/browser/api/atom_api_menu_mac.mm b/shell/browser/api/atom_api_menu_mac.mm index 987de24143..021d4bb708 100644 --- a/shell/browser/api/atom_api_menu_mac.mm +++ b/shell/browser/api/atom_api_menu_mac.mm @@ -26,7 +26,7 @@ static scoped_nsobject applicationMenu_; } // namespace -namespace atom { +namespace electron { namespace api { @@ -112,7 +112,7 @@ void MenuMac::PopupOnUI(const base::WeakPtr& native_window, base::mac::ScopedSendingEvent sendingEventScoper; // Don't emit unresponsive event when showing menu. - atom::UnresponsiveSuppressor suppressor; + electron::UnresponsiveSuppressor suppressor; [menu popUpMenuPositioningItem:item atLocation:position inView:view]; } @@ -172,4 +172,4 @@ mate::WrappableBase* Menu::New(mate::Arguments* args) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_menu_views.cc b/shell/browser/api/atom_api_menu_views.cc index f9b89a3cde..406526c0fe 100644 --- a/shell/browser/api/atom_api_menu_views.cc +++ b/shell/browser/api/atom_api_menu_views.cc @@ -12,7 +12,7 @@ using views::MenuRunner; -namespace atom { +namespace electron { namespace api { @@ -42,7 +42,7 @@ void MenuViews::PopupAt(TopLevelWindow* window, int flags = MenuRunner::CONTEXT_MENU | MenuRunner::HAS_MNEMONICS; // Don't emit unresponsive event when showing menu. - atom::UnresponsiveSuppressor suppressor; + electron::UnresponsiveSuppressor suppressor; // Show the menu. int32_t window_id = window->weak_map_id(); @@ -81,4 +81,4 @@ mate::WrappableBase* Menu::New(mate::Arguments* args) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_menu_views.h b/shell/browser/api/atom_api_menu_views.h index 329dad6f44..30744e2d8a 100644 --- a/shell/browser/api/atom_api_menu_views.h +++ b/shell/browser/api/atom_api_menu_views.h @@ -13,7 +13,7 @@ #include "ui/display/screen.h" #include "ui/views/controls/menu/menu_runner.h" -namespace atom { +namespace electron { namespace api { @@ -43,6 +43,6 @@ class MenuViews : public Menu { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_MENU_VIEWS_H_ diff --git a/shell/browser/api/atom_api_net.cc b/shell/browser/api/atom_api_net.cc index 2b90711249..3282f3f44a 100644 --- a/shell/browser/api/atom_api_net.cc +++ b/shell/browser/api/atom_api_net.cc @@ -7,7 +7,7 @@ #include "shell/browser/api/atom_api_url_request.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -38,12 +38,12 @@ v8::Local Net::URLRequest(v8::Isolate* isolate) { } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Net; -using atom::api::URLRequest; +using electron::api::Net; +using electron::api::URLRequest; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_net.h b/shell/browser/api/atom_api_net.h index 67b10798fd..19fdc6ab7c 100644 --- a/shell/browser/api/atom_api_net.h +++ b/shell/browser/api/atom_api_net.h @@ -7,7 +7,7 @@ #include "shell/browser/api/event_emitter.h" -namespace atom { +namespace electron { namespace api { @@ -30,6 +30,6 @@ class Net : public mate::EventEmitter { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_NET_H_ diff --git a/shell/browser/api/atom_api_net_log.cc b/shell/browser/api/atom_api_net_log.cc index d30a59c459..c27413455c 100644 --- a/shell/browser/api/atom_api_net_log.cc +++ b/shell/browser/api/atom_api_net_log.cc @@ -20,7 +20,7 @@ #include "shell/common/native_mate_converters/file_path_converter.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace { @@ -187,4 +187,4 @@ void NetLog::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_net_log.h b/shell/browser/api/atom_api_net_log.h index e170c318a2..8a3262a5d9 100644 --- a/shell/browser/api/atom_api_net_log.h +++ b/shell/browser/api/atom_api_net_log.h @@ -17,7 +17,7 @@ #include "shell/browser/api/trackable_object.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -63,6 +63,6 @@ class NetLog : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_NET_LOG_H_ diff --git a/shell/browser/api/atom_api_notification.cc b/shell/browser/api/atom_api_notification.cc index 75f72fe1ce..10d4b6eaec 100644 --- a/shell/browser/api/atom_api_notification.cc +++ b/shell/browser/api/atom_api_notification.cc @@ -20,10 +20,10 @@ namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::NotificationAction* out) { + electron::NotificationAction* out) { mate::Dictionary dict; if (!ConvertFromV8(isolate, val, &dict)) return false; @@ -36,7 +36,7 @@ struct Converter { } static v8::Local ToV8(v8::Isolate* isolate, - atom::NotificationAction val) { + electron::NotificationAction val) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); dict.Set("text", val.text); dict.Set("type", val.type); @@ -45,7 +45,7 @@ struct Converter { }; } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -118,7 +118,7 @@ base::string16 Notification::GetSound() const { return sound_; } -std::vector Notification::GetActions() const { +std::vector Notification::GetActions() const { return actions_; } @@ -156,7 +156,7 @@ void Notification::SetSound(const base::string16& new_sound) { } void Notification::SetActions( - const std::vector& actions) { + const std::vector& actions) { actions_ = actions; } @@ -199,7 +199,7 @@ void Notification::Show() { if (presenter_) { notification_ = presenter_->CreateNotification(this, base::GenerateGUID()); if (notification_) { - atom::NotificationOptions options; + electron::NotificationOptions options; options.title = title_; options.subtitle = subtitle_; options.msg = body_; @@ -247,11 +247,11 @@ void Notification::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Notification; +using electron::api::Notification; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_notification.h b/shell/browser/api/atom_api_notification.h index 014eb9080f..eea76adc6b 100644 --- a/shell/browser/api/atom_api_notification.h +++ b/shell/browser/api/atom_api_notification.h @@ -17,7 +17,7 @@ #include "shell/browser/notifications/notification_presenter.h" #include "ui/gfx/image/image.h" -namespace atom { +namespace electron { namespace api { @@ -55,7 +55,7 @@ class Notification : public mate::TrackableObject, bool GetHasReply() const; base::string16 GetReplyPlaceholder() const; base::string16 GetSound() const; - std::vector GetActions() const; + std::vector GetActions() const; base::string16 GetCloseButtonText() const; // Prop Setters @@ -66,7 +66,7 @@ class Notification : public mate::TrackableObject, void SetHasReply(bool new_has_reply); void SetReplyPlaceholder(const base::string16& new_reply_placeholder); void SetSound(const base::string16& sound); - void SetActions(const std::vector& actions); + void SetActions(const std::vector& actions); void SetCloseButtonText(const base::string16& text); private: @@ -80,18 +80,18 @@ class Notification : public mate::TrackableObject, bool has_reply_ = false; base::string16 reply_placeholder_; base::string16 sound_; - std::vector actions_; + std::vector actions_; base::string16 close_button_text_; - atom::NotificationPresenter* presenter_; + electron::NotificationPresenter* presenter_; - base::WeakPtr notification_; + base::WeakPtr notification_; DISALLOW_COPY_AND_ASSIGN(Notification); }; } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_NOTIFICATION_H_ diff --git a/shell/browser/api/atom_api_power_monitor.cc b/shell/browser/api/atom_api_power_monitor.cc index 1f5af9bd72..224e39c0ff 100644 --- a/shell/browser/api/atom_api_power_monitor.cc +++ b/shell/browser/api/atom_api_power_monitor.cc @@ -31,7 +31,7 @@ struct Converter { }; } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -128,11 +128,11 @@ void PowerMonitor::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::PowerMonitor; +using electron::api::PowerMonitor; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_power_monitor.h b/shell/browser/api/atom_api_power_monitor.h index 95f937c6aa..075e7d6943 100644 --- a/shell/browser/api/atom_api_power_monitor.h +++ b/shell/browser/api/atom_api_power_monitor.h @@ -11,7 +11,7 @@ #include "shell/browser/lib/power_observer.h" #include "ui/base/idle/idle.h" -namespace atom { +namespace electron { namespace api { @@ -76,6 +76,6 @@ class PowerMonitor : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_POWER_MONITOR_H_ diff --git a/shell/browser/api/atom_api_power_monitor_mac.mm b/shell/browser/api/atom_api_power_monitor_mac.mm index 4b78756d20..e34f68efad 100644 --- a/shell/browser/api/atom_api_power_monitor_mac.mm +++ b/shell/browser/api/atom_api_power_monitor_mac.mm @@ -11,10 +11,10 @@ @interface MacLockMonitor : NSObject { @private - std::vector emitters; + std::vector emitters; } -- (void)addEmitter:(atom::api::PowerMonitor*)monitor_; +- (void)addEmitter:(electron::api::PowerMonitor*)monitor_; @end @@ -41,7 +41,7 @@ [super dealloc]; } -- (void)addEmitter:(atom::api::PowerMonitor*)monitor_ { +- (void)addEmitter:(electron::api::PowerMonitor*)monitor_ { self->emitters.push_back(monitor_); } @@ -59,7 +59,7 @@ @end -namespace atom { +namespace electron { namespace api { @@ -73,4 +73,4 @@ void PowerMonitor::InitPlatformSpecificMonitors() { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_power_monitor_win.cc b/shell/browser/api/atom_api_power_monitor_win.cc index 264d620886..ad85edddc6 100644 --- a/shell/browser/api/atom_api_power_monitor_win.cc +++ b/shell/browser/api/atom_api_power_monitor_win.cc @@ -11,7 +11,7 @@ #include "ui/base/win/shell.h" #include "ui/gfx/win/hwnd_util.h" -namespace atom { +namespace electron { namespace { @@ -69,4 +69,4 @@ LRESULT CALLBACK PowerMonitor::WndProc(HWND hwnd, } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_power_save_blocker.cc b/shell/browser/api/atom_api_power_save_blocker.cc index 78286bc8ce..5a34b64663 100644 --- a/shell/browser/api/atom_api_power_save_blocker.cc +++ b/shell/browser/api/atom_api_power_save_blocker.cc @@ -39,7 +39,7 @@ struct Converter { } // namespace gin -namespace atom { +namespace electron { namespace api { @@ -134,7 +134,7 @@ gin::ObjectTemplateBuilder PowerSaveBlocker::GetObjectTemplateBuilder( } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -144,7 +144,8 @@ void Initialize(v8::Local exports, void* priv) { v8::Isolate* isolate = context->GetIsolate(); gin::Dictionary dict(isolate, exports); - dict.Set("powerSaveBlocker", atom::api::PowerSaveBlocker::Create(isolate)); + dict.Set("powerSaveBlocker", + electron::api::PowerSaveBlocker::Create(isolate)); } } // namespace diff --git a/shell/browser/api/atom_api_power_save_blocker.h b/shell/browser/api/atom_api_power_save_blocker.h index f125900ec2..42ad84aab2 100644 --- a/shell/browser/api/atom_api_power_save_blocker.h +++ b/shell/browser/api/atom_api_power_save_blocker.h @@ -13,7 +13,7 @@ #include "gin/wrappable.h" #include "services/device/public/mojom/wake_lock.mojom.h" -namespace atom { +namespace electron { namespace api { @@ -56,6 +56,6 @@ class PowerSaveBlocker : public gin::Wrappable { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_POWER_SAVE_BLOCKER_H_ diff --git a/shell/browser/api/atom_api_protocol.cc b/shell/browser/api/atom_api_protocol.cc index 716b72fb5b..3e777acf78 100644 --- a/shell/browser/api/atom_api_protocol.cc +++ b/shell/browser/api/atom_api_protocol.cc @@ -74,7 +74,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -129,14 +129,15 @@ void RegisterSchemesAsPrivileged(v8::Local val, switch_name, base::JoinString(schemes, ",")); }; - AppendSchemesToCmdLine(atom::switches::kSecureSchemes, secure_schemes); - AppendSchemesToCmdLine(atom::switches::kBypassCSPSchemes, + AppendSchemesToCmdLine(electron::switches::kSecureSchemes, secure_schemes); + AppendSchemesToCmdLine(electron::switches::kBypassCSPSchemes, cspbypassing_schemes); - AppendSchemesToCmdLine(atom::switches::kCORSSchemes, cors_schemes); - AppendSchemesToCmdLine(atom::switches::kFetchSchemes, fetch_schemes); - AppendSchemesToCmdLine(atom::switches::kServiceWorkerSchemes, + AppendSchemesToCmdLine(electron::switches::kCORSSchemes, cors_schemes); + AppendSchemesToCmdLine(electron::switches::kFetchSchemes, fetch_schemes); + AppendSchemesToCmdLine(electron::switches::kServiceWorkerSchemes, service_worker_schemes); - AppendSchemesToCmdLine(atom::switches::kStandardSchemes, g_standard_schemes); + AppendSchemesToCmdLine(electron::switches::kStandardSchemes, + g_standard_schemes); } Protocol::Protocol(v8::Isolate* isolate, AtomBrowserContext* browser_context) @@ -285,20 +286,20 @@ void Protocol::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { void RegisterSchemesAsPrivileged(v8::Local val, mate::Arguments* args) { - if (atom::Browser::Get()->is_ready()) { + if (electron::Browser::Get()->is_ready()) { args->ThrowError( "protocol.registerSchemesAsPrivileged should be called before " "app is ready"); return; } - atom::api::RegisterSchemesAsPrivileged(val, args); + electron::api::RegisterSchemesAsPrivileged(val, args); } void Initialize(v8::Local exports, @@ -308,7 +309,7 @@ void Initialize(v8::Local exports, v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary dict(isolate, exports); dict.SetMethod("registerSchemesAsPrivileged", &RegisterSchemesAsPrivileged); - dict.SetMethod("getStandardSchemes", &atom::api::GetStandardSchemes); + dict.SetMethod("getStandardSchemes", &electron::api::GetStandardSchemes); } } // namespace diff --git a/shell/browser/api/atom_api_protocol.h b/shell/browser/api/atom_api_protocol.h index f6f4026342..0fcfb8b6fe 100644 --- a/shell/browser/api/atom_api_protocol.h +++ b/shell/browser/api/atom_api_protocol.h @@ -29,7 +29,7 @@ namespace base { class DictionaryValue; } -namespace atom { +namespace electron { namespace api { @@ -193,6 +193,6 @@ class Protocol : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_PROTOCOL_H_ diff --git a/shell/browser/api/atom_api_protocol_ns.cc b/shell/browser/api/atom_api_protocol_ns.cc index 74ef0ac698..fd1e6c35f8 100644 --- a/shell/browser/api/atom_api_protocol_ns.cc +++ b/shell/browser/api/atom_api_protocol_ns.cc @@ -13,7 +13,7 @@ #include "shell/common/native_mate_converters/once_callback.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { namespace api { namespace { @@ -178,4 +178,4 @@ void ProtocolNS::BuildPrototype(v8::Isolate* isolate, } } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_protocol_ns.h b/shell/browser/api/atom_api_protocol_ns.h index c5e806ca43..6031af4a44 100644 --- a/shell/browser/api/atom_api_protocol_ns.h +++ b/shell/browser/api/atom_api_protocol_ns.h @@ -13,7 +13,7 @@ #include "shell/browser/api/trackable_object.h" #include "shell/browser/net/atom_url_loader_factory.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -90,6 +90,6 @@ class ProtocolNS : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_PROTOCOL_NS_H_ diff --git a/shell/browser/api/atom_api_screen.cc b/shell/browser/api/atom_api_screen.cc index 0f5833cfae..d8fc8b8b00 100644 --- a/shell/browser/api/atom_api_screen.cc +++ b/shell/browser/api/atom_api_screen.cc @@ -22,7 +22,7 @@ #include "ui/display/win/screen_win.h" #endif -namespace atom { +namespace electron { namespace api { @@ -85,13 +85,13 @@ display::Display Screen::GetDisplayMatching(const gfx::Rect& match_rect) { #if defined(OS_WIN) -static gfx::Rect ScreenToDIPRect(atom::NativeWindow* window, +static gfx::Rect ScreenToDIPRect(electron::NativeWindow* window, const gfx::Rect& rect) { HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr; return display::win::ScreenWin::ScreenToDIPRect(hwnd, rect); } -static gfx::Rect DIPToScreenRect(atom::NativeWindow* window, +static gfx::Rect DIPToScreenRect(electron::NativeWindow* window, const gfx::Rect& rect) { HWND hwnd = window ? window->GetAcceleratedWidget() : nullptr; return display::win::ScreenWin::DIPToScreenRect(hwnd, rect); @@ -151,11 +151,11 @@ void Screen::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Screen; +using electron::api::Screen; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_screen.h b/shell/browser/api/atom_api_screen.h index c68e872eae..ff09a84193 100644 --- a/shell/browser/api/atom_api_screen.h +++ b/shell/browser/api/atom_api_screen.h @@ -18,7 +18,7 @@ class Rect; class Screen; } // namespace gfx -namespace atom { +namespace electron { namespace api { @@ -54,6 +54,6 @@ class Screen : public mate::EventEmitter, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_SCREEN_H_ diff --git a/shell/browser/api/atom_api_session.cc b/shell/browser/api/atom_api_session.cc index 8d34e3d253..3e724eb916 100644 --- a/shell/browser/api/atom_api_session.cc +++ b/shell/browser/api/atom_api_session.cc @@ -147,9 +147,9 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static v8::Local ToV8(v8::Isolate* isolate, - atom::VerifyRequestParams val) { + electron::VerifyRequestParams val) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); dict.Set("hostname", val.hostname); dict.Set("certificate", val.certificate); @@ -161,7 +161,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -610,7 +610,7 @@ v8::Local Session::Protocol(v8::Isolate* isolate) { v8::Local Session::WebRequest(v8::Isolate* isolate) { if (web_request_.IsEmpty()) { - auto handle = atom::api::WebRequest::Create(isolate, browser_context()); + auto handle = electron::api::WebRequest::Create(isolate, browser_context()); web_request_.Reset(isolate, handle.ToV8()); } return v8::Local::New(isolate, web_request_); @@ -618,7 +618,7 @@ v8::Local Session::WebRequest(v8::Isolate* isolate) { v8::Local Session::NetLog(v8::Isolate* isolate) { if (net_log_.IsEmpty()) { - auto handle = atom::api::NetLog::Create(isolate, browser_context()); + auto handle = electron::api::NetLog::Create(isolate, browser_context()); net_log_.Reset(isolate, handle.ToV8()); } return v8::Local::New(isolate, net_log_); @@ -699,18 +699,18 @@ void Session::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Cookies; -using atom::api::NetLog; -using atom::api::Protocol; -using atom::api::Session; +using electron::api::Cookies; +using electron::api::NetLog; +using electron::api::Protocol; +using electron::api::Session; v8::Local FromPartition(const std::string& partition, mate::Arguments* args) { - if (!atom::Browser::Get()->is_ready()) { + if (!electron::Browser::Get()->is_ready()) { args->ThrowError("Session can only be received when app is ready"); return v8::Null(args->isolate()); } diff --git a/shell/browser/api/atom_api_session.h b/shell/browser/api/atom_api_session.h index d08e6fa5bd..2332adeeb3 100644 --- a/shell/browser/api/atom_api_session.h +++ b/shell/browser/api/atom_api_session.h @@ -31,7 +31,7 @@ namespace net { class ProxyConfig; } -namespace atom { +namespace electron { class AtomBrowserContext; @@ -111,6 +111,6 @@ class Session : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_SESSION_H_ diff --git a/shell/browser/api/atom_api_system_preferences.cc b/shell/browser/api/atom_api_system_preferences.cc index 23be4e02af..a5193ff17d 100644 --- a/shell/browser/api/atom_api_system_preferences.cc +++ b/shell/browser/api/atom_api_system_preferences.cc @@ -11,7 +11,7 @@ #include "ui/gfx/animation/animation.h" #include "ui/gfx/color_utils.h" -namespace atom { +namespace electron { namespace api { @@ -129,11 +129,11 @@ void SystemPreferences::BuildPrototype( } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::SystemPreferences; +using electron::api::SystemPreferences; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_system_preferences.h b/shell/browser/api/atom_api_system_preferences.h index 25da9fa28c..6f7c465ade 100644 --- a/shell/browser/api/atom_api_system_preferences.h +++ b/shell/browser/api/atom_api_system_preferences.h @@ -24,7 +24,7 @@ namespace base { class DictionaryValue; } -namespace atom { +namespace electron { namespace api { @@ -166,6 +166,6 @@ class SystemPreferences : public mate::EventEmitter } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_SYSTEM_PREFERENCES_H_ diff --git a/shell/browser/api/atom_api_system_preferences_mac.mm b/shell/browser/api/atom_api_system_preferences_mac.mm index e269940857..9508e182ca 100644 --- a/shell/browser/api/atom_api_system_preferences_mac.mm +++ b/shell/browser/api/atom_api_system_preferences_mac.mm @@ -79,7 +79,7 @@ struct Converter { }; } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -668,4 +668,4 @@ void SystemPreferences::SetAppLevelAppearance(mate::Arguments* args) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_system_preferences_win.cc b/shell/browser/api/atom_api_system_preferences_win.cc index ed889c2e1e..d83de630bf 100644 --- a/shell/browser/api/atom_api_system_preferences_win.cc +++ b/shell/browser/api/atom_api_system_preferences_win.cc @@ -13,7 +13,7 @@ #include "ui/gfx/color_utils.h" #include "ui/gfx/win/hwnd_util.h" -namespace atom { +namespace electron { namespace { @@ -218,4 +218,4 @@ void SystemPreferences::OnFinishLaunching( } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_top_level_window.cc b/shell/browser/api/atom_api_top_level_window.cc index cc5a7548f9..8e93430979 100644 --- a/shell/browser/api/atom_api_top_level_window.cc +++ b/shell/browser/api/atom_api_top_level_window.cc @@ -38,10 +38,10 @@ namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Handle val, - atom::TaskbarHost::ThumbarButton* out) { + electron::TaskbarHost::ThumbarButton* out) { mate::Dictionary dict; if (!ConvertFromV8(isolate, val, &dict)) return false; @@ -55,7 +55,7 @@ struct Converter { } // namespace mate #endif -namespace atom { +namespace electron { namespace api { @@ -1192,11 +1192,11 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::TopLevelWindow; +using electron::api::TopLevelWindow; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_top_level_window.h b/shell/browser/api/atom_api_top_level_window.h index 564e13a49d..c2bae0d9c1 100644 --- a/shell/browser/api/atom_api_top_level_window.h +++ b/shell/browser/api/atom_api_top_level_window.h @@ -19,7 +19,7 @@ #include "shell/browser/native_window_observer.h" #include "shell/common/api/atom_api_native_image.h" -namespace atom { +namespace electron { namespace api { @@ -258,23 +258,24 @@ class TopLevelWindow : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::NativeWindow** out) { + electron::NativeWindow** out) { // null would be tranfered to NULL. if (val->IsNull()) { *out = NULL; return true; } - atom::api::TopLevelWindow* window; - if (!Converter::FromV8(isolate, val, &window)) + electron::api::TopLevelWindow* window; + if (!Converter::FromV8(isolate, val, + &window)) return false; *out = window->window(); return true; diff --git a/shell/browser/api/atom_api_tray.cc b/shell/browser/api/atom_api_tray.cc index 1b7828a7c7..62671ef697 100644 --- a/shell/browser/api/atom_api_tray.cc +++ b/shell/browser/api/atom_api_tray.cc @@ -21,11 +21,11 @@ namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::TrayIcon::HighlightMode* out) { - using HighlightMode = atom::TrayIcon::HighlightMode; + electron::TrayIcon::HighlightMode* out) { + using HighlightMode = electron::TrayIcon::HighlightMode; std::string mode; if (ConvertFromV8(isolate, val, &mode)) { if (mode == "always") { @@ -46,7 +46,7 @@ struct Converter { }; } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -248,11 +248,11 @@ void Tray::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Tray; +using electron::api::Tray; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_tray.h b/shell/browser/api/atom_api_tray.h index b0f6ebdd93..4d9dc12552 100644 --- a/shell/browser/api/atom_api_tray.h +++ b/shell/browser/api/atom_api_tray.h @@ -23,7 +23,7 @@ class Arguments; class Dictionary; } // namespace mate -namespace atom { +namespace electron { class TrayIcon; @@ -87,6 +87,6 @@ class Tray : public mate::TrackableObject, public TrayIconObserver { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_TRAY_H_ diff --git a/shell/browser/api/atom_api_url_request.cc b/shell/browser/api/atom_api_url_request.cc index 63ca97927c..b1c219cc8e 100644 --- a/shell/browser/api/atom_api_url_request.cc +++ b/shell/browser/api/atom_api_url_request.cc @@ -56,7 +56,7 @@ struct Converter> { } // namespace mate -namespace atom { +namespace electron { namespace api { template @@ -493,4 +493,4 @@ void URLRequest::EmitResponseEvent(Args... args) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_url_request.h b/shell/browser/api/atom_api_url_request.h index 9dd717ffec..8cf182a5c1 100644 --- a/shell/browser/api/atom_api_url_request.h +++ b/shell/browser/api/atom_api_url_request.h @@ -19,7 +19,7 @@ #include "shell/browser/api/event_emitter.h" #include "shell/browser/api/trackable_object.h" -namespace atom { +namespace electron { class AtomURLRequest; @@ -209,6 +209,6 @@ class URLRequest : public mate::EventEmitter { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_URL_REQUEST_H_ diff --git a/shell/browser/api/atom_api_view.cc b/shell/browser/api/atom_api_view.cc index ce86dbe2a1..f8778702fb 100644 --- a/shell/browser/api/atom_api_view.cc +++ b/shell/browser/api/atom_api_view.cc @@ -7,7 +7,7 @@ #include "native_mate/dictionary.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -62,11 +62,11 @@ void View::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::View; +using electron::api::View; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_view.h b/shell/browser/api/atom_api_view.h index 32dc3723fb..a542475862 100644 --- a/shell/browser/api/atom_api_view.h +++ b/shell/browser/api/atom_api_view.h @@ -13,7 +13,7 @@ #include "shell/browser/api/views/atom_api_layout_manager.h" #include "ui/views/view.h" -namespace atom { +namespace electron { namespace api { @@ -52,7 +52,7 @@ class View : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron namespace mate { @@ -61,8 +61,8 @@ struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, views::View** out) { - atom::api::View* view; - if (!Converter::FromV8(isolate, val, &view)) + electron::api::View* view; + if (!Converter::FromV8(isolate, val, &view)) return false; *out = view->view(); return true; diff --git a/shell/browser/api/atom_api_web_contents.cc b/shell/browser/api/atom_api_web_contents.cc index 47eb0f2b9b..fefacde650 100644 --- a/shell/browser/api/atom_api_web_contents.cc +++ b/shell/browser/api/atom_api_web_contents.cc @@ -181,10 +181,10 @@ struct Converter { }; template <> -struct Converter { +struct Converter { static v8::Local ToV8(v8::Isolate* isolate, - atom::api::WebContents::Type val) { - using Type = atom::api::WebContents::Type; + electron::api::WebContents::Type val) { + using Type = electron::api::WebContents::Type; std::string type = ""; switch (val) { case Type::BACKGROUND_PAGE: @@ -213,8 +213,8 @@ struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::api::WebContents::Type* out) { - using Type = atom::api::WebContents::Type; + electron::api::WebContents::Type* out) { + using Type = electron::api::WebContents::Type; std::string type; if (!ConvertFromV8(isolate, val, &type)) return false; @@ -237,7 +237,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -812,7 +812,7 @@ void WebContents::MediaStoppedPlaying( void WebContents::DidChangeThemeColor(base::Optional theme_color) { if (theme_color) { - Emit("did-change-theme-color", atom::ToRGBHex(theme_color.value())); + Emit("did-change-theme-color", electron::ToRGBHex(theme_color.value())); } else { Emit("did-change-theme-color", nullptr); } @@ -1318,17 +1318,17 @@ void WebContents::Stop() { } void WebContents::GoBack() { - atom::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); + electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); web_contents()->GetController().GoBack(); } void WebContents::GoForward() { - atom::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); + electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); web_contents()->GetController().GoForward(); } void WebContents::GoToOffset(int offset) { - atom::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); + electron::AtomBrowserClient::SuppressRendererProcessRestartForOnce(); web_contents()->GetController().GoToOffset(offset); } @@ -2131,7 +2131,7 @@ v8::Local WebContents::DevToolsWebContents(v8::Isolate* isolate) { v8::Local WebContents::Debugger(v8::Isolate* isolate) { if (debugger_.IsEmpty()) { - auto handle = atom::api::Debugger::Create(isolate, web_contents()); + auto handle = electron::api::Debugger::Create(isolate, web_contents()); debugger_.Reset(isolate, handle.ToV8()); } return v8::Local::New(isolate, debugger_); @@ -2337,11 +2337,11 @@ mate::Handle WebContents::FromOrCreate( } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::WebContents; +using electron::api::WebContents; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_web_contents.h b/shell/browser/api/atom_api_web_contents.h index 6e2b11b81f..c16047a2b1 100644 --- a/shell/browser/api/atom_api_web_contents.h +++ b/shell/browser/api/atom_api_web_contents.h @@ -48,7 +48,7 @@ namespace network { class ResourceRequestBody; } -namespace atom { +namespace electron { class AtomBrowserContext; class AtomJavaScriptDialogManager; @@ -573,6 +573,6 @@ class WebContents : public mate::TrackableObject, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_H_ diff --git a/shell/browser/api/atom_api_web_contents_impl.cc b/shell/browser/api/atom_api_web_contents_impl.cc index be9c0155d8..f29a63b997 100644 --- a/shell/browser/api/atom_api_web_contents_impl.cc +++ b/shell/browser/api/atom_api_web_contents_impl.cc @@ -18,7 +18,7 @@ // have to isolate the usage of WebContentsImpl into a clean file to fix it: // error C2371: 'ssize_t': redefinition; different basic types -namespace atom { +namespace electron { namespace api { @@ -59,4 +59,4 @@ OffScreenRenderWidgetHostView* WebContents::GetOffScreenRenderWidgetHostView() } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_web_contents_mac.mm b/shell/browser/api/atom_api_web_contents_mac.mm index eaf4dac71a..a0fd14a000 100644 --- a/shell/browser/api/atom_api_web_contents_mac.mm +++ b/shell/browser/api/atom_api_web_contents_mac.mm @@ -7,7 +7,7 @@ #import -namespace atom { +namespace electron { namespace api { @@ -29,4 +29,4 @@ bool WebContents::IsFocused() const { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_web_contents_view.cc b/shell/browser/api/atom_api_web_contents_view.cc index e8818c0de5..c56b12066a 100644 --- a/shell/browser/api/atom_api_web_contents_view.cc +++ b/shell/browser/api/atom_api_web_contents_view.cc @@ -28,7 +28,7 @@ class WebContentsViewRelay explicit WebContentsViewRelay(content::WebContents* contents) {} friend class content::WebContentsUserData; - atom::api::WebContentsView* view_ = nullptr; + electron::api::WebContentsView* view_ = nullptr; WEB_CONTENTS_USER_DATA_KEY_DECL(); @@ -39,7 +39,7 @@ WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsViewRelay) } // namespace -namespace atom { +namespace electron { namespace api { @@ -112,11 +112,11 @@ void WebContentsView::BuildPrototype( } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::WebContentsView; +using electron::api::WebContentsView; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/atom_api_web_contents_view.h b/shell/browser/api/atom_api_web_contents_view.h index e0328fc132..f6a2bd8169 100644 --- a/shell/browser/api/atom_api_web_contents_view.h +++ b/shell/browser/api/atom_api_web_contents_view.h @@ -9,7 +9,7 @@ #include "native_mate/handle.h" #include "shell/browser/api/atom_api_view.h" -namespace atom { +namespace electron { class InspectableWebContents; @@ -44,6 +44,6 @@ class WebContentsView : public View, public content::WebContentsObserver { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/api/atom_api_web_request.cc b/shell/browser/api/atom_api_web_request.cc index 541cc1203c..7fb60bba4f 100644 --- a/shell/browser/api/atom_api_web_request.cc +++ b/shell/browser/api/atom_api_web_request.cc @@ -37,7 +37,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -144,4 +144,4 @@ void WebRequest::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/atom_api_web_request.h b/shell/browser/api/atom_api_web_request.h index 1f9f3eb6ae..26e922a860 100644 --- a/shell/browser/api/atom_api_web_request.h +++ b/shell/browser/api/atom_api_web_request.h @@ -10,7 +10,7 @@ #include "shell/browser/api/trackable_object.h" #include "shell/browser/net/atom_network_delegate.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -44,6 +44,6 @@ class WebRequest : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_ATOM_API_WEB_REQUEST_H_ diff --git a/shell/browser/api/atom_api_web_view_manager.cc b/shell/browser/api/atom_api_web_view_manager.cc index d47838c24f..a21e2ef724 100644 --- a/shell/browser/api/atom_api_web_view_manager.cc +++ b/shell/browser/api/atom_api_web_view_manager.cc @@ -12,7 +12,7 @@ #include "shell/common/node_includes.h" #include "shell/common/options_switches.h" -using atom::WebContentsPreferences; +using electron::WebContentsPreferences; namespace { @@ -21,14 +21,14 @@ void AddGuest(int guest_instance_id, content::WebContents* embedder, content::WebContents* guest_web_contents, const base::DictionaryValue& options) { - auto* manager = atom::WebViewManager::GetWebViewManager(embedder); + auto* manager = electron::WebViewManager::GetWebViewManager(embedder); if (manager) manager->AddGuest(guest_instance_id, element_instance_id, embedder, guest_web_contents); double zoom_factor; - if (options.GetDouble(atom::options::kZoomFactor, &zoom_factor)) { - atom::WebContentsZoomController::FromWebContents(guest_web_contents) + if (options.GetDouble(electron::options::kZoomFactor, &zoom_factor)) { + electron::WebContentsZoomController::FromWebContents(guest_web_contents) ->SetDefaultZoomFactor(zoom_factor); } @@ -36,7 +36,7 @@ void AddGuest(int guest_instance_id, } void RemoveGuest(content::WebContents* embedder, int guest_instance_id) { - auto* manager = atom::WebViewManager::GetWebViewManager(embedder); + auto* manager = electron::WebViewManager::GetWebViewManager(embedder); if (manager) manager->RemoveGuest(guest_instance_id); } diff --git a/shell/browser/api/event.h b/shell/browser/api/event.h index c08b0bcecd..9ae2a87c26 100644 --- a/shell/browser/api/event.h +++ b/shell/browser/api/event.h @@ -19,7 +19,8 @@ namespace mate { class Event : public Wrappable, public content::WebContentsObserver { public: - using MessageSyncCallback = atom::mojom::ElectronBrowser::MessageSyncCallback; + using MessageSyncCallback = + electron::mojom::ElectronBrowser::MessageSyncCallback; static Handle Create(v8::Isolate* isolate); static void BuildPrototype(v8::Isolate* isolate, diff --git a/shell/browser/api/event_emitter.cc b/shell/browser/api/event_emitter.cc index 6794766c9d..5e8566b77d 100644 --- a/shell/browser/api/event_emitter.cc +++ b/shell/browser/api/event_emitter.cc @@ -48,7 +48,7 @@ v8::Local CreateJSEvent( v8::Isolate* isolate, v8::Local object, content::RenderFrameHost* sender, - base::Optional + base::Optional callback) { v8::Local event; bool use_native_event = sender && callback; diff --git a/shell/browser/api/event_emitter.h b/shell/browser/api/event_emitter.h index 264ad3c576..3f19452cd7 100644 --- a/shell/browser/api/event_emitter.h +++ b/shell/browser/api/event_emitter.h @@ -26,7 +26,8 @@ v8::Local CreateJSEvent( v8::Isolate* isolate, v8::Local object, content::RenderFrameHost* sender, - base::Optional callback); + base::Optional + callback); v8::Local CreateCustomEvent(v8::Isolate* isolate, v8::Local object, v8::Local event); @@ -80,7 +81,7 @@ class EventEmitter : public Wrappable { bool EmitWithSender( const base::StringPiece& name, content::RenderFrameHost* sender, - base::Optional + base::Optional callback, Args&&... args) { v8::Locker locker(isolate()); diff --git a/shell/browser/api/frame_subscriber.cc b/shell/browser/api/frame_subscriber.cc index f6908781f6..e57536a365 100644 --- a/shell/browser/api/frame_subscriber.cc +++ b/shell/browser/api/frame_subscriber.cc @@ -15,7 +15,7 @@ #include "ui/gfx/image/image.h" #include "ui/gfx/skbitmap_operations.h" -namespace atom { +namespace electron { namespace api { @@ -174,4 +174,4 @@ gfx::Size FrameSubscriber::GetRenderViewSize() const { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/frame_subscriber.h b/shell/browser/api/frame_subscriber.h index 77229768c1..59dcb0c45c 100644 --- a/shell/browser/api/frame_subscriber.h +++ b/shell/browser/api/frame_subscriber.h @@ -18,7 +18,7 @@ namespace gfx { class Image; } -namespace atom { +namespace electron { namespace api { @@ -70,6 +70,6 @@ class FrameSubscriber : public content::WebContentsObserver, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_FRAME_SUBSCRIBER_H_ diff --git a/shell/browser/api/gpu_info_enumerator.cc b/shell/browser/api/gpu_info_enumerator.cc index b3907553ee..35b97bb9b2 100644 --- a/shell/browser/api/gpu_info_enumerator.cc +++ b/shell/browser/api/gpu_info_enumerator.cc @@ -6,7 +6,7 @@ #include -namespace atom { +namespace electron { GPUInfoEnumerator::GPUInfoEnumerator() : value_stack(), current(std::make_unique()) {} @@ -124,4 +124,4 @@ std::unique_ptr GPUInfoEnumerator::GetDictionary() { return std::move(current); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/gpu_info_enumerator.h b/shell/browser/api/gpu_info_enumerator.h index 8bfac8255a..e343f0d886 100644 --- a/shell/browser/api/gpu_info_enumerator.h +++ b/shell/browser/api/gpu_info_enumerator.h @@ -12,7 +12,7 @@ #include "base/values.h" #include "gpu/config/gpu_info.h" -namespace atom { +namespace electron { // This class implements the enumerator for reading all the attributes in // GPUInfo into a dictionary. @@ -56,5 +56,5 @@ class GPUInfoEnumerator final : public gpu::GPUInfo::Enumerator { std::unique_ptr current; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_GPU_INFO_ENUMERATOR_H_ diff --git a/shell/browser/api/gpuinfo_manager.cc b/shell/browser/api/gpuinfo_manager.cc index 28dafa90ce..20401af5fa 100644 --- a/shell/browser/api/gpuinfo_manager.cc +++ b/shell/browser/api/gpuinfo_manager.cc @@ -12,7 +12,7 @@ #include "gpu/config/gpu_info_collector.h" #include "shell/browser/api/gpu_info_enumerator.h" -namespace atom { +namespace electron { GPUInfoManager* GPUInfoManager::GetInstance() { return base::Singleton::get(); @@ -92,4 +92,4 @@ std::unique_ptr GPUInfoManager::EnumerateGPUInfo( return enumerator.GetDictionary(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/gpuinfo_manager.h b/shell/browser/api/gpuinfo_manager.h index 8af5f4e6bc..cb7ee9f6ae 100644 --- a/shell/browser/api/gpuinfo_manager.h +++ b/shell/browser/api/gpuinfo_manager.h @@ -15,7 +15,7 @@ #include "shell/common/native_mate_converters/value_converter.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { // GPUInfoManager is a singleton used to manage and fetch GPUInfo class GPUInfoManager : public content::GpuDataManagerObserver { @@ -45,5 +45,5 @@ class GPUInfoManager : public content::GpuDataManagerObserver { DISALLOW_COPY_AND_ASSIGN(GPUInfoManager); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_GPUINFO_MANAGER_H_ diff --git a/shell/browser/api/process_metric.cc b/shell/browser/api/process_metric.cc index 6293d15f24..ea5f8aaa4a 100644 --- a/shell/browser/api/process_metric.cc +++ b/shell/browser/api/process_metric.cc @@ -15,7 +15,7 @@ extern "C" int sandbox_check(pid_t pid, const char* operation, int type, ...); #endif -namespace atom { +namespace electron { ProcessMetric::ProcessMetric(int type, base::ProcessHandle handle, @@ -106,4 +106,4 @@ bool ProcessMetric::IsSandboxed() const { #endif // defined(OS_MACOSX) -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/process_metric.h b/shell/browser/api/process_metric.h index a51f1e9306..97cc03be06 100644 --- a/shell/browser/api/process_metric.h +++ b/shell/browser/api/process_metric.h @@ -11,7 +11,7 @@ #include "base/process/process_handle.h" #include "base/process/process_metrics.h" -namespace atom { +namespace electron { #if defined(OS_WIN) enum class ProcessIntegrityLevel { @@ -41,6 +41,6 @@ struct ProcessMetric { #endif }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_PROCESS_METRIC_H_ diff --git a/shell/browser/api/save_page_handler.cc b/shell/browser/api/save_page_handler.cc index d3a7f5bd51..3de2c62756 100644 --- a/shell/browser/api/save_page_handler.cc +++ b/shell/browser/api/save_page_handler.cc @@ -12,7 +12,7 @@ #include "content/public/browser/web_contents.h" #include "shell/browser/atom_browser_context.h" -namespace atom { +namespace electron { namespace api { @@ -68,4 +68,4 @@ void SavePageHandler::Destroy(download::DownloadItem* item) { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/browser/api/save_page_handler.h b/shell/browser/api/save_page_handler.h index 2eaf21601e..13f4d55e67 100644 --- a/shell/browser/api/save_page_handler.h +++ b/shell/browser/api/save_page_handler.h @@ -21,7 +21,7 @@ namespace content { class WebContents; } -namespace atom { +namespace electron { namespace api { @@ -30,7 +30,7 @@ class SavePageHandler : public content::DownloadManager::Observer, public download::DownloadItem::Observer { public: SavePageHandler(content::WebContents* web_contents, - atom::util::Promise promise); + electron::util::Promise promise); ~SavePageHandler() override; bool Handle(const base::FilePath& full_path, @@ -47,11 +47,11 @@ class SavePageHandler : public content::DownloadManager::Observer, void OnDownloadUpdated(download::DownloadItem* item) override; content::WebContents* web_contents_; // weak - atom::util::Promise promise_; + electron::util::Promise promise_; }; } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_SAVE_PAGE_HANDLER_H_ diff --git a/shell/browser/api/stream_subscriber.cc b/shell/browser/api/stream_subscriber.cc index 0bf0fd5f36..c6abb25e4b 100644 --- a/shell/browser/api/stream_subscriber.cc +++ b/shell/browser/api/stream_subscriber.cc @@ -18,7 +18,7 @@ namespace mate { StreamSubscriber::StreamSubscriber( v8::Isolate* isolate, v8::Local emitter, - base::WeakPtr url_job, + base::WeakPtr url_job, scoped_refptr ui_task_runner) : base::RefCountedDeleteOnSequence(ui_task_runner), isolate_(isolate), @@ -79,21 +79,23 @@ void StreamSubscriber::OnData(mate::Arguments* args) { // Pass the data to the URLJob in IO thread. std::vector buffer(data, data + length); - base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&atom::URLRequestStreamJob::OnData, - url_job_, base::Passed(&buffer))); + base::PostTaskWithTraits( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&electron::URLRequestStreamJob::OnData, url_job_, + base::Passed(&buffer))); } void StreamSubscriber::OnEnd(mate::Arguments* args) { base::PostTaskWithTraits( FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&atom::URLRequestStreamJob::OnEnd, url_job_)); + base::BindOnce(&electron::URLRequestStreamJob::OnEnd, url_job_)); } void StreamSubscriber::OnError(mate::Arguments* args) { - base::PostTaskWithTraits(FROM_HERE, {content::BrowserThread::IO}, - base::BindOnce(&atom::URLRequestStreamJob::OnError, - url_job_, net::ERR_FAILED)); + base::PostTaskWithTraits( + FROM_HERE, {content::BrowserThread::IO}, + base::BindOnce(&electron::URLRequestStreamJob::OnError, url_job_, + net::ERR_FAILED)); } void StreamSubscriber::RemoveAllListeners() { diff --git a/shell/browser/api/stream_subscriber.h b/shell/browser/api/stream_subscriber.h index 83aacb154e..db25701964 100644 --- a/shell/browser/api/stream_subscriber.h +++ b/shell/browser/api/stream_subscriber.h @@ -17,7 +17,7 @@ #include "content/public/browser/browser_thread.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { class URLRequestStreamJob; } @@ -32,7 +32,7 @@ class StreamSubscriber StreamSubscriber(v8::Isolate* isolate, v8::Local emitter, - base::WeakPtr url_job, + base::WeakPtr url_job, scoped_refptr ui_task_runner); private: @@ -56,7 +56,7 @@ class StreamSubscriber v8::Isolate* isolate_; v8::Global emitter_; - base::WeakPtr url_job_; + base::WeakPtr url_job_; JSHandlersMap js_handlers_; diff --git a/shell/browser/api/trackable_object.cc b/shell/browser/api/trackable_object.cc index 63c692814f..a5d4d29312 100644 --- a/shell/browser/api/trackable_object.cc +++ b/shell/browser/api/trackable_object.cc @@ -31,7 +31,7 @@ class IDUserData : public base::SupportsUserData::Data { } // namespace TrackableObjectBase::TrackableObjectBase() : weak_factory_(this) { - atom::AtomBrowserMainParts::Get()->RegisterDestructionCallback( + electron::AtomBrowserMainParts::Get()->RegisterDestructionCallback( GetDestroyClosure()); } diff --git a/shell/browser/api/trackable_object.h b/shell/browser/api/trackable_object.h index 55063d85f9..ad99237cdf 100644 --- a/shell/browser/api/trackable_object.h +++ b/shell/browser/api/trackable_object.h @@ -114,14 +114,14 @@ class TrackableObject : public TrackableObjectBase, void InitWith(v8::Isolate* isolate, v8::Local wrapper) override { WrappableBase::InitWith(isolate, wrapper); if (!weak_map_) { - weak_map_ = new atom::KeyWeakMap; + weak_map_ = new electron::KeyWeakMap; } weak_map_->Set(isolate, weak_map_id_, wrapper); } private: static int32_t next_id_; - static atom::KeyWeakMap* weak_map_; // leaked on purpose + static electron::KeyWeakMap* weak_map_; // leaked on purpose DISALLOW_COPY_AND_ASSIGN(TrackableObject); }; @@ -130,7 +130,7 @@ template int32_t TrackableObject::next_id_ = 0; template -atom::KeyWeakMap* TrackableObject::weak_map_ = nullptr; +electron::KeyWeakMap* TrackableObject::weak_map_ = nullptr; } // namespace mate diff --git a/shell/browser/api/views/atom_api_box_layout.cc b/shell/browser/api/views/atom_api_box_layout.cc index 93bed9d556..d7f8a44156 100644 --- a/shell/browser/api/views/atom_api_box_layout.cc +++ b/shell/browser/api/views/atom_api_box_layout.cc @@ -33,7 +33,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -65,11 +65,11 @@ void BoxLayout::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::BoxLayout; +using electron::api::BoxLayout; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_box_layout.h b/shell/browser/api/views/atom_api_box_layout.h index 73b989ccb1..4cffa4a7b5 100644 --- a/shell/browser/api/views/atom_api_box_layout.h +++ b/shell/browser/api/views/atom_api_box_layout.h @@ -9,7 +9,7 @@ #include "shell/browser/api/views/atom_api_layout_manager.h" #include "ui/views/layout/box_layout.h" -namespace atom { +namespace electron { namespace api { @@ -35,6 +35,6 @@ class BoxLayout : public LayoutManager { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BOX_LAYOUT_H_ diff --git a/shell/browser/api/views/atom_api_button.cc b/shell/browser/api/views/atom_api_button.cc index 601a774295..a93a2b6abe 100644 --- a/shell/browser/api/views/atom_api_button.cc +++ b/shell/browser/api/views/atom_api_button.cc @@ -8,7 +8,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -38,11 +38,11 @@ void Button::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::Button; +using electron::api::Button; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_button.h b/shell/browser/api/views/atom_api_button.h index bfbdf3ad02..20827c3aff 100644 --- a/shell/browser/api/views/atom_api_button.h +++ b/shell/browser/api/views/atom_api_button.h @@ -9,7 +9,7 @@ #include "shell/browser/api/atom_api_view.h" #include "ui/views/controls/button/button.h" -namespace atom { +namespace electron { namespace api { @@ -35,6 +35,6 @@ class Button : public View, public views::ButtonListener { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_BUTTON_H_ diff --git a/shell/browser/api/views/atom_api_label_button.cc b/shell/browser/api/views/atom_api_label_button.cc index 0d100b7c1f..8ec1be8154 100644 --- a/shell/browser/api/views/atom_api_label_button.cc +++ b/shell/browser/api/views/atom_api_label_button.cc @@ -9,7 +9,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -58,11 +58,11 @@ void LabelButton::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::LabelButton; +using electron::api::LabelButton; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_label_button.h b/shell/browser/api/views/atom_api_label_button.h index 9e63e14406..2b966faa61 100644 --- a/shell/browser/api/views/atom_api_label_button.h +++ b/shell/browser/api/views/atom_api_label_button.h @@ -10,7 +10,7 @@ #include "shell/browser/api/views/atom_api_button.h" #include "ui/views/controls/button/label_button.h" -namespace atom { +namespace electron { namespace api { @@ -42,6 +42,6 @@ class LabelButton : public Button { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_LABEL_BUTTON_H_ diff --git a/shell/browser/api/views/atom_api_layout_manager.cc b/shell/browser/api/views/atom_api_layout_manager.cc index 89fb3ce643..c5720178d2 100644 --- a/shell/browser/api/views/atom_api_layout_manager.cc +++ b/shell/browser/api/views/atom_api_layout_manager.cc @@ -8,7 +8,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -41,11 +41,11 @@ void LayoutManager::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::LayoutManager; +using electron::api::LayoutManager; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_layout_manager.h b/shell/browser/api/views/atom_api_layout_manager.h index a71ec54424..9281e58ef5 100644 --- a/shell/browser/api/views/atom_api_layout_manager.h +++ b/shell/browser/api/views/atom_api_layout_manager.h @@ -10,7 +10,7 @@ #include "shell/browser/api/trackable_object.h" #include "ui/views/layout/layout_manager.h" -namespace atom { +namespace electron { namespace api { @@ -39,6 +39,6 @@ class LayoutManager : public mate::TrackableObject { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_LAYOUT_MANAGER_H_ diff --git a/shell/browser/api/views/atom_api_md_text_button.cc b/shell/browser/api/views/atom_api_md_text_button.cc index 3aa055b924..ca5dcfe679 100644 --- a/shell/browser/api/views/atom_api_md_text_button.cc +++ b/shell/browser/api/views/atom_api_md_text_button.cc @@ -9,7 +9,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -35,11 +35,11 @@ void MdTextButton::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::MdTextButton; +using electron::api::MdTextButton; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_md_text_button.h b/shell/browser/api/views/atom_api_md_text_button.h index 3d01fd2666..4538105809 100644 --- a/shell/browser/api/views/atom_api_md_text_button.h +++ b/shell/browser/api/views/atom_api_md_text_button.h @@ -10,7 +10,7 @@ #include "shell/browser/api/views/atom_api_label_button.h" #include "ui/views/controls/button/md_text_button.h" -namespace atom { +namespace electron { namespace api { @@ -36,6 +36,6 @@ class MdTextButton : public LabelButton { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_MD_TEXT_BUTTON_H_ diff --git a/shell/browser/api/views/atom_api_resize_area.cc b/shell/browser/api/views/atom_api_resize_area.cc index 6924e90319..7690fa33a9 100644 --- a/shell/browser/api/views/atom_api_resize_area.cc +++ b/shell/browser/api/views/atom_api_resize_area.cc @@ -8,7 +8,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -38,11 +38,11 @@ void ResizeArea::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::ResizeArea; +using electron::api::ResizeArea; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_resize_area.h b/shell/browser/api/views/atom_api_resize_area.h index b8b8867814..bdb479ebe9 100644 --- a/shell/browser/api/views/atom_api_resize_area.h +++ b/shell/browser/api/views/atom_api_resize_area.h @@ -10,7 +10,7 @@ #include "ui/views/controls/resize_area.h" #include "ui/views/controls/resize_area_delegate.h" -namespace atom { +namespace electron { namespace api { @@ -38,6 +38,6 @@ class ResizeArea : public View, protected views::ResizeAreaDelegate { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_RESIZE_AREA_H_ diff --git a/shell/browser/api/views/atom_api_text_field.cc b/shell/browser/api/views/atom_api_text_field.cc index 53d17db09a..2a5333c8b7 100644 --- a/shell/browser/api/views/atom_api_text_field.cc +++ b/shell/browser/api/views/atom_api_text_field.cc @@ -8,7 +8,7 @@ #include "shell/common/api/constructor.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace api { @@ -45,11 +45,11 @@ void TextField::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace { -using atom::api::TextField; +using electron::api::TextField; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/browser/api/views/atom_api_text_field.h b/shell/browser/api/views/atom_api_text_field.h index 7f68d51c32..7b6c014028 100644 --- a/shell/browser/api/views/atom_api_text_field.h +++ b/shell/browser/api/views/atom_api_text_field.h @@ -9,7 +9,7 @@ #include "shell/browser/api/atom_api_view.h" #include "ui/views/controls/textfield/textfield.h" -namespace atom { +namespace electron { namespace api { @@ -37,6 +37,6 @@ class TextField : public View { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_API_VIEWS_ATOM_API_TEXT_FIELD_H_ diff --git a/shell/browser/atom_blob_reader.cc b/shell/browser/atom_blob_reader.cc index 22974f60d2..ebb38c9874 100644 --- a/shell/browser/atom_blob_reader.cc +++ b/shell/browser/atom_blob_reader.cc @@ -19,7 +19,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -121,4 +121,4 @@ void AtomBlobReader::BlobReadHelper::DidReadBlobData( delete this; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_blob_reader.h b/shell/browser/atom_blob_reader.h index 27938db246..5015fd8fa0 100644 --- a/shell/browser/atom_blob_reader.h +++ b/shell/browser/atom_blob_reader.h @@ -30,7 +30,7 @@ class Local; class Value; } // namespace v8 -namespace atom { +namespace electron { // A class to keep track of the blob context. All methods, // except Ctor are expected to be called on IO thread. @@ -39,7 +39,7 @@ class AtomBlobReader { explicit AtomBlobReader(content::ChromeBlobStorageContext* blob_context); ~AtomBlobReader(); - void StartReading(const std::string& uuid, atom::util::Promise promise); + void StartReading(const std::string& uuid, electron::util::Promise promise); private: // A self-destroyed helper class to read the blob data. @@ -70,6 +70,6 @@ class AtomBlobReader { DISALLOW_COPY_AND_ASSIGN(AtomBlobReader); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_BLOB_READER_H_ diff --git a/shell/browser/atom_browser_client.cc b/shell/browser/atom_browser_client.cc index 4669d72378..35ece39a72 100644 --- a/shell/browser/atom_browser_client.cc +++ b/shell/browser/atom_browser_client.cc @@ -116,7 +116,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -988,4 +988,4 @@ bool AtomBrowserClient::ShouldEnableStrictSiteIsolation() { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_browser_client.h b/shell/browser/atom_browser_client.h index ceccd0184f..34c3bdf38d 100644 --- a/shell/browser/atom_browser_client.h +++ b/shell/browser/atom_browser_client.h @@ -25,7 +25,7 @@ namespace net { class SSLCertRequestInfo; } -namespace atom { +namespace electron { class NotificationPresenter; class PlatformNotificationService; @@ -258,6 +258,6 @@ class AtomBrowserClient : public content::ContentBrowserClient, DISALLOW_COPY_AND_ASSIGN(AtomBrowserClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_BROWSER_CLIENT_H_ diff --git a/shell/browser/atom_browser_context.cc b/shell/browser/atom_browser_context.cc index bd2c5d736e..bfbfd26a62 100644 --- a/shell/browser/atom_browser_context.cc +++ b/shell/browser/atom_browser_context.cc @@ -45,7 +45,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -345,4 +345,4 @@ scoped_refptr AtomBrowserContext::From( return scoped_refptr(new_context); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_browser_context.h b/shell/browser/atom_browser_context.h index 34badf03d7..fa0ce734fa 100644 --- a/shell/browser/atom_browser_context.h +++ b/shell/browser/atom_browser_context.h @@ -26,7 +26,7 @@ namespace storage { class SpecialStoragePolicy; } -namespace atom { +namespace electron { class AtomBlobReader; class AtomBrowserContext; @@ -175,6 +175,6 @@ class AtomBrowserContext DISALLOW_COPY_AND_ASSIGN(AtomBrowserContext); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_BROWSER_CONTEXT_H_ diff --git a/shell/browser/atom_browser_main_parts.cc b/shell/browser/atom_browser_main_parts.cc index d92f130fe7..81e52ab230 100644 --- a/shell/browser/atom_browser_main_parts.cc +++ b/shell/browser/atom_browser_main_parts.cc @@ -92,7 +92,7 @@ #include "device/bluetooth/dbus/dbus_bluez_manager_wrapper_linux.h" #endif -namespace atom { +namespace electron { namespace { @@ -510,4 +510,4 @@ IconManager* AtomBrowserMainParts::GetIconManager() { return icon_manager_.get(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_browser_main_parts.h b/shell/browser/atom_browser_main_parts.h index a8a295dbc8..bfa354b6c7 100644 --- a/shell/browser/atom_browser_main_parts.h +++ b/shell/browser/atom_browser_main_parts.h @@ -27,7 +27,7 @@ class WMState; } #endif -namespace atom { +namespace electron { class ElectronBindings; class Browser; @@ -141,6 +141,6 @@ class AtomBrowserMainParts : public content::BrowserMainParts { DISALLOW_COPY_AND_ASSIGN(AtomBrowserMainParts); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_BROWSER_MAIN_PARTS_H_ diff --git a/shell/browser/atom_browser_main_parts_mac.mm b/shell/browser/atom_browser_main_parts_mac.mm index 21bd991815..c1742616f8 100644 --- a/shell/browser/atom_browser_main_parts_mac.mm +++ b/shell/browser/atom_browser_main_parts_mac.mm @@ -7,7 +7,7 @@ #include "shell/browser/atom_paths.h" #include "shell/browser/mac/atom_application_delegate.h" -namespace atom { +namespace electron { namespace { @@ -77,4 +77,4 @@ void AtomBrowserMainParts::InitializeEmptyApplicationMenu() { [[NSApplication sharedApplication] setMainMenu:main_menu]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_browser_main_parts_posix.cc b/shell/browser/atom_browser_main_parts_posix.cc index 183d556497..efeff077b4 100644 --- a/shell/browser/atom_browser_main_parts_posix.cc +++ b/shell/browser/atom_browser_main_parts_posix.cc @@ -21,7 +21,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -221,4 +221,4 @@ void AtomBrowserMainParts::HandleShutdownSignals() { CHECK_EQ(sigaction(SIGHUP, &action, nullptr), 0); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_download_manager_delegate.cc b/shell/browser/atom_download_manager_delegate.cc index cf50b6b021..9c8f0abdd8 100644 --- a/shell/browser/atom_download_manager_delegate.cc +++ b/shell/browser/atom_download_manager_delegate.cc @@ -26,7 +26,7 @@ #include "shell/common/native_mate_converters/callback.h" #include "shell/common/options_switches.h" -namespace atom { +namespace electron { namespace { @@ -122,7 +122,7 @@ void AtomDownloadManagerDelegate::OnDownloadPathGenerated( settings.force_detached = offscreen; v8::Isolate* isolate = v8::Isolate::GetCurrent(); - atom::util::Promise dialog_promise(isolate); + electron::util::Promise dialog_promise(isolate); auto dialog_callback = base::BindOnce(&AtomDownloadManagerDelegate::OnDownloadSaveDialogDone, base::Unretained(this), download_id, callback); @@ -241,4 +241,4 @@ void AtomDownloadManagerDelegate::GetNextId( callback.Run(next_id++); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_download_manager_delegate.h b/shell/browser/atom_download_manager_delegate.h index d6539eca1d..06d632b54b 100644 --- a/shell/browser/atom_download_manager_delegate.h +++ b/shell/browser/atom_download_manager_delegate.h @@ -15,7 +15,7 @@ namespace content { class DownloadManager; } -namespace atom { +namespace electron { class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate { public: @@ -56,6 +56,6 @@ class AtomDownloadManagerDelegate : public content::DownloadManagerDelegate { DISALLOW_COPY_AND_ASSIGN(AtomDownloadManagerDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_DOWNLOAD_MANAGER_DELEGATE_H_ diff --git a/shell/browser/atom_gpu_client.cc b/shell/browser/atom_gpu_client.cc index 28fba07f42..f5e04fc449 100644 --- a/shell/browser/atom_gpu_client.cc +++ b/shell/browser/atom_gpu_client.cc @@ -10,7 +10,7 @@ #include #endif -namespace atom { +namespace electron { AtomGpuClient::AtomGpuClient() = default; @@ -22,4 +22,4 @@ void AtomGpuClient::PreCreateMessageLoop() { #endif } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_gpu_client.h b/shell/browser/atom_gpu_client.h index 391e1a7628..fc64f2a849 100644 --- a/shell/browser/atom_gpu_client.h +++ b/shell/browser/atom_gpu_client.h @@ -7,7 +7,7 @@ #include "content/public/gpu/content_gpu_client.h" -namespace atom { +namespace electron { class AtomGpuClient : public content::ContentGpuClient { public: @@ -20,6 +20,6 @@ class AtomGpuClient : public content::ContentGpuClient { DISALLOW_COPY_AND_ASSIGN(AtomGpuClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_GPU_CLIENT_H_ diff --git a/shell/browser/atom_javascript_dialog_manager.cc b/shell/browser/atom_javascript_dialog_manager.cc index 1edba554b4..508ca62c07 100644 --- a/shell/browser/atom_javascript_dialog_manager.cc +++ b/shell/browser/atom_javascript_dialog_manager.cc @@ -19,7 +19,7 @@ using content::JavaScriptDialogType; -namespace atom { +namespace electron { namespace { @@ -91,14 +91,14 @@ void AtomJavaScriptDialogManager::RunJavaScriptDialog( window = relay->GetNativeWindow(); } - atom::MessageBoxSettings settings; + electron::MessageBoxSettings settings; settings.parent_window = window; settings.buttons = buttons; settings.default_id = default_id; settings.cancel_id = cancel_id; settings.message = base::UTF16ToUTF8(message_text); - atom::ShowMessageBox( + electron::ShowMessageBox( settings, base::BindOnce(&AtomJavaScriptDialogManager::OnMessageBoxCallback, base::Unretained(this), base::Passed(std::move(callback)), @@ -129,4 +129,4 @@ void AtomJavaScriptDialogManager::OnMessageBoxCallback( std::move(callback).Run(code == 0, base::string16()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_javascript_dialog_manager.h b/shell/browser/atom_javascript_dialog_manager.h index 8acc994046..330490a6a0 100644 --- a/shell/browser/atom_javascript_dialog_manager.h +++ b/shell/browser/atom_javascript_dialog_manager.h @@ -10,7 +10,7 @@ #include "content/public/browser/javascript_dialog_manager.h" -namespace atom { +namespace electron { namespace api { class WebContents; @@ -46,6 +46,6 @@ class AtomJavaScriptDialogManager : public content::JavaScriptDialogManager { std::map origin_counts_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_JAVASCRIPT_DIALOG_MANAGER_H_ diff --git a/shell/browser/atom_navigation_throttle.cc b/shell/browser/atom_navigation_throttle.cc index c3268210cd..db21787216 100644 --- a/shell/browser/atom_navigation_throttle.cc +++ b/shell/browser/atom_navigation_throttle.cc @@ -7,7 +7,7 @@ #include "content/public/browser/navigation_handle.h" #include "shell/browser/api/atom_api_web_contents.h" -namespace atom { +namespace electron { AtomNavigationThrottle::AtomNavigationThrottle( content::NavigationHandle* navigation_handle) @@ -29,7 +29,7 @@ AtomNavigationThrottle::WillRedirectRequest() { } auto api_contents = - atom::api::WebContents::From(v8::Isolate::GetCurrent(), contents); + electron::api::WebContents::From(v8::Isolate::GetCurrent(), contents); if (api_contents.IsEmpty()) { // No need to emit any event if the WebContents is not available in JS. return PROCEED; @@ -41,4 +41,4 @@ AtomNavigationThrottle::WillRedirectRequest() { return PROCEED; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_navigation_throttle.h b/shell/browser/atom_navigation_throttle.h index 8e57735e33..ca67a8cd25 100644 --- a/shell/browser/atom_navigation_throttle.h +++ b/shell/browser/atom_navigation_throttle.h @@ -7,7 +7,7 @@ #include "content/public/browser/navigation_throttle.h" -namespace atom { +namespace electron { class AtomNavigationThrottle : public content::NavigationThrottle { public: @@ -22,6 +22,6 @@ class AtomNavigationThrottle : public content::NavigationThrottle { DISALLOW_COPY_AND_ASSIGN(AtomNavigationThrottle); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_NAVIGATION_THROTTLE_H_ diff --git a/shell/browser/atom_paths.h b/shell/browser/atom_paths.h index dae4354eb0..d534b8991a 100644 --- a/shell/browser/atom_paths.h +++ b/shell/browser/atom_paths.h @@ -17,7 +17,7 @@ #include "base/base_paths_posix.h" #endif -namespace atom { +namespace electron { enum { PATH_START = 11000, @@ -45,6 +45,6 @@ enum { static_assert(PATH_START < PATH_END, "invalid PATH boundaries"); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_PATHS_H_ diff --git a/shell/browser/atom_permission_manager.cc b/shell/browser/atom_permission_manager.cc index 9e6f8ba03a..cb4d9daa36 100644 --- a/shell/browser/atom_permission_manager.cc +++ b/shell/browser/atom_permission_manager.cc @@ -19,7 +19,7 @@ #include "shell/browser/atom_browser_main_parts.h" #include "shell/browser/web_contents_preferences.h" -namespace atom { +namespace electron { namespace { @@ -265,4 +265,4 @@ AtomPermissionManager::GetPermissionStatusForFrame( return blink::mojom::PermissionStatus::GRANTED; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_permission_manager.h b/shell/browser/atom_permission_manager.h index 27e5e34f72..d1a4c6889c 100644 --- a/shell/browser/atom_permission_manager.h +++ b/shell/browser/atom_permission_manager.h @@ -18,7 +18,7 @@ namespace content { class WebContents; } -namespace atom { +namespace electron { class AtomPermissionManager : public content::PermissionControllerDelegate { public: @@ -110,6 +110,6 @@ class AtomPermissionManager : public content::PermissionControllerDelegate { DISALLOW_COPY_AND_ASSIGN(AtomPermissionManager); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_PERMISSION_MANAGER_H_ diff --git a/shell/browser/atom_quota_permission_context.cc b/shell/browser/atom_quota_permission_context.cc index 81c0258597..2cd0801728 100644 --- a/shell/browser/atom_quota_permission_context.cc +++ b/shell/browser/atom_quota_permission_context.cc @@ -4,7 +4,7 @@ #include "shell/browser/atom_quota_permission_context.h" -namespace atom { +namespace electron { AtomQuotaPermissionContext::AtomQuotaPermissionContext() {} @@ -17,4 +17,4 @@ void AtomQuotaPermissionContext::RequestQuotaPermission( callback.Run(response::QUOTA_PERMISSION_RESPONSE_ALLOW); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_quota_permission_context.h b/shell/browser/atom_quota_permission_context.h index 00c536560a..ba8f0bc066 100644 --- a/shell/browser/atom_quota_permission_context.h +++ b/shell/browser/atom_quota_permission_context.h @@ -8,7 +8,7 @@ #include "content/public/browser/quota_permission_context.h" #include "content/public/common/storage_quota_params.h" -namespace atom { +namespace electron { class AtomQuotaPermissionContext : public content::QuotaPermissionContext { public: @@ -27,6 +27,6 @@ class AtomQuotaPermissionContext : public content::QuotaPermissionContext { DISALLOW_COPY_AND_ASSIGN(AtomQuotaPermissionContext); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_QUOTA_PERMISSION_CONTEXT_H_ diff --git a/shell/browser/atom_speech_recognition_manager_delegate.cc b/shell/browser/atom_speech_recognition_manager_delegate.cc index 7cf130537b..deabaa66a3 100644 --- a/shell/browser/atom_speech_recognition_manager_delegate.cc +++ b/shell/browser/atom_speech_recognition_manager_delegate.cc @@ -9,7 +9,7 @@ #include "base/callback.h" -namespace atom { +namespace electron { AtomSpeechRecognitionManagerDelegate::AtomSpeechRecognitionManagerDelegate() {} @@ -59,4 +59,4 @@ bool AtomSpeechRecognitionManagerDelegate::FilterProfanities( return false; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_speech_recognition_manager_delegate.h b/shell/browser/atom_speech_recognition_manager_delegate.h index f35b99482d..6b22b3ae21 100644 --- a/shell/browser/atom_speech_recognition_manager_delegate.h +++ b/shell/browser/atom_speech_recognition_manager_delegate.h @@ -12,7 +12,7 @@ #include "content/public/browser/speech_recognition_event_listener.h" #include "content/public/browser/speech_recognition_manager_delegate.h" -namespace atom { +namespace electron { class AtomSpeechRecognitionManagerDelegate : public content::SpeechRecognitionManagerDelegate, @@ -51,6 +51,6 @@ class AtomSpeechRecognitionManagerDelegate DISALLOW_COPY_AND_ASSIGN(AtomSpeechRecognitionManagerDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_SPEECH_RECOGNITION_MANAGER_DELEGATE_H_ diff --git a/shell/browser/atom_web_ui_controller_factory.cc b/shell/browser/atom_web_ui_controller_factory.cc index b8255ee443..c810815163 100644 --- a/shell/browser/atom_web_ui_controller_factory.cc +++ b/shell/browser/atom_web_ui_controller_factory.cc @@ -19,7 +19,7 @@ #include "content/public/browser/web_contents.h" #include "shell/browser/ui/devtools_ui.h" -namespace atom { +namespace electron { namespace { @@ -96,4 +96,4 @@ AtomWebUIControllerFactory::CreateWebUIControllerForURL(content::WebUI* web_ui, return std::unique_ptr(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/atom_web_ui_controller_factory.h b/shell/browser/atom_web_ui_controller_factory.h index ae9b0856d6..6f52740e37 100644 --- a/shell/browser/atom_web_ui_controller_factory.h +++ b/shell/browser/atom_web_ui_controller_factory.h @@ -12,7 +12,7 @@ #include "content/public/browser/web_ui_controller.h" #include "content/public/browser/web_ui_controller_factory.h" -namespace atom { +namespace electron { class AtomWebUIControllerFactory : public content::WebUIControllerFactory { public: @@ -38,6 +38,6 @@ class AtomWebUIControllerFactory : public content::WebUIControllerFactory { DISALLOW_COPY_AND_ASSIGN(AtomWebUIControllerFactory); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ATOM_WEB_UI_CONTROLLER_FACTORY_H_ diff --git a/shell/browser/auto_updater_mac.mm b/shell/browser/auto_updater_mac.mm index fa46614deb..9bf86539fd 100644 --- a/shell/browser/auto_updater_mac.mm +++ b/shell/browser/auto_updater_mac.mm @@ -87,7 +87,7 @@ void AutoUpdater::SetFeedURL(mate::Arguments* args) { @try { if (serverType == "json") { NSString* nsAppVersion = - base::SysUTF8ToNSString(atom::Browser::Get()->GetVersion()); + base::SysUTF8ToNSString(electron::Browser::Get()->GetVersion()); g_updater = [[SQRLUpdater alloc] initWithUpdateRequest:urlRequest forVersion:nsAppVersion]; } else { diff --git a/shell/browser/browser.cc b/shell/browser/browser.cc index 5473b4c6d1..feee108a8e 100644 --- a/shell/browser/browser.cc +++ b/shell/browser/browser.cc @@ -23,7 +23,7 @@ #include "shell/browser/window_list.h" #include "shell/common/application_info.h" -namespace atom { +namespace electron { Browser::LoginItemSettings::LoginItemSettings() = default; Browser::LoginItemSettings::~LoginItemSettings() = default; @@ -51,10 +51,10 @@ void Browser::Quit() { if (!is_quiting_) return; - if (atom::WindowList::IsEmpty()) + if (electron::WindowList::IsEmpty()) NotifyAndShutdown(); else - atom::WindowList::CloseAllWindows(); + electron::WindowList::CloseAllWindows(); } void Browser::Exit(mate::Arguments* args) { @@ -72,12 +72,12 @@ void Browser::Exit(mate::Arguments* args) { is_exiting_ = true; // Must destroy windows before quitting, otherwise bad things can happen. - if (atom::WindowList::IsEmpty()) { + if (electron::WindowList::IsEmpty()) { Shutdown(); } else { // Unlike Quit(), we do not ask to close window, but destroy the window // without asking. - atom::WindowList::DestroyAllWindows(); + electron::WindowList::DestroyAllWindows(); } } } @@ -249,4 +249,4 @@ void Browser::NewWindowForTab() { } #endif -} // namespace atom +} // namespace electron diff --git a/shell/browser/browser.h b/shell/browser/browser.h index fe6279970f..4c5e216b48 100644 --- a/shell/browser/browser.h +++ b/shell/browser/browser.h @@ -32,7 +32,7 @@ namespace gfx { class Image; } -namespace atom { +namespace electron { class AtomMenuModel; @@ -312,6 +312,6 @@ class Browser : public WindowListObserver { DISALLOW_COPY_AND_ASSIGN(Browser); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_BROWSER_H_ diff --git a/shell/browser/browser_linux.cc b/shell/browser/browser_linux.cc index cb2a1a3611..b3a6bd07a7 100644 --- a/shell/browser/browser_linux.cc +++ b/shell/browser/browser_linux.cc @@ -20,7 +20,7 @@ #include "chrome/browser/ui/libgtkui/unity_service.h" #endif -namespace atom { +namespace electron { const char kXdgSettings[] = "xdg-settings"; const char kXdgSettingsDefaultSchemeHandler[] = "default-url-scheme-handler"; @@ -186,4 +186,4 @@ void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/browser_mac.mm b/shell/browser/browser_mac.mm index 708bbf4ee2..97376fec8b 100644 --- a/shell/browser/browser_mac.mm +++ b/shell/browser/browser_mac.mm @@ -25,7 +25,7 @@ #include "ui/gfx/image/image.h" #include "url/gurl.h" -namespace atom { +namespace electron { void Browser::SetShutdownHandler(base::Callback handler) { [[AtomApplication sharedApplication] setShutdownHandler:std::move(handler)]; @@ -426,4 +426,4 @@ bool Browser::IsEmojiPanelSupported() { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 02fe91f47f..ab27ea992c 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -16,7 +16,7 @@ namespace base { class DictionaryValue; } -namespace atom { +namespace electron { class BrowserObserver : public base::CheckedObserver { public: @@ -87,6 +87,6 @@ class BrowserObserver : public base::CheckedObserver { ~BrowserObserver() override {} }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_BROWSER_OBSERVER_H_ diff --git a/shell/browser/browser_win.cc b/shell/browser/browser_win.cc index c39772b658..dbf22c2ff0 100644 --- a/shell/browser/browser_win.cc +++ b/shell/browser/browser_win.cc @@ -27,7 +27,7 @@ #include "shell/common/native_mate_converters/string16_converter.h" #include "ui/events/keycodes/keyboard_code_conversion_win.h" -namespace atom { +namespace electron { namespace { @@ -121,7 +121,7 @@ void Browser::ClearRecentDocuments() { } void Browser::SetAppUserModelID(const base::string16& name) { - atom::SetAppUserModelID(name); + electron::SetAppUserModelID(name); } bool Browser::SetUserTasks(const std::vector& tasks) { @@ -369,4 +369,4 @@ void Browser::ShowEmojiPanel() { ::SendInput(4, input, sizeof(INPUT)); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/child_web_contents_tracker.cc b/shell/browser/child_web_contents_tracker.cc index 70efe0147c..9d1d0962ed 100644 --- a/shell/browser/child_web_contents_tracker.cc +++ b/shell/browser/child_web_contents_tracker.cc @@ -4,11 +4,11 @@ #include "shell/browser/child_web_contents_tracker.h" -namespace atom { +namespace electron { ChildWebContentsTracker::ChildWebContentsTracker( content::WebContents* web_contents) {} WEB_CONTENTS_USER_DATA_KEY_IMPL(ChildWebContentsTracker) -} // namespace atom +} // namespace electron diff --git a/shell/browser/child_web_contents_tracker.h b/shell/browser/child_web_contents_tracker.h index 9da6b9af41..985d03a6b5 100644 --- a/shell/browser/child_web_contents_tracker.h +++ b/shell/browser/child_web_contents_tracker.h @@ -9,7 +9,7 @@ #include "content/public/browser/web_contents_user_data.h" -namespace atom { +namespace electron { // ChildWebContentsTracker tracks child WebContents // created by native `window.open()` @@ -27,6 +27,6 @@ struct ChildWebContentsTracker DISALLOW_COPY_AND_ASSIGN(ChildWebContentsTracker); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_CHILD_WEB_CONTENTS_TRACKER_H_ diff --git a/shell/browser/common_web_contents_delegate.cc b/shell/browser/common_web_contents_delegate.cc index 45104cd260..6b2b5413e9 100644 --- a/shell/browser/common_web_contents_delegate.cc +++ b/shell/browser/common_web_contents_delegate.cc @@ -57,7 +57,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -144,7 +144,7 @@ void AppendToFile(const base::FilePath& path, const std::string& content) { PrefService* GetPrefService(content::WebContents* web_contents) { auto* context = web_contents->GetBrowserContext(); - return static_cast(context)->prefs(); + return static_cast(context)->prefs(); } std::map GetAddedFileSystemPaths( @@ -657,4 +657,4 @@ void CommonWebContentsDelegate::HideAutofillPopup() { autofill_popup_->Hide(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/common_web_contents_delegate.h b/shell/browser/common_web_contents_delegate.h index c475054e2e..ee33f78e00 100644 --- a/shell/browser/common_web_contents_delegate.h +++ b/shell/browser/common_web_contents_delegate.h @@ -26,7 +26,7 @@ namespace base { class SequencedTaskRunner; } -namespace atom { +namespace electron { class AtomBrowserContext; class NativeWindow; @@ -213,6 +213,6 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate, DISALLOW_COPY_AND_ASSIGN(CommonWebContentsDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_COMMON_WEB_CONTENTS_DELEGATE_H_ diff --git a/shell/browser/common_web_contents_delegate_mac.mm b/shell/browser/common_web_contents_delegate_mac.mm index 075cebd733..3989e32fea 100644 --- a/shell/browser/common_web_contents_delegate_mac.mm +++ b/shell/browser/common_web_contents_delegate_mac.mm @@ -15,7 +15,7 @@ - (void)redispatchKeyEvent:(NSEvent*)event; @end -namespace atom { +namespace electron { bool CommonWebContentsDelegate::HandleKeyboardEvent( content::WebContents* source, @@ -53,4 +53,4 @@ bool CommonWebContentsDelegate::HandleKeyboardEvent( return false; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/common_web_contents_delegate_views.cc b/shell/browser/common_web_contents_delegate_views.cc index b8ad1c0d1e..7c6bc9e26d 100644 --- a/shell/browser/common_web_contents_delegate_views.cc +++ b/shell/browser/common_web_contents_delegate_views.cc @@ -15,7 +15,7 @@ #include "shell/browser/browser.h" #endif -namespace atom { +namespace electron { bool CommonWebContentsDelegate::HandleKeyboardEvent( content::WebContents* source, @@ -58,4 +58,4 @@ void CommonWebContentsDelegate::GetDevToolsWindowWMClass( } #endif -} // namespace atom +} // namespace electron diff --git a/shell/browser/cookie_change_notifier.cc b/shell/browser/cookie_change_notifier.cc index f1792dbb3e..fb2b6e89fc 100644 --- a/shell/browser/cookie_change_notifier.cc +++ b/shell/browser/cookie_change_notifier.cc @@ -15,7 +15,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { CookieChangeNotifier::CookieChangeNotifier(AtomBrowserContext* browser_context) : browser_context_(browser_context), binding_(this) { @@ -69,4 +69,4 @@ void CookieChangeNotifier::OnCookieChange( cookie_change_sub_list_.Notify(&cookie_details); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/cookie_change_notifier.h b/shell/browser/cookie_change_notifier.h index 0b8c8badf1..4914b637ef 100644 --- a/shell/browser/cookie_change_notifier.h +++ b/shell/browser/cookie_change_notifier.h @@ -12,7 +12,7 @@ #include "mojo/public/cpp/bindings/binding.h" #include "services/network/public/mojom/cookie_manager.mojom.h" -namespace atom { +namespace electron { class AtomBrowserContext; struct CookieDetails; @@ -43,6 +43,6 @@ class CookieChangeNotifier : public network::mojom::CookieChangeListener { DISALLOW_COPY_AND_ASSIGN(CookieChangeNotifier); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_COOKIE_CHANGE_NOTIFIER_H_ diff --git a/shell/browser/fake_location_provider.cc b/shell/browser/fake_location_provider.cc index c4973f6b70..2e0553f30b 100644 --- a/shell/browser/fake_location_provider.cc +++ b/shell/browser/fake_location_provider.cc @@ -7,7 +7,7 @@ #include "base/callback.h" #include "base/time/time.h" -namespace atom { +namespace electron { FakeLocationProvider::FakeLocationProvider() { position_.latitude = 10; @@ -41,4 +41,4 @@ void FakeLocationProvider::OnPermissionGranted() { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/fake_location_provider.h b/shell/browser/fake_location_provider.h index ebac4d12e0..b1b2d8c075 100644 --- a/shell/browser/fake_location_provider.h +++ b/shell/browser/fake_location_provider.h @@ -9,7 +9,7 @@ #include "services/device/public/cpp/geolocation/location_provider.h" #include "services/device/public/mojom/geoposition.mojom.h" -namespace atom { +namespace electron { class FakeLocationProvider : public device::LocationProvider { public: @@ -31,6 +31,6 @@ class FakeLocationProvider : public device::LocationProvider { DISALLOW_COPY_AND_ASSIGN(FakeLocationProvider); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_FAKE_LOCATION_PROVIDER_H_ diff --git a/shell/browser/feature_list.cc b/shell/browser/feature_list.cc index 14dfc8e242..fa8f3f581f 100644 --- a/shell/browser/feature_list.cc +++ b/shell/browser/feature_list.cc @@ -11,7 +11,7 @@ #include "base/feature_list.h" #include "content/public/common/content_features.h" -namespace atom { +namespace electron { void InitializeFeatureList() { auto* cmd_line = base::CommandLine::ForCurrentProcess(); @@ -28,4 +28,4 @@ void InitializeFeatureList() { base::FeatureList::InitializeInstance(enable_features, disable_features); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/feature_list.h b/shell/browser/feature_list.h index bafad71d84..9048c6913d 100644 --- a/shell/browser/feature_list.h +++ b/shell/browser/feature_list.h @@ -5,7 +5,7 @@ #ifndef SHELL_BROWSER_FEATURE_LIST_H_ #define SHELL_BROWSER_FEATURE_LIST_H_ -namespace atom { +namespace electron { void InitializeFeatureList(); } diff --git a/shell/browser/font_defaults.cc b/shell/browser/font_defaults.cc index bd0e73bfef..b37d1b1a2b 100644 --- a/shell/browser/font_defaults.cc +++ b/shell/browser/font_defaults.cc @@ -160,7 +160,7 @@ void FillFontFamilyMap(const char* map_name, } // namespace -namespace atom { +namespace electron { void SetFontDefaults(content::WebPreferences* prefs) { FillFontFamilyMap(prefs::kWebKitStandardFontFamilyMap, @@ -179,4 +179,4 @@ void SetFontDefaults(content::WebPreferences* prefs) { &prefs->pictograph_font_family_map); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/font_defaults.h b/shell/browser/font_defaults.h index c19e14db90..d549bd4a2d 100644 --- a/shell/browser/font_defaults.h +++ b/shell/browser/font_defaults.h @@ -9,10 +9,10 @@ namespace content { struct WebPreferences; } // namespace content -namespace atom { +namespace electron { void SetFontDefaults(content::WebPreferences* prefs); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_FONT_DEFAULTS_H_ diff --git a/shell/browser/io_thread.cc b/shell/browser/io_thread.cc index 7e3f2a7bb6..9e228fa933 100644 --- a/shell/browser/io_thread.cc +++ b/shell/browser/io_thread.cc @@ -37,7 +37,7 @@ IOThread::~IOThread() { } void IOThread::RegisterURLRequestContextGetter( - atom::URLRequestContextGetter* getter) { + electron::URLRequestContextGetter* getter) { base::AutoLock lock(lock_); DCHECK(!base::FeatureList::IsEnabled(network::features::kNetworkService)); @@ -46,7 +46,7 @@ void IOThread::RegisterURLRequestContextGetter( } void IOThread::DeregisterURLRequestContextGetter( - atom::URLRequestContextGetter* getter) { + electron::URLRequestContextGetter* getter) { base::AutoLock lock(lock_); DCHECK(!base::FeatureList::IsEnabled(network::features::kNetworkService)); diff --git a/shell/browser/io_thread.h b/shell/browser/io_thread.h index 4250d25a0a..1c7865641e 100644 --- a/shell/browser/io_thread.h +++ b/shell/browser/io_thread.h @@ -14,7 +14,7 @@ #include "services/network/public/mojom/network_service.mojom.h" #include "shell/browser/net/system_network_context_manager.h" -namespace atom { +namespace electron { class URLRequestContextGetter; } @@ -33,8 +33,10 @@ class IOThread : public content::BrowserThreadDelegate { SystemNetworkContextManager* system_network_context_manager); ~IOThread() override; - void RegisterURLRequestContextGetter(atom::URLRequestContextGetter* getter); - void DeregisterURLRequestContextGetter(atom::URLRequestContextGetter* getter); + void RegisterURLRequestContextGetter( + electron::URLRequestContextGetter* getter); + void DeregisterURLRequestContextGetter( + electron::URLRequestContextGetter* getter); protected: // BrowserThreadDelegate Implementation, runs on the IO thread. @@ -67,7 +69,7 @@ class IOThread : public content::BrowserThreadDelegate { // List of all request contexts that needs to be notified when // IO thread is shutting down. - std::set request_context_getters_; + std::set request_context_getters_; DISALLOW_COPY_AND_ASSIGN(IOThread); }; diff --git a/shell/browser/javascript_environment.cc b/shell/browser/javascript_environment.cc index 76e5abe450..5b1306e727 100644 --- a/shell/browser/javascript_environment.cc +++ b/shell/browser/javascript_environment.cc @@ -17,7 +17,7 @@ #include "shell/common/node_includes.h" #include "tracing/trace_event.h" -namespace atom { +namespace electron { JavascriptEnvironment::JavascriptEnvironment(uv_loop_t* event_loop) : isolate_(Initialize(event_loop)), @@ -83,4 +83,4 @@ NodeEnvironment::~NodeEnvironment() { node::FreeEnvironment(env_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/javascript_environment.h b/shell/browser/javascript_environment.h index 354398d957..67a21a0386 100644 --- a/shell/browser/javascript_environment.h +++ b/shell/browser/javascript_environment.h @@ -16,7 +16,7 @@ class Environment; class MultiIsolatePlatform; } // namespace node -namespace atom { +namespace electron { class MicrotasksRunner; // Manage the V8 isolate and context automatically. @@ -64,6 +64,6 @@ class NodeEnvironment { DISALLOW_COPY_AND_ASSIGN(NodeEnvironment); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_JAVASCRIPT_ENVIRONMENT_H_ diff --git a/shell/browser/lib/bluetooth_chooser.cc b/shell/browser/lib/bluetooth_chooser.cc index 81af9a8307..7c61b6b65f 100644 --- a/shell/browser/lib/bluetooth_chooser.cc +++ b/shell/browser/lib/bluetooth_chooser.cc @@ -10,10 +10,10 @@ namespace mate { template <> -struct Converter { +struct Converter { static v8::Local ToV8( v8::Isolate* isolate, - const atom::BluetoothChooser::DeviceInfo& val) { + const electron::BluetoothChooser::DeviceInfo& val) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); dict.Set("deviceName", val.device_name); dict.Set("deviceId", val.device_id); @@ -23,7 +23,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace { @@ -114,9 +114,9 @@ void BluetoothChooser::AddOrUpdateDevice(const std::string& device_id, } } -std::vector +std::vector BluetoothChooser::GetDeviceList() { - std::vector vec; + std::vector vec; for (const auto& it : device_map_) { DeviceInfo info = {it.first, it.second}; vec.push_back(info); @@ -125,4 +125,4 @@ BluetoothChooser::GetDeviceList() { return vec; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/lib/bluetooth_chooser.h b/shell/browser/lib/bluetooth_chooser.h index f9346ccf8d..d6f0f7c82f 100644 --- a/shell/browser/lib/bluetooth_chooser.h +++ b/shell/browser/lib/bluetooth_chooser.h @@ -12,7 +12,7 @@ #include "content/public/browser/bluetooth_chooser.h" #include "shell/browser/api/atom_api_web_contents.h" -namespace atom { +namespace electron { class BluetoothChooser : public content::BluetoothChooser { public: @@ -45,6 +45,6 @@ class BluetoothChooser : public content::BluetoothChooser { DISALLOW_COPY_AND_ASSIGN(BluetoothChooser); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_LIB_BLUETOOTH_CHOOSER_H_ diff --git a/shell/browser/lib/power_observer.h b/shell/browser/lib/power_observer.h index 5d7e729020..18a3d6011c 100644 --- a/shell/browser/lib/power_observer.h +++ b/shell/browser/lib/power_observer.h @@ -13,7 +13,7 @@ #include "base/power_monitor/power_observer.h" #endif // defined(OS_LINUX) -namespace atom { +namespace electron { #if defined(OS_LINUX) typedef PowerObserverLinux PowerObserver; @@ -21,6 +21,6 @@ typedef PowerObserverLinux PowerObserver; typedef base::PowerObserver PowerObserver; #endif // defined(OS_LINUX) -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_LIB_POWER_OBSERVER_H_ diff --git a/shell/browser/lib/power_observer_linux.cc b/shell/browser/lib/power_observer_linux.cc index 7273600c23..27a81cb46a 100644 --- a/shell/browser/lib/power_observer_linux.cc +++ b/shell/browser/lib/power_observer_linux.cc @@ -29,7 +29,7 @@ std::string get_executable_basename() { } // namespace -namespace atom { +namespace electron { PowerObserverLinux::PowerObserverLinux() : lock_owner_name_(get_executable_basename()), weak_ptr_factory_(this) { @@ -163,4 +163,4 @@ void PowerObserverLinux::OnSignalConnected(const std::string& /*interface*/, LOG_IF(WARNING, !success) << "Failed to connect to " << signal; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/lib/power_observer_linux.h b/shell/browser/lib/power_observer_linux.h index 5ccf5af594..9bdf034ae1 100644 --- a/shell/browser/lib/power_observer_linux.h +++ b/shell/browser/lib/power_observer_linux.h @@ -14,7 +14,7 @@ #include "dbus/message.h" #include "dbus/object_proxy.h" -namespace atom { +namespace electron { class PowerObserverLinux : public base::PowerObserver { public: @@ -49,6 +49,6 @@ class PowerObserverLinux : public base::PowerObserver { DISALLOW_COPY_AND_ASSIGN(PowerObserverLinux); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_LIB_POWER_OBSERVER_LINUX_H_ diff --git a/shell/browser/loader/layered_resource_handler.cc b/shell/browser/loader/layered_resource_handler.cc index 9dbfb71922..7693be4549 100644 --- a/shell/browser/loader/layered_resource_handler.cc +++ b/shell/browser/loader/layered_resource_handler.cc @@ -7,7 +7,7 @@ #include #include -namespace atom { +namespace electron { LayeredResourceHandler::LayeredResourceHandler( net::URLRequest* request, @@ -26,4 +26,4 @@ void LayeredResourceHandler::OnResponseStarted( next_handler_->OnResponseStarted(response, std::move(controller)); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/loader/layered_resource_handler.h b/shell/browser/loader/layered_resource_handler.h index 23d95d8e64..6ff18c4147 100644 --- a/shell/browser/loader/layered_resource_handler.h +++ b/shell/browser/loader/layered_resource_handler.h @@ -10,7 +10,7 @@ #include "content/browser/loader/layered_resource_handler.h" // nogncheck #include "services/network/public/cpp/resource_response.h" -namespace atom { +namespace electron { // Resource handler that notifies on various stages of a resource request. class LayeredResourceHandler : public content::LayeredResourceHandler { @@ -39,6 +39,6 @@ class LayeredResourceHandler : public content::LayeredResourceHandler { DISALLOW_COPY_AND_ASSIGN(LayeredResourceHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_LOADER_LAYERED_RESOURCE_HANDLER_H_ diff --git a/shell/browser/login_handler.cc b/shell/browser/login_handler.cc index 8429d2987a..4b63ad3377 100644 --- a/shell/browser/login_handler.cc +++ b/shell/browser/login_handler.cc @@ -18,7 +18,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { LoginHandler::LoginHandler(net::URLRequest* request, const net::AuthChallengeInfo& auth_info, @@ -92,4 +92,4 @@ void LoginHandler::DoLogin(const base::string16& username, } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/login_handler.h b/shell/browser/login_handler.h index 76b3325ee2..3facfac8e4 100644 --- a/shell/browser/login_handler.h +++ b/shell/browser/login_handler.h @@ -19,7 +19,7 @@ namespace content { class WebContents; } -namespace atom { +namespace electron { // Handles the HTTP basic auth, must be created on IO thread. class LoginHandler : public base::RefCountedThreadSafe { @@ -72,6 +72,6 @@ class LoginHandler : public base::RefCountedThreadSafe { DISALLOW_COPY_AND_ASSIGN(LoginHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_LOGIN_HANDLER_H_ diff --git a/shell/browser/mac/atom_application.mm b/shell/browser/mac/atom_application.mm index 3914c1ef64..f7082a3666 100644 --- a/shell/browser/mac/atom_application.mm +++ b/shell/browser/mac/atom_application.mm @@ -48,7 +48,7 @@ inline void dispatch_sync_main(dispatch_block_t block) { // We simply try to close the browser, which in turn will try to close the // windows. Termination can proceed if all windows are closed or window close // can be cancelled which will abort termination. - atom::Browser::Get()->Quit(); + electron::Browser::Get()->Quit(); } - (void)setShutdownHandler:(base::Callback)handler { @@ -118,9 +118,9 @@ inline void dispatch_sync_main(dispatch_block_t block) { std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); std::unique_ptr user_info = - atom::NSDictionaryToDictionaryValue(userActivity.userInfo); + electron::NSDictionaryToDictionaryValue(userActivity.userInfo); - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); shouldWait = browser->UpdateUserActivityState(activity_type, *user_info) ? YES : NO; }); @@ -145,9 +145,9 @@ inline void dispatch_sync_main(dispatch_block_t block) { std::string activity_type( base::SysNSStringToUTF8(userActivity.activityType)); std::unique_ptr user_info = - atom::NSDictionaryToDictionaryValue(userActivity.userInfo); + electron::NSDictionaryToDictionaryValue(userActivity.userInfo); - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); browser->UserActivityWasContinued(activity_type, *user_info); }); [userActivity setNeedsSave:YES]; @@ -167,7 +167,7 @@ inline void dispatch_sync_main(dispatch_block_t block) { withReplyEvent:(NSAppleEventDescriptor*)replyEvent { NSString* url = [[event paramDescriptorForKeyword:keyDirectObject] stringValue]; - atom::Browser::Get()->OpenURL(base::SysNSStringToUTF8(url)); + electron::Browser::Get()->OpenURL(base::SysNSStringToUTF8(url)); } - (bool)voiceOverEnabled { @@ -199,11 +199,11 @@ inline void dispatch_sync_main(dispatch_block_t block) { ax_state->DisableAccessibility(); } - atom::Browser::Get()->OnAccessibilitySupportChanged(); + electron::Browser::Get()->OnAccessibilitySupportChanged(); } - (void)orderFrontStandardAboutPanel:(id)sender { - atom::Browser::Get()->ShowAboutPanel(); + electron::Browser::Get()->ShowAboutPanel(); } - (void)addNativeEventProcessorObserver: diff --git a/shell/browser/mac/atom_application_delegate.h b/shell/browser/mac/atom_application_delegate.h index 5573dd734a..1805f256b1 100644 --- a/shell/browser/mac/atom_application_delegate.h +++ b/shell/browser/mac/atom_application_delegate.h @@ -12,6 +12,6 @@ } // Sets the menu that will be returned in "applicationDockMenu:". -- (void)setApplicationDockMenu:(atom::AtomMenuModel*)model; +- (void)setApplicationDockMenu:(electron::AtomMenuModel*)model; @end diff --git a/shell/browser/mac/atom_application_delegate.mm b/shell/browser/mac/atom_application_delegate.mm index 33a0d3feea..9cd911905e 100644 --- a/shell/browser/mac/atom_application_delegate.mm +++ b/shell/browser/mac/atom_application_delegate.mm @@ -42,7 +42,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; @implementation AtomApplicationDelegate -- (void)setApplicationDockMenu:(atom::AtomMenuModel*)model { +- (void)setApplicationDockMenu:(electron::AtomMenuModel*)model { menu_controller_.reset([[AtomMenuController alloc] initWithModel:model useDefaultAccelerator:NO]); } @@ -53,7 +53,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; setBool:NO forKey:@"NSFullScreenMenuItemEverywhere"]; - atom::Browser::Get()->WillFinishLaunching(); + electron::Browser::Get()->WillFinishLaunching(); } - (void)applicationDidFinishLaunching:(NSNotification*)notify { @@ -62,10 +62,10 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; if (user_notification.userInfo != nil) { std::unique_ptr launch_info = - atom::NSDictionaryToDictionaryValue(user_notification.userInfo); - atom::Browser::Get()->DidFinishLaunching(*launch_info); + electron::NSDictionaryToDictionaryValue(user_notification.userInfo); + electron::Browser::Get()->DidFinishLaunching(*launch_info); } else { - atom::Browser::Get()->DidFinishLaunching(base::DictionaryValue()); + electron::Browser::Get()->DidFinishLaunching(base::DictionaryValue()); } #if BUILDFLAG(USE_ALLOCATOR_SHIM) @@ -88,12 +88,12 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; - (BOOL)application:(NSApplication*)sender openFile:(NSString*)filename { std::string filename_str(base::SysNSStringToUTF8(filename)); - return atom::Browser::Get()->OpenFile(filename_str) ? YES : NO; + return electron::Browser::Get()->OpenFile(filename_str) ? YES : NO; } - (BOOL)applicationShouldHandleReopen:(NSApplication*)theApplication hasVisibleWindows:(BOOL)flag { - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); browser->Activate(static_cast(flag)); return flag; } @@ -109,11 +109,11 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; restorationHandler { std::string activity_type(base::SysNSStringToUTF8(userActivity.activityType)); std::unique_ptr user_info = - atom::NSDictionaryToDictionaryValue(userActivity.userInfo); + electron::NSDictionaryToDictionaryValue(userActivity.userInfo); if (!user_info) return NO; - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); return browser->ContinueUserActivity(activity_type, *user_info) ? YES : NO; } @@ -121,7 +121,7 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; willContinueUserActivityWithType:(NSString*)userActivityType { std::string activity_type(base::SysNSStringToUTF8(userActivityType)); - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); return browser->WillContinueUserActivity(activity_type) ? YES : NO; } @@ -132,12 +132,12 @@ static base::mac::ScopedObjCClassSwizzler* g_swizzle_imk_input_session; std::string error_message( base::SysNSStringToUTF8([error localizedDescription])); - atom::Browser* browser = atom::Browser::Get(); + electron::Browser* browser = electron::Browser::Get(); browser->DidFailToContinueUserActivity(activity_type, error_message); } - (IBAction)newWindowForTab:(id)sender { - atom::Browser::Get()->NewWindowForTab(); + electron::Browser::Get()->NewWindowForTab(); } @end diff --git a/shell/browser/mac/dict_util.h b/shell/browser/mac/dict_util.h index 242a9e5704..200c784771 100644 --- a/shell/browser/mac/dict_util.h +++ b/shell/browser/mac/dict_util.h @@ -14,7 +14,7 @@ class ListValue; class DictionaryValue; } // namespace base -namespace atom { +namespace electron { NSArray* ListValueToNSArray(const base::ListValue& value); @@ -25,6 +25,6 @@ NSDictionary* DictionaryValueToNSDictionary(const base::DictionaryValue& value); std::unique_ptr NSDictionaryToDictionaryValue( NSDictionary* dict); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_MAC_DICT_UTIL_H_ diff --git a/shell/browser/mac/dict_util.mm b/shell/browser/mac/dict_util.mm index 9e6e1120d7..642b5ad064 100644 --- a/shell/browser/mac/dict_util.mm +++ b/shell/browser/mac/dict_util.mm @@ -12,7 +12,7 @@ #include "base/strings/sys_string_conversions.h" #include "base/values.h" -namespace atom { +namespace electron { NSArray* ListValueToNSArray(const base::ListValue& value) { std::string json; @@ -127,4 +127,4 @@ std::unique_ptr NSDictionaryToDictionaryValue( return result; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/media/media_capture_devices_dispatcher.cc b/shell/browser/media/media_capture_devices_dispatcher.cc index 143cd7f7dc..4df83dee3c 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.cc +++ b/shell/browser/media/media_capture_devices_dispatcher.cc @@ -10,7 +10,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -142,4 +142,4 @@ void MediaCaptureDevicesDispatcher::OnSetCapturingLinkSecured( blink::MediaStreamType stream_type, bool is_secure) {} -} // namespace atom +} // namespace electron diff --git a/shell/browser/media/media_capture_devices_dispatcher.h b/shell/browser/media/media_capture_devices_dispatcher.h index 3077f2618a..b32e7ed364 100644 --- a/shell/browser/media/media_capture_devices_dispatcher.h +++ b/shell/browser/media/media_capture_devices_dispatcher.h @@ -12,7 +12,7 @@ #include "content/public/browser/media_stream_request.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" -namespace atom { +namespace electron { // This singleton is used to receive updates about media events from the content // layer. @@ -85,6 +85,6 @@ class MediaCaptureDevicesDispatcher : public content::MediaObserver { DISALLOW_COPY_AND_ASSIGN(MediaCaptureDevicesDispatcher); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_MEDIA_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ diff --git a/shell/browser/media/media_device_id_salt.cc b/shell/browser/media/media_device_id_salt.cc index 981ba40be2..d7602a852f 100644 --- a/shell/browser/media/media_device_id_salt.cc +++ b/shell/browser/media/media_device_id_salt.cc @@ -11,7 +11,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -51,4 +51,4 @@ void MediaDeviceIDSalt::Reset(PrefService* pref_service) { content::BrowserContext::CreateRandomMediaDeviceIDSalt()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/media/media_device_id_salt.h b/shell/browser/media/media_device_id_salt.h index 8ab02afead..b442e9d362 100644 --- a/shell/browser/media/media_device_id_salt.h +++ b/shell/browser/media/media_device_id_salt.h @@ -13,7 +13,7 @@ class PrefRegistrySimple; class PrefService; -namespace atom { +namespace electron { // MediaDeviceIDSalt is responsible for creating and retrieving a salt string // that is used for creating MediaSource IDs that can be cached by a web @@ -34,6 +34,6 @@ class MediaDeviceIDSalt { DISALLOW_COPY_AND_ASSIGN(MediaDeviceIDSalt); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_MEDIA_MEDIA_DEVICE_ID_SALT_H_ diff --git a/shell/browser/media/media_stream_devices_controller.cc b/shell/browser/media/media_stream_devices_controller.cc index dcb74ad1df..0f7b6e4163 100644 --- a/shell/browser/media/media_stream_devices_controller.cc +++ b/shell/browser/media/media_stream_devices_controller.cc @@ -11,7 +11,7 @@ #include "content/public/browser/media_stream_request.h" #include "shell/browser/media/media_capture_devices_dispatcher.h" -namespace atom { +namespace electron { namespace { @@ -196,4 +196,4 @@ void MediaStreamDevicesController::HandleUserMediaRequest() { std::unique_ptr()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/media/media_stream_devices_controller.h b/shell/browser/media/media_stream_devices_controller.h index dc339752b8..b2cd9c34d8 100644 --- a/shell/browser/media/media_stream_devices_controller.h +++ b/shell/browser/media/media_stream_devices_controller.h @@ -8,7 +8,7 @@ #include "content/public/browser/web_contents_delegate.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" -namespace atom { +namespace electron { class MediaStreamDevicesController { public: @@ -41,6 +41,6 @@ class MediaStreamDevicesController { DISALLOW_COPY_AND_ASSIGN(MediaStreamDevicesController); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_MEDIA_MEDIA_STREAM_DEVICES_CONTROLLER_H_ diff --git a/shell/browser/microtasks_runner.cc b/shell/browser/microtasks_runner.cc index 66f3b68658..c96645db19 100644 --- a/shell/browser/microtasks_runner.cc +++ b/shell/browser/microtasks_runner.cc @@ -6,7 +6,7 @@ #include "shell/browser/microtasks_runner.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { MicrotasksRunner::MicrotasksRunner(v8::Isolate* isolate) : isolate_(isolate) {} @@ -17,4 +17,4 @@ void MicrotasksRunner::DidProcessTask(const base::PendingTask& pending_task) { v8::MicrotasksScope::PerformCheckpoint(isolate_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/microtasks_runner.h b/shell/browser/microtasks_runner.h index 0c516a5218..09048c698c 100644 --- a/shell/browser/microtasks_runner.h +++ b/shell/browser/microtasks_runner.h @@ -11,7 +11,7 @@ namespace v8 { class Isolate; } -namespace atom { +namespace electron { // Microtasks like promise resolution, are run at the end of the current // task. This class implements a task observer that runs tells v8 to run them. @@ -31,6 +31,6 @@ class MicrotasksRunner : public base::MessageLoop::TaskObserver { v8::Isolate* isolate_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_MICROTASKS_RUNNER_H_ diff --git a/shell/browser/native_browser_view.cc b/shell/browser/native_browser_view.cc index 6c323d5f50..253b0e840c 100644 --- a/shell/browser/native_browser_view.cc +++ b/shell/browser/native_browser_view.cc @@ -9,7 +9,7 @@ #include "shell/browser/api/atom_api_web_contents.h" #include "shell/browser/ui/inspectable_web_contents.h" -namespace atom { +namespace electron { NativeBrowserView::NativeBrowserView( InspectableWebContents* inspectable_web_contents) @@ -25,4 +25,4 @@ content::WebContents* NativeBrowserView::GetWebContents() { return inspectable_web_contents_->GetWebContents(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_browser_view.h b/shell/browser/native_browser_view.h index 3acc2cddea..d5143f8956 100644 --- a/shell/browser/native_browser_view.h +++ b/shell/browser/native_browser_view.h @@ -15,7 +15,7 @@ namespace gfx { class Rect; } -namespace atom { +namespace electron { enum AutoResizeFlags { kAutoResizeWidth = 0x1, @@ -58,6 +58,6 @@ class NativeBrowserView { DISALLOW_COPY_AND_ASSIGN(NativeBrowserView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_H_ diff --git a/shell/browser/native_browser_view_mac.h b/shell/browser/native_browser_view_mac.h index d76cabb1d7..3ac72a21ea 100644 --- a/shell/browser/native_browser_view_mac.h +++ b/shell/browser/native_browser_view_mac.h @@ -11,7 +11,7 @@ #include "base/mac/scoped_nsobject.h" #include "shell/browser/native_browser_view.h" -namespace atom { +namespace electron { class NativeBrowserViewMac : public NativeBrowserView { public: @@ -30,6 +30,6 @@ class NativeBrowserViewMac : public NativeBrowserView { DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_MAC_H_ diff --git a/shell/browser/native_browser_view_mac.mm b/shell/browser/native_browser_view_mac.mm index 5528d723ae..dec69f1ad5 100644 --- a/shell/browser/native_browser_view_mac.mm +++ b/shell/browser/native_browser_view_mac.mm @@ -157,7 +157,7 @@ const NSAutoresizingMaskOptions kDefaultAutoResizingMask = @end -namespace atom { +namespace electron { NativeBrowserViewMac::NativeBrowserViewMac( InspectableWebContents* inspectable_web_contents) @@ -252,4 +252,4 @@ NativeBrowserView* NativeBrowserView::Create( return new NativeBrowserViewMac(inspectable_web_contents); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_browser_view_views.cc b/shell/browser/native_browser_view_views.cc index b54b957d77..f9b3a54180 100644 --- a/shell/browser/native_browser_view_views.cc +++ b/shell/browser/native_browser_view_views.cc @@ -9,7 +9,7 @@ #include "ui/views/background.h" #include "ui/views/view.h" -namespace atom { +namespace electron { NativeBrowserViewViews::NativeBrowserViewViews( InspectableWebContents* inspectable_web_contents) @@ -109,4 +109,4 @@ NativeBrowserView* NativeBrowserView::Create( return new NativeBrowserViewViews(inspectable_web_contents); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_browser_view_views.h b/shell/browser/native_browser_view_views.h index 7708a30e4c..b2ec13e52a 100644 --- a/shell/browser/native_browser_view_views.h +++ b/shell/browser/native_browser_view_views.h @@ -7,7 +7,7 @@ #include "shell/browser/native_browser_view.h" -namespace atom { +namespace electron { class NativeBrowserViewViews : public NativeBrowserView { public: @@ -42,6 +42,6 @@ class NativeBrowserViewViews : public NativeBrowserView { DISALLOW_COPY_AND_ASSIGN(NativeBrowserViewViews); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_BROWSER_VIEW_VIEWS_H_ diff --git a/shell/browser/native_window.cc b/shell/browser/native_window.cc index 0df60167bd..af4cbb94c5 100644 --- a/shell/browser/native_window.cc +++ b/shell/browser/native_window.cc @@ -21,7 +21,7 @@ #include "ui/display/win/screen_win.h" #endif -namespace atom { +namespace electron { namespace { @@ -595,4 +595,4 @@ NativeWindowRelay::~NativeWindowRelay() = default; WEB_CONTENTS_USER_DATA_KEY_IMPL(NativeWindowRelay) -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_window.h b/shell/browser/native_window.h index 3588783429..cc85d6538c 100644 --- a/shell/browser/native_window.h +++ b/shell/browser/native_window.h @@ -39,7 +39,7 @@ class Dictionary; class PersistentDictionary; } // namespace mate -namespace atom { +namespace electron { class AtomMenuModel; class NativeBrowserView; @@ -376,6 +376,6 @@ class NativeWindowRelay base::WeakPtr native_window_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_WINDOW_H_ diff --git a/shell/browser/native_window_mac.h b/shell/browser/native_window_mac.h index c1ab14ecb1..e4287a8ca1 100644 --- a/shell/browser/native_window_mac.h +++ b/shell/browser/native_window_mac.h @@ -23,7 +23,7 @@ @class CustomWindowButtonView; @class FullSizeContentView; -namespace atom { +namespace electron { class RootViewMac; @@ -224,6 +224,6 @@ class NativeWindowMac : public NativeWindow { DISALLOW_COPY_AND_ASSIGN(NativeWindowMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_WINDOW_MAC_H_ diff --git a/shell/browser/native_window_mac.mm b/shell/browser/native_window_mac.mm index 5a8198b395..f96e8ddccd 100644 --- a/shell/browser/native_window_mac.mm +++ b/shell/browser/native_window_mac.mm @@ -209,11 +209,11 @@ enum { NSWindowTabbingModeDisallowed = 2 }; namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Handle val, - atom::NativeWindowMac::TitleBarStyle* out) { - using TitleBarStyle = atom::NativeWindowMac::TitleBarStyle; + electron::NativeWindowMac::TitleBarStyle* out) { + using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle; std::string title_bar_style; if (!ConvertFromV8(isolate, val, &title_bar_style)) return false; @@ -232,7 +232,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace { @@ -1523,4 +1523,4 @@ NativeWindow* NativeWindow::Create(const mate::Dictionary& options, return new NativeWindowMac(options, parent); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_window_observer.h b/shell/browser/native_window_observer.h index 3402b9e540..03f07d36a4 100644 --- a/shell/browser/native_window_observer.h +++ b/shell/browser/native_window_observer.h @@ -21,7 +21,7 @@ namespace gfx { class Rect; } -namespace atom { +namespace electron { class NativeWindowObserver : public base::CheckedObserver { public: @@ -99,6 +99,6 @@ class NativeWindowObserver : public base::CheckedObserver { virtual void OnExecuteAppCommand(const std::string& command_name) {} }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_WINDOW_OBSERVER_H_ diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 005c699cd3..72585b84b1 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -64,7 +64,7 @@ #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" #endif -namespace atom { +namespace electron { namespace { @@ -653,7 +653,7 @@ void NativeWindowViews::MoveTop() { size.width(), size.height(), SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW); #elif defined(USE_X11) - atom::MoveWindowToForeground(GetAcceleratedWidget()); + electron::MoveWindowToForeground(GetAcceleratedWidget()); #endif } @@ -1352,4 +1352,4 @@ NativeWindow* NativeWindow::Create(const mate::Dictionary& options, return new NativeWindowViews(options, parent); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index a4e0be5b70..16a7538dd7 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -23,7 +23,7 @@ namespace views { class UnhandledKeyboardEventHandler; } -namespace atom { +namespace electron { class GlobalMenuBarX11; class RootView; @@ -308,6 +308,6 @@ class NativeWindowViews : public NativeWindow, DISALLOW_COPY_AND_ASSIGN(NativeWindowViews); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NATIVE_WINDOW_VIEWS_H_ diff --git a/shell/browser/native_window_views_win.cc b/shell/browser/native_window_views_win.cc index 28d7d3c0a2..510dcbd9f7 100644 --- a/shell/browser/native_window_views_win.cc +++ b/shell/browser/native_window_views_win.cc @@ -19,7 +19,7 @@ // Must be included after other Windows headers. #include -namespace atom { +namespace electron { namespace { @@ -610,4 +610,4 @@ LRESULT CALLBACK NativeWindowViews::MouseHookProc(int n_code, return CallNextHookEx(NULL, n_code, w_param, l_param); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/about_protocol_handler.cc b/shell/browser/net/about_protocol_handler.cc index 712b57c271..6441cf0485 100644 --- a/shell/browser/net/about_protocol_handler.cc +++ b/shell/browser/net/about_protocol_handler.cc @@ -6,7 +6,7 @@ #include "shell/browser/net/url_request_about_job.h" -namespace atom { +namespace electron { AboutProtocolHandler::AboutProtocolHandler() {} @@ -22,4 +22,4 @@ bool AboutProtocolHandler::IsSafeRedirectTarget(const GURL& location) const { return false; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/about_protocol_handler.h b/shell/browser/net/about_protocol_handler.h index d2bbc39c44..0db60fa2d7 100644 --- a/shell/browser/net/about_protocol_handler.h +++ b/shell/browser/net/about_protocol_handler.h @@ -7,7 +7,7 @@ #include "net/url_request/url_request_job_factory.h" -namespace atom { +namespace electron { class AboutProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { public: @@ -24,6 +24,6 @@ class AboutProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { DISALLOW_COPY_AND_ASSIGN(AboutProtocolHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ABOUT_PROTOCOL_HANDLER_H_ diff --git a/shell/browser/net/asar/url_request_asar_job.cc b/shell/browser/net/asar/url_request_asar_job.cc index a2e5556b69..69523673cd 100644 --- a/shell/browser/net/asar/url_request_asar_job.cc +++ b/shell/browser/net/asar/url_request_asar_job.cc @@ -215,7 +215,7 @@ void URLRequestAsarJob::GetResponseInfo(net::HttpResponseInfo* info) { std::string status("HTTP/1.1 200 OK"); auto* headers = new net::HttpResponseHeaders(status); - headers->AddHeader(atom::kCORSHeader); + headers->AddHeader(electron::kCORSHeader); info->headers = headers; } diff --git a/shell/browser/net/atom_cert_verifier.cc b/shell/browser/net/atom_cert_verifier.cc index 5a5d5232fe..e1463681d9 100644 --- a/shell/browser/net/atom_cert_verifier.cc +++ b/shell/browser/net/atom_cert_verifier.cc @@ -20,7 +20,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { VerifyRequestParams::VerifyRequestParams() = default; VerifyRequestParams::~VerifyRequestParams() = default; @@ -206,4 +206,4 @@ CertVerifierRequest* AtomCertVerifier::FindRequest( return nullptr; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/atom_cert_verifier.h b/shell/browser/net/atom_cert_verifier.h index ef2a0c6e8b..65419fd0d2 100644 --- a/shell/browser/net/atom_cert_verifier.h +++ b/shell/browser/net/atom_cert_verifier.h @@ -11,7 +11,7 @@ #include "net/cert/cert_verifier.h" -namespace atom { +namespace electron { class CertVerifierRequest; class RequireCTDelegate; @@ -66,6 +66,6 @@ class AtomCertVerifier : public net::CertVerifier { DISALLOW_COPY_AND_ASSIGN(AtomCertVerifier); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ATOM_CERT_VERIFIER_H_ diff --git a/shell/browser/net/atom_network_delegate.cc b/shell/browser/net/atom_network_delegate.cc index 0c00ada9b2..76515286d0 100644 --- a/shell/browser/net/atom_network_delegate.cc +++ b/shell/browser/net/atom_network_delegate.cc @@ -25,7 +25,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { const char* ResourceTypeToString(content::ResourceType type) { switch (type) { @@ -51,7 +51,7 @@ const char* ResourceTypeToString(content::ResourceType type) { int32_t GetWebContentsID(int process_id, int frame_id) { auto* webContents = content::WebContents::FromRenderFrameHost( content::RenderFrameHost::FromID(process_id, frame_id)); - return atom::api::WebContents::GetIDFromWrappedClass(webContents); + return electron::api::WebContents::GetIDFromWrappedClass(webContents); } namespace { @@ -542,4 +542,4 @@ void AtomNetworkDelegate::OnListenerResultInUI( base::Unretained(this), id, out, std::move(copy))); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/atom_network_delegate.h b/shell/browser/net/atom_network_delegate.h index cdd44429cb..ec1cce968a 100644 --- a/shell/browser/net/atom_network_delegate.h +++ b/shell/browser/net/atom_network_delegate.h @@ -22,7 +22,7 @@ class URLPattern; -namespace atom { +namespace electron { using URLPatterns = std::set; @@ -178,6 +178,6 @@ class AtomNetworkDelegate : public net::NetworkDelegate { DISALLOW_COPY_AND_ASSIGN(AtomNetworkDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ATOM_NETWORK_DELEGATE_H_ diff --git a/shell/browser/net/atom_url_loader_factory.cc b/shell/browser/net/atom_url_loader_factory.cc index 266d241f85..677b4a5020 100644 --- a/shell/browser/net/atom_url_loader_factory.cc +++ b/shell/browser/net/atom_url_loader_factory.cc @@ -34,23 +34,23 @@ using content::BrowserThread; namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::ProtocolType* out) { + electron::ProtocolType* out) { std::string type; if (!ConvertFromV8(isolate, val, &type)) return false; if (type == "buffer") - *out = atom::ProtocolType::kBuffer; + *out = electron::ProtocolType::kBuffer; else if (type == "string") - *out = atom::ProtocolType::kString; + *out = electron::ProtocolType::kString; else if (type == "file") - *out = atom::ProtocolType::kFile; + *out = electron::ProtocolType::kFile; else if (type == "http") - *out = atom::ProtocolType::kHttp; + *out = electron::ProtocolType::kHttp; else if (type == "stream") - *out = atom::ProtocolType::kStream; + *out = electron::ProtocolType::kStream; else // note "free" is internal type, not allowed to be passed from user return false; return true; @@ -59,7 +59,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace { @@ -478,4 +478,4 @@ void AtomURLLoaderFactory::SendContents( base::BindOnce(OnWrite, std::move(write_data))); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/atom_url_loader_factory.h b/shell/browser/net/atom_url_loader_factory.h index c59fe43e2f..3a98a25d66 100644 --- a/shell/browser/net/atom_url_loader_factory.h +++ b/shell/browser/net/atom_url_loader_factory.h @@ -14,7 +14,7 @@ #include "net/url_request/url_request_job_factory.h" #include "services/network/public/mojom/url_loader_factory.mojom.h" -namespace atom { +namespace electron { // Old Protocol API can only serve one type of response for one scheme. enum class ProtocolType { @@ -106,6 +106,6 @@ class AtomURLLoaderFactory : public network::mojom::URLLoaderFactory { DISALLOW_COPY_AND_ASSIGN(AtomURLLoaderFactory); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ATOM_URL_LOADER_FACTORY_H_ diff --git a/shell/browser/net/atom_url_request.cc b/shell/browser/net/atom_url_request.cc index 4a63b0e845..4de254e88e 100644 --- a/shell/browser/net/atom_url_request.cc +++ b/shell/browser/net/atom_url_request.cc @@ -26,7 +26,7 @@ namespace { const int kBufferSize = 4096; } // namespace -namespace atom { +namespace electron { namespace internal { @@ -518,4 +518,4 @@ void AtomURLRequest::GetUploadProgress(mate::Dictionary* progress) const { progress->Set("total", upload_progress.size()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/atom_url_request.h b/shell/browser/net/atom_url_request.h index 86af07cd52..2f1542de73 100644 --- a/shell/browser/net/atom_url_request.h +++ b/shell/browser/net/atom_url_request.h @@ -22,7 +22,7 @@ #include "shell/browser/api/atom_api_url_request.h" #include "shell/browser/atom_browser_context.h" -namespace atom { +namespace electron { class AtomURLRequest : public base::RefCountedThreadSafe, public net::URLRequest::Delegate, @@ -117,6 +117,6 @@ class AtomURLRequest : public base::RefCountedThreadSafe, DISALLOW_COPY_AND_ASSIGN(AtomURLRequest); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ATOM_URL_REQUEST_H_ diff --git a/shell/browser/net/atom_url_request_job_factory.cc b/shell/browser/net/atom_url_request_job_factory.cc index b906cb3438..55adf46d5e 100644 --- a/shell/browser/net/atom_url_request_job_factory.cc +++ b/shell/browser/net/atom_url_request_job_factory.cc @@ -15,7 +15,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -144,4 +144,4 @@ bool AtomURLRequestJobFactory::IsSafeRedirectTarget( return IsHandledProtocol(location.scheme()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/atom_url_request_job_factory.h b/shell/browser/net/atom_url_request_job_factory.h index 477f8ba136..c15506c20b 100644 --- a/shell/browser/net/atom_url_request_job_factory.h +++ b/shell/browser/net/atom_url_request_job_factory.h @@ -14,7 +14,7 @@ #include "net/url_request/url_request_job_factory.h" -namespace atom { +namespace electron { const void* DisableProtocolInterceptFlagKey(); @@ -74,6 +74,6 @@ class AtomURLRequestJobFactory : public net::URLRequestJobFactory { DISALLOW_COPY_AND_ASSIGN(AtomURLRequestJobFactory); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_ATOM_URL_REQUEST_JOB_FACTORY_H_ diff --git a/shell/browser/net/cookie_details.h b/shell/browser/net/cookie_details.h index 1cc8cfba85..50a5b2969d 100644 --- a/shell/browser/net/cookie_details.h +++ b/shell/browser/net/cookie_details.h @@ -12,7 +12,7 @@ namespace net { class CanonicalCookie; } -namespace atom { +namespace electron { struct CookieDetails { public: @@ -26,6 +26,6 @@ struct CookieDetails { network::mojom::CookieChangeCause cause; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_COOKIE_DETAILS_H_ diff --git a/shell/browser/net/http_protocol_handler.cc b/shell/browser/net/http_protocol_handler.cc index 3e86261dca..7ed3d9d821 100644 --- a/shell/browser/net/http_protocol_handler.cc +++ b/shell/browser/net/http_protocol_handler.cc @@ -6,7 +6,7 @@ #include "net/url_request/url_request_http_job.h" -namespace atom { +namespace electron { HttpProtocolHandler::HttpProtocolHandler(const std::string& scheme) : scheme_(scheme) {} @@ -19,4 +19,4 @@ net::URLRequestJob* HttpProtocolHandler::MaybeCreateJob( return net::URLRequestHttpJob::Factory(request, network_delegate, scheme_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/http_protocol_handler.h b/shell/browser/net/http_protocol_handler.h index 8ec9fa2fd9..9e7843ce00 100644 --- a/shell/browser/net/http_protocol_handler.h +++ b/shell/browser/net/http_protocol_handler.h @@ -9,7 +9,7 @@ #include "net/url_request/url_request_job_factory.h" -namespace atom { +namespace electron { class HttpProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { public: @@ -25,6 +25,6 @@ class HttpProtocolHandler : public net::URLRequestJobFactory::ProtocolHandler { std::string scheme_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_HTTP_PROTOCOL_HANDLER_H_ diff --git a/shell/browser/net/js_asker.cc b/shell/browser/net/js_asker.cc index 4f1647517e..14d5f6f996 100644 --- a/shell/browser/net/js_asker.cc +++ b/shell/browser/net/js_asker.cc @@ -9,7 +9,7 @@ #include "content/public/browser/browser_thread.h" #include "shell/common/native_mate_converters/once_callback.h" -namespace atom { +namespace electron { JsAsker::JsAsker() = default; @@ -52,4 +52,4 @@ bool JsAsker::IsErrorOptions(base::Value* value, int* error) { return false; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/js_asker.h b/shell/browser/net/js_asker.h index 7f4d5a5220..5c1be26388 100644 --- a/shell/browser/net/js_asker.h +++ b/shell/browser/net/js_asker.h @@ -13,7 +13,7 @@ #include "net/url_request/url_request_context_getter.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { using JavaScriptHandler = base::Callback)>; @@ -53,6 +53,6 @@ class JsAsker { DISALLOW_COPY_AND_ASSIGN(JsAsker); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_JS_ASKER_H_ diff --git a/shell/browser/net/network_context_service.cc b/shell/browser/net/network_context_service.cc index 0c1a3598af..1a62239c72 100644 --- a/shell/browser/net/network_context_service.cc +++ b/shell/browser/net/network_context_service.cc @@ -11,7 +11,7 @@ #include "shell/browser/browser_process_impl.h" #include "shell/browser/net/system_network_context_manager.h" -namespace atom { +namespace electron { NetworkContextService::NetworkContextService(content::BrowserContext* context) : browser_context_(static_cast(context)), @@ -88,4 +88,4 @@ NetworkContextService::CreateNetworkContextParams(bool in_memory, return network_context_params; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/network_context_service.h b/shell/browser/net/network_context_service.h index db6cc02b4a..204cc56c2f 100644 --- a/shell/browser/net/network_context_service.h +++ b/shell/browser/net/network_context_service.h @@ -11,7 +11,7 @@ #include "services/network/public/mojom/network_context.mojom.h" #include "shell/browser/atom_browser_context.h" -namespace atom { +namespace electron { // KeyedService that initializes and provides access to the NetworkContexts for // a BrowserContext. @@ -36,6 +36,6 @@ class NetworkContextService : public KeyedService { ProxyConfigMonitor proxy_config_monitor_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_H_ diff --git a/shell/browser/net/network_context_service_factory.cc b/shell/browser/net/network_context_service_factory.cc index 4ee9c0ea53..86df4edeb1 100644 --- a/shell/browser/net/network_context_service_factory.cc +++ b/shell/browser/net/network_context_service_factory.cc @@ -7,7 +7,7 @@ #include "components/keyed_service/content/browser_context_dependency_manager.h" #include "shell/browser/net/network_context_service.h" -namespace atom { +namespace electron { NetworkContextService* NetworkContextServiceFactory::GetForContext( content::BrowserContext* browser_context) { @@ -37,4 +37,4 @@ content::BrowserContext* NetworkContextServiceFactory::GetBrowserContextToUse( return context; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/network_context_service_factory.h b/shell/browser/net/network_context_service_factory.h index 1d154c7f64..187aa25b0c 100644 --- a/shell/browser/net/network_context_service_factory.h +++ b/shell/browser/net/network_context_service_factory.h @@ -14,7 +14,7 @@ namespace contenet { class BrowserContext; } -namespace atom { +namespace electron { class NetworkContextService; @@ -45,6 +45,6 @@ class NetworkContextServiceFactory : public BrowserContextKeyedServiceFactory { content::BrowserContext* context) const override; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_NETWORK_CONTEXT_SERVICE_FACTORY_H_ diff --git a/shell/browser/net/node_stream_loader.cc b/shell/browser/net/node_stream_loader.cc index ec056f59c0..3014e6fb6b 100644 --- a/shell/browser/net/node_stream_loader.cc +++ b/shell/browser/net/node_stream_loader.cc @@ -11,7 +11,7 @@ #include "shell/common/node_includes.h" -namespace atom { +namespace electron { NodeStreamLoader::NodeStreamLoader(network::ResourceResponseHead head, network::mojom::URLLoaderRequest loader, @@ -139,4 +139,4 @@ void NodeStreamLoader::On(const char* event, EventCallback callback) { // No more code bellow, as this class may destruct when subscribing. } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/node_stream_loader.h b/shell/browser/net/node_stream_loader.h index 787cf865d2..47c21d9bd8 100644 --- a/shell/browser/net/node_stream_loader.h +++ b/shell/browser/net/node_stream_loader.h @@ -15,7 +15,7 @@ #include "services/network/public/mojom/url_loader.mojom.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { // Read data from node Stream and feed it to NetworkService. // @@ -82,6 +82,6 @@ class NodeStreamLoader : public network::mojom::URLLoader { DISALLOW_COPY_AND_ASSIGN(NodeStreamLoader); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_NODE_STREAM_LOADER_H_ diff --git a/shell/browser/net/proxying_url_loader_factory.cc b/shell/browser/net/proxying_url_loader_factory.cc index 43e01a117f..21d6f89c12 100644 --- a/shell/browser/net/proxying_url_loader_factory.cc +++ b/shell/browser/net/proxying_url_loader_factory.cc @@ -10,7 +10,7 @@ #include "services/network/public/mojom/url_loader.mojom.h" #include "shell/browser/net/asar/asar_url_loader.h" -namespace atom { +namespace electron { ProxyingURLLoaderFactory::ProxyingURLLoaderFactory( const HandlersMap& handlers, @@ -74,4 +74,4 @@ void ProxyingURLLoaderFactory::OnProxyBindingError() { delete this; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/proxying_url_loader_factory.h b/shell/browser/net/proxying_url_loader_factory.h index 924f048e18..50196c8d1d 100644 --- a/shell/browser/net/proxying_url_loader_factory.h +++ b/shell/browser/net/proxying_url_loader_factory.h @@ -7,7 +7,7 @@ #include "shell/browser/net/atom_url_loader_factory.h" -namespace atom { +namespace electron { class ProxyingURLLoaderFactory : public network::mojom::URLLoaderFactory { public: @@ -47,6 +47,6 @@ class ProxyingURLLoaderFactory : public network::mojom::URLLoaderFactory { DISALLOW_COPY_AND_ASSIGN(ProxyingURLLoaderFactory); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_PROXYING_URL_LOADER_FACTORY_H_ diff --git a/shell/browser/net/require_ct_delegate.cc b/shell/browser/net/require_ct_delegate.cc index c09defbbe4..b28ec16f2e 100644 --- a/shell/browser/net/require_ct_delegate.cc +++ b/shell/browser/net/require_ct_delegate.cc @@ -6,7 +6,7 @@ #include "content/public/browser/browser_thread.h" -namespace atom { +namespace electron { RequireCTDelegate::RequireCTDelegate() {} @@ -33,4 +33,4 @@ RequireCTDelegate::CTRequirementLevel RequireCTDelegate::IsCTRequiredForHost( return CTRequirementLevel::DEFAULT; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/require_ct_delegate.h b/shell/browser/net/require_ct_delegate.h index a6324b5b4f..88e350c104 100644 --- a/shell/browser/net/require_ct_delegate.h +++ b/shell/browser/net/require_ct_delegate.h @@ -10,7 +10,7 @@ #include "net/http/transport_security_state.h" -namespace atom { +namespace electron { class RequireCTDelegate : public net::TransportSecurityState::RequireCTDelegate { @@ -32,6 +32,6 @@ class RequireCTDelegate DISALLOW_COPY_AND_ASSIGN(RequireCTDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_REQUIRE_CT_DELEGATE_H_ diff --git a/shell/browser/net/resolve_proxy_helper.cc b/shell/browser/net/resolve_proxy_helper.cc index 3df1abcdce..fca8d13cee 100644 --- a/shell/browser/net/resolve_proxy_helper.cc +++ b/shell/browser/net/resolve_proxy_helper.cc @@ -16,7 +16,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { ResolveProxyHelper::ResolveProxyHelper(AtomBrowserContext* browser_context) : binding_(this), browser_context_(browser_context) {} @@ -97,4 +97,4 @@ ResolveProxyHelper::PendingRequest& ResolveProxyHelper::PendingRequest:: operator=(ResolveProxyHelper::PendingRequest&& pending_request) noexcept = default; -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/resolve_proxy_helper.h b/shell/browser/net/resolve_proxy_helper.h index 45deded1e8..bfbc4197fe 100644 --- a/shell/browser/net/resolve_proxy_helper.h +++ b/shell/browser/net/resolve_proxy_helper.h @@ -14,7 +14,7 @@ #include "services/network/public/mojom/proxy_lookup_client.mojom.h" #include "url/gurl.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -70,6 +70,6 @@ class ResolveProxyHelper DISALLOW_COPY_AND_ASSIGN(ResolveProxyHelper); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_RESOLVE_PROXY_HELPER_H_ diff --git a/shell/browser/net/system_network_context_manager.cc b/shell/browser/net/system_network_context_manager.cc index 394de07cb6..6e22d700ff 100644 --- a/shell/browser/net/system_network_context_manager.cc +++ b/shell/browser/net/system_network_context_manager.cc @@ -44,24 +44,24 @@ network::mojom::HttpAuthStaticParamsPtr CreateHttpAuthStaticParams() { } // namespace -namespace atom { +namespace electron { network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams() { auto* command_line = base::CommandLine::ForCurrentProcess(); network::mojom::HttpAuthDynamicParamsPtr auth_dynamic_params = network::mojom::HttpAuthDynamicParams::New(); - auth_dynamic_params->server_whitelist = - command_line->GetSwitchValueASCII(atom::switches::kAuthServerWhitelist); + auth_dynamic_params->server_whitelist = command_line->GetSwitchValueASCII( + electron::switches::kAuthServerWhitelist); auth_dynamic_params->delegate_whitelist = command_line->GetSwitchValueASCII( - atom::switches::kAuthNegotiateDelegateWhitelist); + electron::switches::kAuthNegotiateDelegateWhitelist); auth_dynamic_params->enable_negotiate_port = - command_line->HasSwitch(atom::switches::kEnableAuthNegotiatePort); + command_line->HasSwitch(electron::switches::kEnableAuthNegotiatePort); return auth_dynamic_params; } -} // namespace atom +} // namespace electron // SharedURLLoaderFactory backed by a SystemNetworkContextManager and its // network context. Transparently handles crashes. @@ -195,7 +195,7 @@ void SystemNetworkContextManager::SetUp( *network_context_params = CreateDefaultNetworkContextParams(); } *http_auth_static_params = CreateHttpAuthStaticParams(); - *http_auth_dynamic_params = atom::CreateHttpAuthDynamicParams(); + *http_auth_dynamic_params = electron::CreateHttpAuthDynamicParams(); } // static @@ -234,7 +234,8 @@ void SystemNetworkContextManager::OnNetworkServiceCreated( return; network_service->SetUpHttpAuth(CreateHttpAuthStaticParams()); - network_service->ConfigureHttpAuthPrefs(atom::CreateHttpAuthDynamicParams()); + network_service->ConfigureHttpAuthPrefs( + electron::CreateHttpAuthDynamicParams()); // The system NetworkContext must be created first, since it sets // |primary_network_context| to true. @@ -252,7 +253,7 @@ SystemNetworkContextManager::CreateNetworkContextParams() { network_context_params->context_name = std::string("system"); network_context_params->user_agent = - atom::AtomBrowserClient::Get()->GetUserAgent(); + electron::AtomBrowserClient::Get()->GetUserAgent(); network_context_params->http_cache_enabled = false; diff --git a/shell/browser/net/system_network_context_manager.h b/shell/browser/net/system_network_context_manager.h index 8d36a764e0..b3e2616a1f 100644 --- a/shell/browser/net/system_network_context_manager.h +++ b/shell/browser/net/system_network_context_manager.h @@ -27,7 +27,7 @@ namespace net_log { class NetExportFileWriter; } -namespace atom { +namespace electron { network::mojom::HttpAuthDynamicParamsPtr CreateHttpAuthDynamicParams(); } diff --git a/shell/browser/net/url_pipe_loader.cc b/shell/browser/net/url_pipe_loader.cc index ffac1923ed..1e655bee0a 100644 --- a/shell/browser/net/url_pipe_loader.cc +++ b/shell/browser/net/url_pipe_loader.cc @@ -8,7 +8,7 @@ #include "services/network/public/cpp/shared_url_loader_factory.h" -namespace atom { +namespace electron { URLPipeLoader::URLPipeLoader( scoped_refptr factory, @@ -99,4 +99,4 @@ void URLPipeLoader::OnComplete(bool success) { NotifyComplete(loader_->NetError()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_pipe_loader.h b/shell/browser/net/url_pipe_loader.h index d188f7faa1..9b09ff73b7 100644 --- a/shell/browser/net/url_pipe_loader.h +++ b/shell/browser/net/url_pipe_loader.h @@ -19,7 +19,7 @@ namespace network { class SharedURLLoaderFactory; } -namespace atom { +namespace electron { // Read data from URL and pipe it to NetworkService. // @@ -77,6 +77,6 @@ class URLPipeLoader : public network::mojom::URLLoader, DISALLOW_COPY_AND_ASSIGN(URLPipeLoader); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_PIPE_LOADER_H_ diff --git a/shell/browser/net/url_request_about_job.cc b/shell/browser/net/url_request_about_job.cc index a556fa2eab..520cff28c3 100644 --- a/shell/browser/net/url_request_about_job.cc +++ b/shell/browser/net/url_request_about_job.cc @@ -6,7 +6,7 @@ #include "base/threading/thread_task_runner_handle.h" -namespace atom { +namespace electron { URLRequestAboutJob::URLRequestAboutJob(net::URLRequest* request, net::NetworkDelegate* network_delegate) @@ -34,4 +34,4 @@ void URLRequestAboutJob::StartAsync() { NotifyHeadersComplete(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_about_job.h b/shell/browser/net/url_request_about_job.h index 3eb8132815..177b6de1e0 100644 --- a/shell/browser/net/url_request_about_job.h +++ b/shell/browser/net/url_request_about_job.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" #include "net/url_request/url_request_job.h" -namespace atom { +namespace electron { class URLRequestAboutJob : public net::URLRequestJob { public: @@ -30,6 +30,6 @@ class URLRequestAboutJob : public net::URLRequestJob { DISALLOW_COPY_AND_ASSIGN(URLRequestAboutJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_ABOUT_JOB_H_ diff --git a/shell/browser/net/url_request_async_asar_job.cc b/shell/browser/net/url_request_async_asar_job.cc index a99db5538a..b50d14091c 100644 --- a/shell/browser/net/url_request_async_asar_job.cc +++ b/shell/browser/net/url_request_async_asar_job.cc @@ -16,7 +16,7 @@ #include "shell/common/native_mate_converters/net_converter.h" #include "shell/common/native_mate_converters/v8_value_converter.h" -namespace atom { +namespace electron { namespace { @@ -121,4 +121,4 @@ void URLRequestAsyncAsarJob::GetResponseInfo(net::HttpResponseInfo* info) { info->headers = response_headers_; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_async_asar_job.h b/shell/browser/net/url_request_async_asar_job.h index 1095d236ed..aa7616810b 100644 --- a/shell/browser/net/url_request_async_asar_job.h +++ b/shell/browser/net/url_request_async_asar_job.h @@ -10,7 +10,7 @@ #include "shell/browser/net/asar/url_request_asar_job.h" #include "shell/browser/net/js_asker.h" -namespace atom { +namespace electron { // Like URLRequestAsarJob, but asks the JavaScript handler for file path. class URLRequestAsyncAsarJob : public asar::URLRequestAsarJob, public JsAsker { @@ -32,6 +32,6 @@ class URLRequestAsyncAsarJob : public asar::URLRequestAsarJob, public JsAsker { DISALLOW_COPY_AND_ASSIGN(URLRequestAsyncAsarJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_ASYNC_ASAR_JOB_H_ diff --git a/shell/browser/net/url_request_buffer_job.cc b/shell/browser/net/url_request_buffer_job.cc index a5973b16c1..8c29297ea3 100644 --- a/shell/browser/net/url_request_buffer_job.cc +++ b/shell/browser/net/url_request_buffer_job.cc @@ -19,7 +19,7 @@ #include "shell/common/native_mate_converters/net_converter.h" #include "shell/common/native_mate_converters/v8_value_converter.h" -namespace atom { +namespace electron { namespace { @@ -152,4 +152,4 @@ int URLRequestBufferJob::GetRefCountedData( return net::OK; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_buffer_job.h b/shell/browser/net/url_request_buffer_job.h index 48e3af2951..48cb38a012 100644 --- a/shell/browser/net/url_request_buffer_job.h +++ b/shell/browser/net/url_request_buffer_job.h @@ -13,7 +13,7 @@ #include "net/url_request/url_request_simple_job.h" #include "shell/browser/net/js_asker.h" -namespace atom { +namespace electron { class URLRequestBufferJob : public JsAsker, public net::URLRequestSimpleJob { public: @@ -44,6 +44,6 @@ class URLRequestBufferJob : public JsAsker, public net::URLRequestSimpleJob { DISALLOW_COPY_AND_ASSIGN(URLRequestBufferJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_BUFFER_JOB_H_ diff --git a/shell/browser/net/url_request_context_getter.cc b/shell/browser/net/url_request_context_getter.cc index cd18a8bf27..46279c23c2 100644 --- a/shell/browser/net/url_request_context_getter.cc +++ b/shell/browser/net/url_request_context_getter.cc @@ -63,7 +63,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -317,7 +317,7 @@ net::URLRequestContext* URLRequestContextGetter::GetURLRequestContext() { static_cast(url_request_context_->cookie_store()); std::vector cookie_schemes( {url::kHttpScheme, url::kHttpsScheme, url::kWsScheme, url::kWssScheme}); - const auto& custom_standard_schemes = atom::api::GetStandardSchemes(); + const auto& custom_standard_schemes = electron::api::GetStandardSchemes(); cookie_schemes.insert(cookie_schemes.end(), custom_standard_schemes.begin(), custom_standard_schemes.end()); cookie_monster->SetCookieableSchemes(cookie_schemes, base::NullCallback()); @@ -349,4 +349,4 @@ URLRequestContextGetter::GetNetworkTaskRunner() const { return base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_context_getter.h b/shell/browser/net/url_request_context_getter.h index 40b0af7aa9..d11198131b 100644 --- a/shell/browser/net/url_request_context_getter.h +++ b/shell/browser/net/url_request_context_getter.h @@ -20,7 +20,7 @@ #include "base/debug/leak_tracker.h" #endif -namespace atom { +namespace electron { class AtomBrowserContext; class AtomNetworkDelegate; @@ -109,6 +109,6 @@ class URLRequestContextGetter : public net::URLRequestContextGetter { DISALLOW_COPY_AND_ASSIGN(URLRequestContextGetter); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_CONTEXT_GETTER_H_ diff --git a/shell/browser/net/url_request_fetch_job.cc b/shell/browser/net/url_request_fetch_job.cc index 822855b054..51b7aa265a 100644 --- a/shell/browser/net/url_request_fetch_job.cc +++ b/shell/browser/net/url_request_fetch_job.cc @@ -28,7 +28,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -340,4 +340,4 @@ void URLRequestFetchJob::ClearWriteBuffer() { write_num_bytes_ = 0; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_fetch_job.h b/shell/browser/net/url_request_fetch_job.h index 140222ee80..251417b615 100644 --- a/shell/browser/net/url_request_fetch_job.h +++ b/shell/browser/net/url_request_fetch_job.h @@ -14,7 +14,7 @@ #include "net/url_request/url_request_job.h" #include "shell/browser/net/js_asker.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -76,6 +76,6 @@ class URLRequestFetchJob : public JsAsker, DISALLOW_COPY_AND_ASSIGN(URLRequestFetchJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_FETCH_JOB_H_ diff --git a/shell/browser/net/url_request_stream_job.cc b/shell/browser/net/url_request_stream_job.cc index c47cf0b9a6..5730478a1c 100644 --- a/shell/browser/net/url_request_stream_job.cc +++ b/shell/browser/net/url_request_stream_job.cc @@ -24,7 +24,7 @@ #include "shell/common/native_mate_converters/net_converter.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace { @@ -255,4 +255,4 @@ int URLRequestStreamJob::BufferCopy(std::vector* source, return bytes_written; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_stream_job.h b/shell/browser/net/url_request_stream_job.h index 8e84ca768d..214fd199db 100644 --- a/shell/browser/net/url_request_stream_job.h +++ b/shell/browser/net/url_request_stream_job.h @@ -16,7 +16,7 @@ #include "shell/browser/api/stream_subscriber.h" #include "shell/browser/net/js_asker.h" -namespace atom { +namespace electron { class URLRequestStreamJob : public JsAsker, public net::URLRequestJob { public: @@ -68,6 +68,6 @@ class URLRequestStreamJob : public JsAsker, public net::URLRequestJob { DISALLOW_COPY_AND_ASSIGN(URLRequestStreamJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_STREAM_JOB_H_ diff --git a/shell/browser/net/url_request_string_job.cc b/shell/browser/net/url_request_string_job.cc index 17478df6d0..94d24020b1 100644 --- a/shell/browser/net/url_request_string_job.cc +++ b/shell/browser/net/url_request_string_job.cc @@ -16,7 +16,7 @@ #include "shell/common/native_mate_converters/net_converter.h" #include "shell/common/native_mate_converters/v8_value_converter.h" -namespace atom { +namespace electron { namespace { @@ -114,4 +114,4 @@ int URLRequestStringJob::GetData(std::string* mime_type, return net::OK; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/net/url_request_string_job.h b/shell/browser/net/url_request_string_job.h index 4b857b9621..21a9731b72 100644 --- a/shell/browser/net/url_request_string_job.h +++ b/shell/browser/net/url_request_string_job.h @@ -11,7 +11,7 @@ #include "net/url_request/url_request_simple_job.h" #include "shell/browser/net/js_asker.h" -namespace atom { +namespace electron { class URLRequestStringJob : public JsAsker, public net::URLRequestSimpleJob { public: @@ -41,6 +41,6 @@ class URLRequestStringJob : public JsAsker, public net::URLRequestSimpleJob { DISALLOW_COPY_AND_ASSIGN(URLRequestStringJob); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NET_URL_REQUEST_STRING_JOB_H_ diff --git a/shell/browser/node_debugger.cc b/shell/browser/node_debugger.cc index 9569bb90fc..d8669c30d2 100644 --- a/shell/browser/node_debugger.cc +++ b/shell/browser/node_debugger.cc @@ -16,7 +16,7 @@ #include "native_mate/dictionary.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { NodeDebugger::NodeDebugger(node::Environment* env) : env_(env) {} @@ -64,4 +64,4 @@ void NodeDebugger::Stop() { inspector->Stop(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/node_debugger.h b/shell/browser/node_debugger.h index 321992c07e..e3a702d10e 100644 --- a/shell/browser/node_debugger.h +++ b/shell/browser/node_debugger.h @@ -11,7 +11,7 @@ namespace node { class Environment; } // namespace node -namespace atom { +namespace electron { // Add support for node's "--inspect" switch. class NodeDebugger { @@ -28,6 +28,6 @@ class NodeDebugger { DISALLOW_COPY_AND_ASSIGN(NodeDebugger); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NODE_DEBUGGER_H_ diff --git a/shell/browser/notifications/linux/libnotify_notification.cc b/shell/browser/notifications/linux/libnotify_notification.cc index f9c0f1d00c..3949188162 100644 --- a/shell/browser/notifications/linux/libnotify_notification.cc +++ b/shell/browser/notifications/linux/libnotify_notification.cc @@ -19,7 +19,7 @@ #include "shell/common/platform_util.h" #include "third_party/skia/include/core/SkBitmap.h" -namespace atom { +namespace electron { namespace { @@ -173,4 +173,4 @@ void LibnotifyNotification::OnNotificationView(NotifyNotification* notification, NotificationClicked(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/linux/libnotify_notification.h b/shell/browser/notifications/linux/libnotify_notification.h index b3b819d113..f3aa6ec6ff 100644 --- a/shell/browser/notifications/linux/libnotify_notification.h +++ b/shell/browser/notifications/linux/libnotify_notification.h @@ -12,7 +12,7 @@ #include "shell/browser/notifications/notification.h" #include "ui/base/glib/glib_signal.h" -namespace atom { +namespace electron { class LibnotifyNotification : public Notification { public: @@ -42,6 +42,6 @@ class LibnotifyNotification : public Notification { DISALLOW_COPY_AND_ASSIGN(LibnotifyNotification); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_LIBNOTIFY_NOTIFICATION_H_ diff --git a/shell/browser/notifications/linux/notification_presenter_linux.cc b/shell/browser/notifications/linux/notification_presenter_linux.cc index f4a256f99c..c7bae50e91 100644 --- a/shell/browser/notifications/linux/notification_presenter_linux.cc +++ b/shell/browser/notifications/linux/notification_presenter_linux.cc @@ -7,7 +7,7 @@ #include "shell/browser/notifications/linux/libnotify_notification.h" -namespace atom { +namespace electron { // static NotificationPresenter* NotificationPresenter::Create() { @@ -25,4 +25,4 @@ Notification* NotificationPresenterLinux::CreateNotificationObject( return new LibnotifyNotification(delegate, this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/linux/notification_presenter_linux.h b/shell/browser/notifications/linux/notification_presenter_linux.h index cbcceed341..1056ec87d4 100644 --- a/shell/browser/notifications/linux/notification_presenter_linux.h +++ b/shell/browser/notifications/linux/notification_presenter_linux.h @@ -8,7 +8,7 @@ #include "shell/browser/notifications/notification_presenter.h" -namespace atom { +namespace electron { class NotificationPresenterLinux : public NotificationPresenter { public: @@ -22,6 +22,6 @@ class NotificationPresenterLinux : public NotificationPresenter { DISALLOW_COPY_AND_ASSIGN(NotificationPresenterLinux); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_LINUX_NOTIFICATION_PRESENTER_LINUX_H_ diff --git a/shell/browser/notifications/mac/cocoa_notification.h b/shell/browser/notifications/mac/cocoa_notification.h index 5baca177e3..b6702505cb 100644 --- a/shell/browser/notifications/mac/cocoa_notification.h +++ b/shell/browser/notifications/mac/cocoa_notification.h @@ -14,7 +14,7 @@ #include "base/mac/scoped_nsobject.h" #include "shell/browser/notifications/notification.h" -namespace atom { +namespace electron { class CocoaNotification : public Notification { public: @@ -44,6 +44,6 @@ class CocoaNotification : public Notification { DISALLOW_COPY_AND_ASSIGN(CocoaNotification); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_MAC_COCOA_NOTIFICATION_H_ diff --git a/shell/browser/notifications/mac/cocoa_notification.mm b/shell/browser/notifications/mac/cocoa_notification.mm index e991985922..b4be600273 100644 --- a/shell/browser/notifications/mac/cocoa_notification.mm +++ b/shell/browser/notifications/mac/cocoa_notification.mm @@ -14,7 +14,7 @@ #include "shell/browser/notifications/notification_presenter.h" #include "skia/ext/skia_utils_mac.h" -namespace atom { +namespace electron { CocoaNotification::CocoaNotification(NotificationDelegate* delegate, NotificationPresenter* presenter) @@ -170,4 +170,4 @@ void CocoaNotification::LogAction(const char* action) { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/mac/notification_center_delegate.h b/shell/browser/notifications/mac/notification_center_delegate.h index c916dfc885..ec7e681fa3 100644 --- a/shell/browser/notifications/mac/notification_center_delegate.h +++ b/shell/browser/notifications/mac/notification_center_delegate.h @@ -7,16 +7,17 @@ #import -namespace atom { +namespace electron { class NotificationPresenterMac; } @interface NotificationCenterDelegate : NSObject { @private - atom::NotificationPresenterMac* presenter_; + electron::NotificationPresenterMac* presenter_; } -- (instancetype)initWithPresenter:(atom::NotificationPresenterMac*)presenter; +- (instancetype)initWithPresenter: + (electron::NotificationPresenterMac*)presenter; @end #endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_CENTER_DELEGATE_H_ diff --git a/shell/browser/notifications/mac/notification_center_delegate.mm b/shell/browser/notifications/mac/notification_center_delegate.mm index b79e72f147..d632d15774 100644 --- a/shell/browser/notifications/mac/notification_center_delegate.mm +++ b/shell/browser/notifications/mac/notification_center_delegate.mm @@ -11,7 +11,8 @@ @implementation NotificationCenterDelegate -- (instancetype)initWithPresenter:(atom::NotificationPresenterMac*)presenter { +- (instancetype)initWithPresenter: + (electron::NotificationPresenterMac*)presenter { self = [super init]; if (!self) return nil; diff --git a/shell/browser/notifications/mac/notification_presenter_mac.h b/shell/browser/notifications/mac/notification_presenter_mac.h index d32f1e24a6..234a11aeeb 100644 --- a/shell/browser/notifications/mac/notification_presenter_mac.h +++ b/shell/browser/notifications/mac/notification_presenter_mac.h @@ -10,7 +10,7 @@ #include "shell/browser/notifications/mac/notification_center_delegate.h" #include "shell/browser/notifications/notification_presenter.h" -namespace atom { +namespace electron { class CocoaNotification; @@ -31,6 +31,6 @@ class NotificationPresenterMac : public NotificationPresenter { DISALLOW_COPY_AND_ASSIGN(NotificationPresenterMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_MAC_NOTIFICATION_PRESENTER_MAC_H_ diff --git a/shell/browser/notifications/mac/notification_presenter_mac.mm b/shell/browser/notifications/mac/notification_presenter_mac.mm index d7fd88faab..e83fc1f674 100644 --- a/shell/browser/notifications/mac/notification_presenter_mac.mm +++ b/shell/browser/notifications/mac/notification_presenter_mac.mm @@ -7,7 +7,7 @@ #include "shell/browser/notifications/mac/cocoa_notification.h" #include "shell/browser/notifications/mac/notification_center_delegate.h" -namespace atom { +namespace electron { // static NotificationPresenter* NotificationPresenter::Create() { @@ -47,4 +47,4 @@ Notification* NotificationPresenterMac::CreateNotificationObject( return new CocoaNotification(delegate, this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/notification.cc b/shell/browser/notifications/notification.cc index 0fb6b469a8..62c4441b0a 100644 --- a/shell/browser/notifications/notification.cc +++ b/shell/browser/notifications/notification.cc @@ -7,7 +7,7 @@ #include "shell/browser/notifications/notification_delegate.h" #include "shell/browser/notifications/notification_presenter.h" -namespace atom { +namespace electron { NotificationOptions::NotificationOptions() = default; NotificationOptions::~NotificationOptions() = default; @@ -43,4 +43,4 @@ void Notification::Destroy() { presenter()->RemoveNotification(this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/notification.h b/shell/browser/notifications/notification.h index 8e6237785a..6de8d5e9c8 100644 --- a/shell/browser/notifications/notification.h +++ b/shell/browser/notifications/notification.h @@ -13,7 +13,7 @@ #include "third_party/skia/include/core/SkBitmap.h" #include "url/gurl.h" -namespace atom { +namespace electron { class NotificationDelegate; class NotificationPresenter; @@ -84,6 +84,6 @@ class Notification { DISALLOW_COPY_AND_ASSIGN(Notification); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_H_ diff --git a/shell/browser/notifications/notification_delegate.h b/shell/browser/notifications/notification_delegate.h index a039aec5aa..1ef0dc8055 100644 --- a/shell/browser/notifications/notification_delegate.h +++ b/shell/browser/notifications/notification_delegate.h @@ -7,7 +7,7 @@ #include -namespace atom { +namespace electron { class NotificationDelegate { public: @@ -30,6 +30,6 @@ class NotificationDelegate { ~NotificationDelegate() = default; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_DELEGATE_H_ diff --git a/shell/browser/notifications/notification_presenter.cc b/shell/browser/notifications/notification_presenter.cc index c55cfe4b8e..1b1f8632ea 100644 --- a/shell/browser/notifications/notification_presenter.cc +++ b/shell/browser/notifications/notification_presenter.cc @@ -8,7 +8,7 @@ #include "shell/browser/notifications/notification.h" -namespace atom { +namespace electron { NotificationPresenter::NotificationPresenter() {} @@ -41,4 +41,4 @@ void NotificationPresenter::CloseNotificationWithId( (*it)->Dismiss(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/notification_presenter.h b/shell/browser/notifications/notification_presenter.h index 014a894b5e..703810c117 100644 --- a/shell/browser/notifications/notification_presenter.h +++ b/shell/browser/notifications/notification_presenter.h @@ -10,7 +10,7 @@ #include "base/memory/weak_ptr.h" -namespace atom { +namespace electron { class Notification; class NotificationDelegate; @@ -43,6 +43,6 @@ class NotificationPresenter { DISALLOW_COPY_AND_ASSIGN(NotificationPresenter); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_NOTIFICATION_PRESENTER_H_ diff --git a/shell/browser/notifications/platform_notification_service.cc b/shell/browser/notifications/platform_notification_service.cc index 1c88406ae8..7fa040cedc 100644 --- a/shell/browser/notifications/platform_notification_service.cc +++ b/shell/browser/notifications/platform_notification_service.cc @@ -15,7 +15,7 @@ #include "third_party/blink/public/common/notifications/platform_notification_data.h" #include "third_party/skia/include/core/SkBitmap.h" -namespace atom { +namespace electron { namespace { @@ -27,7 +27,7 @@ void OnWebNotificationAllowed(base::WeakPtr notification, if (!notification) return; if (allowed) { - atom::NotificationOptions options; + electron::NotificationOptions options; options.title = data.title; options.msg = data.body; options.tag = data.tag; @@ -41,7 +41,7 @@ void OnWebNotificationAllowed(base::WeakPtr notification, } } -class NotificationDelegateImpl final : public atom::NotificationDelegate { +class NotificationDelegateImpl final : public electron::NotificationDelegate { public: explicit NotificationDelegateImpl(const std::string& notification_id) : notification_id_(notification_id) {} @@ -133,4 +133,4 @@ base::Time PlatformNotificationService::ReadNextTriggerTimestamp() { return base::Time::Max(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/platform_notification_service.h b/shell/browser/notifications/platform_notification_service.h index 9fcfc1a7c5..c594657333 100644 --- a/shell/browser/notifications/platform_notification_service.h +++ b/shell/browser/notifications/platform_notification_service.h @@ -10,7 +10,7 @@ #include "content/public/browser/platform_notification_service.h" -namespace atom { +namespace electron { class AtomBrowserClient; @@ -50,6 +50,6 @@ class PlatformNotificationService DISALLOW_COPY_AND_ASSIGN(PlatformNotificationService); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_PLATFORM_NOTIFICATION_SERVICE_H_ diff --git a/shell/browser/notifications/win/notification_presenter_win.cc b/shell/browser/notifications/win/notification_presenter_win.cc index b3cc436f6a..d9303c3183 100644 --- a/shell/browser/notifications/win/notification_presenter_win.cc +++ b/shell/browser/notifications/win/notification_presenter_win.cc @@ -24,7 +24,7 @@ #pragma comment(lib, "runtimeobject.lib") -namespace atom { +namespace electron { namespace { @@ -97,4 +97,4 @@ Notification* NotificationPresenterWin::CreateNotificationObject( return new WindowsToastNotification(delegate, this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/notification_presenter_win.h b/shell/browser/notifications/win/notification_presenter_win.h index 20983fa046..a5006c139b 100644 --- a/shell/browser/notifications/win/notification_presenter_win.h +++ b/shell/browser/notifications/win/notification_presenter_win.h @@ -30,7 +30,7 @@ class GURL; class SkBitmap; -namespace atom { +namespace electron { class NotificationPresenterWin : public NotificationPresenter { public: @@ -50,6 +50,6 @@ class NotificationPresenterWin : public NotificationPresenter { DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN_H_ diff --git a/shell/browser/notifications/win/notification_presenter_win7.cc b/shell/browser/notifications/win/notification_presenter_win7.cc index dff0b35056..721d96e24b 100644 --- a/shell/browser/notifications/win/notification_presenter_win7.cc +++ b/shell/browser/notifications/win/notification_presenter_win7.cc @@ -8,9 +8,9 @@ #include "shell/browser/notifications/win/win32_notification.h" -namespace atom { +namespace electron { -atom::Notification* NotificationPresenterWin7::CreateNotificationObject( +electron::Notification* NotificationPresenterWin7::CreateNotificationObject( NotificationDelegate* delegate) { return new Win32Notification(delegate, this); } @@ -51,4 +51,4 @@ void NotificationPresenterWin7::OnNotificationDismissed( n->NotificationDismissed(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/notification_presenter_win7.h b/shell/browser/notifications/win/notification_presenter_win7.h index a6e807b478..e442cc0cbf 100644 --- a/shell/browser/notifications/win/notification_presenter_win7.h +++ b/shell/browser/notifications/win/notification_presenter_win7.h @@ -10,7 +10,7 @@ #include "shell/browser/notifications/notification_presenter.h" #include "shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h" -namespace atom { +namespace electron { class Win32Notification; @@ -25,7 +25,7 @@ class NotificationPresenterWin7 : public NotificationPresenter, Win32Notification* GetNotificationObjectByTag(const std::string& tag); private: - atom::Notification* CreateNotificationObject( + electron::Notification* CreateNotificationObject( NotificationDelegate* delegate) override; void OnNotificationClicked(const Notification& notification) override; @@ -34,6 +34,6 @@ class NotificationPresenterWin7 : public NotificationPresenter, DISALLOW_COPY_AND_ASSIGN(NotificationPresenterWin7); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_NOTIFICATION_PRESENTER_WIN7_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/common.h b/shell/browser/notifications/win/win32_desktop_notifications/common.h index b27bb84439..94682f5c13 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/common.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/common.h @@ -7,7 +7,7 @@ #include -namespace atom { +namespace electron { struct NotificationData { DesktopNotificationController* controller = nullptr; @@ -63,6 +63,6 @@ struct ScreenMetrics { } }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_COMMON_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc index 75af3f6168..1df2e95339 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc +++ b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.cc @@ -23,7 +23,7 @@ using std::make_shared; using std::shared_ptr; -namespace atom { +namespace electron { HBITMAP CopyBitmap(HBITMAP bitmap) { HBITMAP ret = NULL; @@ -436,4 +436,4 @@ DesktopNotificationController::NotificationLink::~NotificationLink() { p->controller = nullptr; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h index 00e72d4325..c1cf4d1b52 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/desktop_notification_controller.h @@ -11,7 +11,7 @@ #include #include -namespace atom { +namespace electron { struct NotificationData; @@ -109,6 +109,6 @@ class DesktopNotificationController::Notification { friend class DesktopNotificationController; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_DESKTOP_NOTIFICATION_CONTROLLER_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast.cc b/shell/browser/notifications/win/win32_desktop_notifications/toast.cc index 50726ca80c..3720a1cce4 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast.cc +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast.cc @@ -26,7 +26,7 @@ using std::min; using std::shared_ptr; -namespace atom { +namespace electron { static COLORREF GetAccentColor() { bool success = false; @@ -862,4 +862,4 @@ float DesktopNotificationController::Toast::AnimateStackCollapse() { return pos; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast.h b/shell/browser/notifications/win/win32_desktop_notifications/toast.h index ce52ad37d2..e041b105e5 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast.h @@ -11,7 +11,7 @@ #include "base/logging.h" -namespace atom { +namespace electron { class DesktopNotificationController::Toast { public: @@ -102,6 +102,6 @@ class DesktopNotificationController::Toast { float ease_in_pos_ = 0, ease_out_pos_ = 0, stack_collapse_pos_ = 0; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_H_ diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc index 1b091d74af..edc81399ec 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.cc @@ -8,7 +8,7 @@ #pragma comment(lib, "uiautomationcore.lib") -namespace atom { +namespace electron { DesktopNotificationController::Toast::UIAutomationInterface:: UIAutomationInterface(Toast* toast) @@ -251,4 +251,4 @@ HRESULT DesktopNotificationController::Toast::UIAutomationInterface:: return S_OK; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h index 9a87b3be7b..7eadb0469e 100644 --- a/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h +++ b/shell/browser/notifications/win/win32_desktop_notifications/toast_uia.h @@ -11,7 +11,7 @@ #include -namespace atom { +namespace electron { class DesktopNotificationController::Toast::UIAutomationInterface : public IRawElementProviderSimple, @@ -79,6 +79,6 @@ class DesktopNotificationController::Toast::UIAutomationInterface std::wstring text_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_DESKTOP_NOTIFICATIONS_TOAST_UIA_H_ diff --git a/shell/browser/notifications/win/win32_notification.cc b/shell/browser/notifications/win/win32_notification.cc index d9895e6a6f..2b04f09eb7 100644 --- a/shell/browser/notifications/win/win32_notification.cc +++ b/shell/browser/notifications/win/win32_notification.cc @@ -15,7 +15,7 @@ #include "third_party/skia/include/core/SkBitmap.h" -namespace atom { +namespace electron { void Win32Notification::Show(const NotificationOptions& options) { auto* presenter = static_cast(this->presenter()); @@ -68,4 +68,4 @@ void Win32Notification::Dismiss() { notification_ref_.Close(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/win32_notification.h b/shell/browser/notifications/win/win32_notification.h index b804d7c637..875c6c9e4e 100644 --- a/shell/browser/notifications/win/win32_notification.h +++ b/shell/browser/notifications/win/win32_notification.h @@ -10,9 +10,9 @@ #include "shell/browser/notifications/notification.h" #include "shell/browser/notifications/win/notification_presenter_win7.h" -namespace atom { +namespace electron { -class Win32Notification : public atom::Notification { +class Win32Notification : public electron::Notification { public: Win32Notification(NotificationDelegate* delegate, NotificationPresenterWin7* presenter) @@ -33,6 +33,6 @@ class Win32Notification : public atom::Notification { DISALLOW_COPY_AND_ASSIGN(Win32Notification); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WIN32_NOTIFICATION_H_ diff --git a/shell/browser/notifications/win/windows_toast_notification.cc b/shell/browser/notifications/win/windows_toast_notification.cc index 9269b2e8bd..7306e39f6c 100644 --- a/shell/browser/notifications/win/windows_toast_notification.cc +++ b/shell/browser/notifications/win/windows_toast_notification.cc @@ -29,7 +29,7 @@ using ABI::Windows::Data::Xml::Dom::IXmlNode; using ABI::Windows::Data::Xml::Dom::IXmlNodeList; using ABI::Windows::Data::Xml::Dom::IXmlText; -namespace atom { +namespace electron { namespace { @@ -446,4 +446,4 @@ IFACEMETHODIMP ToastEventHandler::Invoke( return S_OK; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/notifications/win/windows_toast_notification.h b/shell/browser/notifications/win/windows_toast_notification.h index 9fd7e30adf..10c3784807 100644 --- a/shell/browser/notifications/win/windows_toast_notification.h +++ b/shell/browser/notifications/win/windows_toast_notification.h @@ -23,7 +23,7 @@ using Microsoft::WRL::Make; using Microsoft::WRL::RuntimeClass; using Microsoft::WRL::RuntimeClassFlags; -namespace atom { +namespace electron { class ScopedHString; @@ -126,6 +126,6 @@ class ToastEventHandler : public RuntimeClass, DISALLOW_COPY_AND_ASSIGN(ToastEventHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_NOTIFICATIONS_WIN_WINDOWS_TOAST_NOTIFICATION_H_ diff --git a/shell/browser/osr/osr_host_display_client.cc b/shell/browser/osr/osr_host_display_client.cc index 9173206dc3..3023240d9d 100644 --- a/shell/browser/osr/osr_host_display_client.cc +++ b/shell/browser/osr/osr_host_display_client.cc @@ -20,7 +20,7 @@ #include "skia/ext/skia_utils_win.h" #endif -namespace atom { +namespace electron { LayeredWindowUpdater::LayeredWindowUpdater( viz::mojom::LayeredWindowUpdaterRequest request, @@ -119,4 +119,4 @@ void OffScreenHostDisplayClient::CreateLayeredWindowUpdater( layered_window_updater_->SetActive(active_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_host_display_client.h b/shell/browser/osr/osr_host_display_client.h index 8085db08b7..944756f55b 100644 --- a/shell/browser/osr/osr_host_display_client.h +++ b/shell/browser/osr/osr_host_display_client.h @@ -15,7 +15,7 @@ #include "third_party/skia/include/core/SkCanvas.h" #include "ui/gfx/native_widget_types.h" -namespace atom { +namespace electron { typedef base::Callback OnPaintCallback; @@ -72,6 +72,6 @@ class OffScreenHostDisplayClient : public viz::HostDisplayClient { DISALLOW_COPY_AND_ASSIGN(OffScreenHostDisplayClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_OSR_OSR_HOST_DISPLAY_CLIENT_H_ diff --git a/shell/browser/osr/osr_host_display_client_mac.mm b/shell/browser/osr/osr_host_display_client_mac.mm index b65cebcf53..97731ab105 100644 --- a/shell/browser/osr/osr_host_display_client_mac.mm +++ b/shell/browser/osr/osr_host_display_client_mac.mm @@ -6,7 +6,7 @@ #include -namespace atom { +namespace electron { void OffScreenHostDisplayClient::OnDisplayReceivedCALayerParams( const gfx::CALayerParams& ca_layer_params) { @@ -32,4 +32,4 @@ void OffScreenHostDisplayClient::OnDisplayReceivedCALayerParams( } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_render_widget_host_view.cc b/shell/browser/osr/osr_render_widget_host_view.cc index 0be6e61a99..bb20edf3bf 100644 --- a/shell/browser/osr/osr_render_widget_host_view.cc +++ b/shell/browser/osr/osr_render_widget_host_view.cc @@ -47,7 +47,7 @@ #include "ui/gfx/skbitmap_operations.h" #include "ui/latency/latency_info.h" -namespace atom { +namespace electron { namespace { @@ -1175,4 +1175,4 @@ void OffScreenRenderWidgetHostView::UpdateBackgroundColorFromRenderer( GetRootLayer()->SetColor(color); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_render_widget_host_view.h b/shell/browser/osr/osr_render_widget_host_view.h index 415c4d435f..dfe96f0ebe 100644 --- a/shell/browser/osr/osr_render_widget_host_view.h +++ b/shell/browser/osr/osr_render_widget_host_view.h @@ -49,7 +49,7 @@ namespace content { class CursorManager; } // namespace content -namespace atom { +namespace electron { class AtomCopyFrameGenerator; class AtomBeginFrameTimer; @@ -318,6 +318,6 @@ class OffScreenRenderWidgetHostView : public content::RenderWidgetHostViewBase, DISALLOW_COPY_AND_ASSIGN(OffScreenRenderWidgetHostView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_OSR_OSR_RENDER_WIDGET_HOST_VIEW_H_ diff --git a/shell/browser/osr/osr_video_consumer.cc b/shell/browser/osr/osr_video_consumer.cc index c3f2c64447..2d5b1a0206 100644 --- a/shell/browser/osr/osr_video_consumer.cc +++ b/shell/browser/osr/osr_video_consumer.cc @@ -11,7 +11,7 @@ #include "shell/browser/osr/osr_render_widget_host_view.h" #include "ui/gfx/skbitmap_operations.h" -namespace atom { +namespace electron { OffScreenVideoConsumer::OffScreenVideoConsumer( OffScreenRenderWidgetHostView* view, @@ -134,4 +134,4 @@ bool OffScreenVideoConsumer::CheckContentRect(const gfx::Rect& content_rect) { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_video_consumer.h b/shell/browser/osr/osr_video_consumer.h index 05fc440b46..8e83075c15 100644 --- a/shell/browser/osr/osr_video_consumer.h +++ b/shell/browser/osr/osr_video_consumer.h @@ -11,7 +11,7 @@ #include "base/memory/weak_ptr.h" #include "components/viz/host/client_frame_sink_video_capturer.h" -namespace atom { +namespace electron { class OffScreenRenderWidgetHostView; @@ -49,6 +49,6 @@ class OffScreenVideoConsumer : public viz::mojom::FrameSinkVideoConsumer { DISALLOW_COPY_AND_ASSIGN(OffScreenVideoConsumer); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_OSR_OSR_VIDEO_CONSUMER_H_ diff --git a/shell/browser/osr/osr_view_proxy.cc b/shell/browser/osr/osr_view_proxy.cc index 40b101fe42..034ed82ead 100644 --- a/shell/browser/osr/osr_view_proxy.cc +++ b/shell/browser/osr/osr_view_proxy.cc @@ -4,7 +4,7 @@ #include "shell/browser/osr/osr_view_proxy.h" -namespace atom { +namespace electron { OffscreenViewProxy::OffscreenViewProxy(views::View* view) : view_(view) { view_bitmap_.reset(new SkBitmap); @@ -53,4 +53,4 @@ void OffscreenViewProxy::OnEvent(ui::Event* event) { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_view_proxy.h b/shell/browser/osr/osr_view_proxy.h index 4c011e4546..c014208a19 100644 --- a/shell/browser/osr/osr_view_proxy.h +++ b/shell/browser/osr/osr_view_proxy.h @@ -13,7 +13,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/views/view.h" -namespace atom { +namespace electron { class OffscreenViewProxy; @@ -50,6 +50,6 @@ class OffscreenViewProxy { OffscreenViewProxyObserver* observer_ = nullptr; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_OSR_OSR_VIEW_PROXY_H_ diff --git a/shell/browser/osr/osr_web_contents_view.cc b/shell/browser/osr/osr_web_contents_view.cc index 0d21a7abaf..44ae56a527 100644 --- a/shell/browser/osr/osr_web_contents_view.cc +++ b/shell/browser/osr/osr_web_contents_view.cc @@ -9,7 +9,7 @@ #include "third_party/blink/public/platform/web_screen_info.h" #include "ui/display/screen.h" -namespace atom { +namespace electron { OffScreenWebContentsView::OffScreenWebContentsView( bool transparent, @@ -222,4 +222,4 @@ OffScreenRenderWidgetHostView* OffScreenWebContentsView::GetView() const { return nullptr; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/osr/osr_web_contents_view.h b/shell/browser/osr/osr_web_contents_view.h index 7d77e88146..a20a7626f7 100644 --- a/shell/browser/osr/osr_web_contents_view.h +++ b/shell/browser/osr/osr_web_contents_view.h @@ -21,7 +21,7 @@ class OffScreenView; #endif #endif -namespace atom { +namespace electron { class OffScreenWebContentsView : public content::WebContentsView, public content::RenderViewHostDelegateView, @@ -107,6 +107,6 @@ class OffScreenWebContentsView : public content::WebContentsView, #endif }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_OSR_OSR_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/osr/osr_web_contents_view_mac.mm b/shell/browser/osr/osr_web_contents_view_mac.mm index 487e9ee07d..691b1d52e4 100644 --- a/shell/browser/osr/osr_web_contents_view_mac.mm +++ b/shell/browser/osr/osr_web_contents_view_mac.mm @@ -29,7 +29,7 @@ @end -namespace atom { +namespace electron { gfx::NativeView OffScreenWebContentsView::GetNativeView() const { return offScreenView_; @@ -51,4 +51,4 @@ void OffScreenWebContentsView::PlatformDestroy() { [offScreenView_ release]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/pref_store_delegate.cc b/shell/browser/pref_store_delegate.cc index 5f34176e42..1273e5a796 100644 --- a/shell/browser/pref_store_delegate.cc +++ b/shell/browser/pref_store_delegate.cc @@ -9,7 +9,7 @@ #include "components/prefs/value_map_pref_store.h" #include "shell/browser/atom_browser_context.h" -namespace atom { +namespace electron { PrefStoreDelegate::PrefStoreDelegate( base::WeakPtr browser_context) @@ -27,4 +27,4 @@ void PrefStoreDelegate::UpdateCommandLinePrefStore( static_cast(command_line_prefs)); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/pref_store_delegate.h b/shell/browser/pref_store_delegate.h index 9d18383481..9f31d0297c 100644 --- a/shell/browser/pref_store_delegate.h +++ b/shell/browser/pref_store_delegate.h @@ -12,7 +12,7 @@ #include "components/prefs/persistent_pref_store.h" #include "components/prefs/pref_value_store.h" -namespace atom { +namespace electron { class AtomBrowserContext; @@ -47,6 +47,6 @@ class PrefStoreDelegate : public PrefValueStore::Delegate { DISALLOW_COPY_AND_ASSIGN(PrefStoreDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_PREF_STORE_DELEGATE_H_ diff --git a/shell/browser/printing/print_preview_message_handler.cc b/shell/browser/printing/print_preview_message_handler.cc index 0e99a9fcd8..20d32a884c 100644 --- a/shell/browser/printing/print_preview_message_handler.cc +++ b/shell/browser/printing/print_preview_message_handler.cc @@ -27,7 +27,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -142,7 +142,7 @@ void PrintPreviewMessageHandler::OnPrintPreviewCancelled( void PrintPreviewMessageHandler::PrintToPDF( const base::DictionaryValue& options, - atom::util::Promise promise) { + electron::util::Promise promise) { int request_id; options.GetInteger(printing::kPreviewRequestID, &request_id); promise_map_.emplace(request_id, std::move(promise)); @@ -195,4 +195,4 @@ void PrintPreviewMessageHandler::RejectPromise(int request_id) { WEB_CONTENTS_USER_DATA_KEY_IMPL(PrintPreviewMessageHandler) -} // namespace atom +} // namespace electron diff --git a/shell/browser/printing/print_preview_message_handler.h b/shell/browser/printing/print_preview_message_handler.h index 156935827d..e806415286 100644 --- a/shell/browser/printing/print_preview_message_handler.h +++ b/shell/browser/printing/print_preview_message_handler.h @@ -22,7 +22,7 @@ namespace content { class RenderFrameHost; } -namespace atom { +namespace electron { // Manages the print preview handling for a WebContents. class PrintPreviewMessageHandler @@ -61,7 +61,7 @@ class PrintPreviewMessageHandler scoped_refptr data_bytes); void RejectPromise(int request_id); - using PromiseMap = std::map; + using PromiseMap = std::map; PromiseMap promise_map_; base::WeakPtrFactory weak_ptr_factory_; @@ -71,6 +71,6 @@ class PrintPreviewMessageHandler DISALLOW_COPY_AND_ASSIGN(PrintPreviewMessageHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_PRINTING_PRINT_PREVIEW_MESSAGE_HANDLER_H_ diff --git a/shell/browser/relauncher.cc b/shell/browser/relauncher.cc index 9506f5dd7d..adf2f52000 100644 --- a/shell/browser/relauncher.cc +++ b/shell/browser/relauncher.cc @@ -138,7 +138,7 @@ bool RelaunchAppWithHelper(const base::FilePath& helper, } int RelauncherMain(const content::MainFunctionParams& main_parameters) { - const StringVector& argv = atom::AtomCommandLine::argv(); + const StringVector& argv = electron::AtomCommandLine::argv(); if (argv.size() < 4 || argv[1] != internal::kRelauncherTypeArg) { LOG(ERROR) << "relauncher process invoked with unexpected arguments"; diff --git a/shell/browser/session_preferences.cc b/shell/browser/session_preferences.cc index add75f69ce..eaa8498df0 100644 --- a/shell/browser/session_preferences.cc +++ b/shell/browser/session_preferences.cc @@ -8,7 +8,7 @@ #include "base/memory/ptr_util.h" #include "shell/common/options_switches.h" -namespace atom { +namespace electron { namespace { @@ -58,4 +58,4 @@ void SessionPreferences::AppendExtraCommandLineSwitches( command_line->AppendSwitchNative(switches::kPreloadScripts, preloads); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/session_preferences.h b/shell/browser/session_preferences.h index 8e5f108029..78cc52d37b 100644 --- a/shell/browser/session_preferences.h +++ b/shell/browser/session_preferences.h @@ -15,7 +15,7 @@ namespace base { class CommandLine; } -namespace atom { +namespace electron { class SessionPreferences : public base::SupportsUserData::Data { public: @@ -41,6 +41,6 @@ class SessionPreferences : public base::SupportsUserData::Data { std::vector preloads_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_SESSION_PREFERENCES_H_ diff --git a/shell/browser/special_storage_policy.cc b/shell/browser/special_storage_policy.cc index 74b190fb06..e48c6674b2 100644 --- a/shell/browser/special_storage_policy.cc +++ b/shell/browser/special_storage_policy.cc @@ -7,7 +7,7 @@ #include "base/bind.h" #include "base/callback.h" -namespace atom { +namespace electron { SpecialStoragePolicy::SpecialStoragePolicy() {} @@ -42,4 +42,4 @@ SpecialStoragePolicy::CreateDeleteCookieOnExitPredicate() { return network::SessionCleanupCookieStore::DeleteCookiePredicate(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/special_storage_policy.h b/shell/browser/special_storage_policy.h index c0090a9e36..0209361de1 100644 --- a/shell/browser/special_storage_policy.h +++ b/shell/browser/special_storage_policy.h @@ -7,7 +7,7 @@ #include "storage/browser/quota/special_storage_policy.h" -namespace atom { +namespace electron { class SpecialStoragePolicy : public storage::SpecialStoragePolicy { public: @@ -27,6 +27,6 @@ class SpecialStoragePolicy : public storage::SpecialStoragePolicy { ~SpecialStoragePolicy() override; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_SPECIAL_STORAGE_POLICY_H_ diff --git a/shell/browser/ui/accelerator_util.cc b/shell/browser/ui/accelerator_util.cc index 29da5c056a..692caf38ba 100644 --- a/shell/browser/ui/accelerator_util.cc +++ b/shell/browser/ui/accelerator_util.cc @@ -32,7 +32,7 @@ bool StringToAccelerator(const std::string& shortcut, ui::KeyboardCode key = ui::VKEY_UNKNOWN; for (const auto& token : tokens) { bool shifted = false; - ui::KeyboardCode code = atom::KeyboardCodeFromStr(token, &shifted); + ui::KeyboardCode code = electron::KeyboardCodeFromStr(token, &shifted); if (shifted) modifiers |= ui::EF_SHIFT_DOWN; switch (code) { @@ -68,11 +68,11 @@ bool StringToAccelerator(const std::string& shortcut, } void GenerateAcceleratorTable(AcceleratorTable* table, - atom::AtomMenuModel* model) { + electron::AtomMenuModel* model) { int count = model->GetItemCount(); for (int i = 0; i < count; ++i) { - atom::AtomMenuModel::ItemType type = model->GetTypeAt(i); - if (type == atom::AtomMenuModel::TYPE_SUBMENU) { + electron::AtomMenuModel::ItemType type = model->GetTypeAt(i); + if (type == electron::AtomMenuModel::TYPE_SUBMENU) { auto* submodel = model->GetSubmenuModelAt(i); GenerateAcceleratorTable(table, submodel); } else { diff --git a/shell/browser/ui/accelerator_util.h b/shell/browser/ui/accelerator_util.h index 999cbd5c82..e3e78bdcf4 100644 --- a/shell/browser/ui/accelerator_util.h +++ b/shell/browser/ui/accelerator_util.h @@ -15,7 +15,7 @@ namespace accelerator_util { typedef struct { int position; - atom::AtomMenuModel* model; + electron::AtomMenuModel* model; } MenuItem; typedef std::map AcceleratorTable; @@ -25,7 +25,7 @@ bool StringToAccelerator(const std::string& description, // Generate a table that contains memu model's accelerators and command ids. void GenerateAcceleratorTable(AcceleratorTable* table, - atom::AtomMenuModel* model); + electron::AtomMenuModel* model); // Trigger command from the accelerators table. bool TriggerAcceleratorTableCommand(AcceleratorTable* table, diff --git a/shell/browser/ui/atom_menu_model.cc b/shell/browser/ui/atom_menu_model.cc index f1ca8b9aa6..3551a6d80b 100644 --- a/shell/browser/ui/atom_menu_model.cc +++ b/shell/browser/ui/atom_menu_model.cc @@ -6,7 +6,7 @@ #include "base/stl_util.h" -namespace atom { +namespace electron { bool AtomMenuModel::Delegate::GetAcceleratorForCommandId( int command_id, @@ -77,4 +77,4 @@ AtomMenuModel* AtomMenuModel::GetSubmenuModelAt(int index) { ui::SimpleMenuModel::GetSubmenuModelAt(index)); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/atom_menu_model.h b/shell/browser/ui/atom_menu_model.h index 82d7c3ec6c..f9341d8d92 100644 --- a/shell/browser/ui/atom_menu_model.h +++ b/shell/browser/ui/atom_menu_model.h @@ -11,7 +11,7 @@ #include "base/observer_list_types.h" #include "ui/base/models/simple_menu_model.h" -namespace atom { +namespace electron { class AtomMenuModel : public ui::SimpleMenuModel { public: @@ -77,6 +77,6 @@ class AtomMenuModel : public ui::SimpleMenuModel { DISALLOW_COPY_AND_ASSIGN(AtomMenuModel); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_ATOM_MENU_MODEL_H_ diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index dc65d353f4..5d8ba625fc 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/shell/browser/ui/autofill_popup.cc @@ -26,7 +26,7 @@ #include "shell/browser/osr/osr_view_proxy.h" #endif -namespace atom { +namespace electron { class PopupViewCommon : public autofill::PopupViewCommon { public: @@ -216,4 +216,4 @@ int AutofillPopup::LineFromY(int y) const { return values_.size() - 1; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/autofill_popup.h b/shell/browser/ui/autofill_popup.h index 91268d42ee..7ac961a8cf 100644 --- a/shell/browser/ui/autofill_popup.h +++ b/shell/browser/ui/autofill_popup.h @@ -14,7 +14,7 @@ #include "ui/views/view.h" #include "ui/views/widget/widget.h" -namespace atom { +namespace electron { class AutofillPopupView; @@ -86,6 +86,6 @@ class AutofillPopup : public views::ViewObserver { DISALLOW_COPY_AND_ASSIGN(AutofillPopup); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_AUTOFILL_POPUP_H_ diff --git a/shell/browser/ui/certificate_trust.h b/shell/browser/ui/certificate_trust.h index c55e836ffc..e032638ab5 100644 --- a/shell/browser/ui/certificate_trust.h +++ b/shell/browser/ui/certificate_trust.h @@ -11,14 +11,14 @@ #include "net/cert/x509_certificate.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { class NativeWindow; -} // namespace atom +} // namespace electron namespace certificate_trust { v8::Local ShowCertificateTrust( - atom::NativeWindow* parent_window, + electron::NativeWindow* parent_window, const scoped_refptr& cert, const std::string& message); diff --git a/shell/browser/ui/certificate_trust_mac.mm b/shell/browser/ui/certificate_trust_mac.mm index 7dec1a836c..eabfaf5005 100644 --- a/shell/browser/ui/certificate_trust_mac.mm +++ b/shell/browser/ui/certificate_trust_mac.mm @@ -19,7 +19,7 @@ @interface TrustDelegate : NSObject { @private - std::unique_ptr promise_; + std::unique_ptr promise_; SFCertificateTrustPanel* panel_; scoped_refptr cert_; SecTrustRef trust_; @@ -27,7 +27,7 @@ SecPolicyRef sec_policy_; } -- (id)initWithPromise:(atom::util::Promise)promise +- (id)initWithPromise:(electron::util::Promise)promise panel:(SFCertificateTrustPanel*)panel cert:(const scoped_refptr&)cert trust:(SecTrustRef)trust @@ -51,14 +51,14 @@ [super dealloc]; } -- (id)initWithPromise:(atom::util::Promise)promise +- (id)initWithPromise:(electron::util::Promise)promise panel:(SFCertificateTrustPanel*)panel cert:(const scoped_refptr&)cert trust:(SecTrustRef)trust certChain:(CFArrayRef)certChain secPolicy:(SecPolicyRef)secPolicy { if ((self = [super init])) { - promise_.reset(new atom::util::Promise(std::move(promise))); + promise_.reset(new electron::util::Promise(std::move(promise))); panel_ = panel; cert_ = cert; trust_ = trust; @@ -86,11 +86,11 @@ namespace certificate_trust { v8::Local ShowCertificateTrust( - atom::NativeWindow* parent_window, + electron::NativeWindow* parent_window, const scoped_refptr& cert, const std::string& message) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); auto* sec_policy = SecPolicyCreateBasicX509(); diff --git a/shell/browser/ui/certificate_trust_win.cc b/shell/browser/ui/certificate_trust_win.cc index 02c33cf7ca..ba3d0963a5 100644 --- a/shell/browser/ui/certificate_trust_win.cc +++ b/shell/browser/ui/certificate_trust_win.cc @@ -57,11 +57,11 @@ CERT_CHAIN_PARA GetCertificateChainParameters() { } v8::Local ShowCertificateTrust( - atom::NativeWindow* parent_window, + electron::NativeWindow* parent_window, const scoped_refptr& cert, const std::string& message) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); PCCERT_CHAIN_CONTEXT chain_context; diff --git a/shell/browser/ui/cocoa/atom_bundle_mover.h b/shell/browser/ui/cocoa/atom_bundle_mover.h index a3306862f9..74a98b6b3e 100644 --- a/shell/browser/ui/cocoa/atom_bundle_mover.h +++ b/shell/browser/ui/cocoa/atom_bundle_mover.h @@ -9,7 +9,7 @@ #include "native_mate/persistent_dictionary.h" -namespace atom { +namespace electron { namespace ui { @@ -38,6 +38,6 @@ class AtomBundleMover { } // namespace ui -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_COCOA_ATOM_BUNDLE_MOVER_H_ diff --git a/shell/browser/ui/cocoa/atom_bundle_mover.mm b/shell/browser/ui/cocoa/atom_bundle_mover.mm index d19065be05..9dba077da4 100644 --- a/shell/browser/ui/cocoa/atom_bundle_mover.mm +++ b/shell/browser/ui/cocoa/atom_bundle_mover.mm @@ -15,7 +15,7 @@ #import "shell/browser/browser.h" -namespace atom { +namespace electron { namespace ui { @@ -80,7 +80,7 @@ bool AtomBundleMover::Move(mate::Arguments* args) { arguments:[NSArray arrayWithObject:destinationPath]] waitUntilExit]; - atom::Browser::Get()->Quit(); + electron::Browser::Get()->Quit(); return true; } else { if (!Trash([applicationsDirectory @@ -121,7 +121,7 @@ bool AtomBundleMover::Move(mate::Arguments* args) { nil]]; } - atom::Browser::Get()->Quit(); + electron::Browser::Get()->Quit(); return true; } @@ -422,4 +422,4 @@ bool AtomBundleMover::DeleteOrTrash(NSString* path) { } // namespace ui -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h b/shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h index 4c3beb7b16..4166099ff9 100644 --- a/shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h +++ b/shell/browser/ui/cocoa/atom_inspectable_web_contents_view.h @@ -11,15 +11,15 @@ #include "chrome/browser/devtools/devtools_contents_resizing_strategy.h" #include "ui/base/cocoa/base_view.h" -namespace atom { +namespace electron { class InspectableWebContentsViewMac; } -using atom::InspectableWebContentsViewMac; +using electron::InspectableWebContentsViewMac; @interface AtomInspectableWebContentsView : BaseView { @private - atom::InspectableWebContentsViewMac* inspectableWebContentsView_; + electron::InspectableWebContentsViewMac* inspectableWebContentsView_; base::scoped_nsobject fake_view_; base::scoped_nsobject devtools_window_; diff --git a/shell/browser/ui/cocoa/atom_menu_controller.h b/shell/browser/ui/cocoa/atom_menu_controller.h index e4906cad5e..e47402b97a 100644 --- a/shell/browser/ui/cocoa/atom_menu_controller.h +++ b/shell/browser/ui/cocoa/atom_menu_controller.h @@ -12,7 +12,7 @@ #include "base/mac/scoped_nsobject.h" #include "base/strings/string16.h" -namespace atom { +namespace electron { class AtomMenuModel; } @@ -24,23 +24,24 @@ class AtomMenuModel; // as it only maintains weak references. @interface AtomMenuController : NSObject { @protected - atom::AtomMenuModel* model_; // weak + electron::AtomMenuModel* model_; // weak base::scoped_nsobject menu_; BOOL isMenuOpen_; BOOL useDefaultAccelerator_; base::Callback closeCallback; } -@property(nonatomic, assign) atom::AtomMenuModel* model; +@property(nonatomic, assign) electron::AtomMenuModel* model; // Builds a NSMenu from the pre-built model (must not be nil). Changes made // to the contents of the model after calling this will not be noticed. -- (id)initWithModel:(atom::AtomMenuModel*)model useDefaultAccelerator:(BOOL)use; +- (id)initWithModel:(electron::AtomMenuModel*)model + useDefaultAccelerator:(BOOL)use; - (void)setCloseCallback:(const base::Callback&)callback; // Populate current NSMenu with |model|. -- (void)populateWithModel:(atom::AtomMenuModel*)model; +- (void)populateWithModel:(electron::AtomMenuModel*)model; // Programmatically close the constructed menu. - (void)cancel; diff --git a/shell/browser/ui/cocoa/atom_menu_controller.mm b/shell/browser/ui/cocoa/atom_menu_controller.mm index 39291e9d3a..8a8b3322f8 100644 --- a/shell/browser/ui/cocoa/atom_menu_controller.mm +++ b/shell/browser/ui/cocoa/atom_menu_controller.mm @@ -62,7 +62,7 @@ Role kRolesMap[] = { // Called when adding a submenu to the menu and checks if the submenu, via its // |model|, has visible child items. -bool MenuHasVisibleItems(const atom::AtomMenuModel* model) { +bool MenuHasVisibleItems(const electron::AtomMenuModel* model) { int count = model->GetItemCount(); for (int index = 0; index < count; index++) { if (model->IsVisibleAt(index)) @@ -95,7 +95,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; @synthesize model = model_; -- (id)initWithModel:(atom::AtomMenuModel*)model +- (id)initWithModel:(electron::AtomMenuModel*)model useDefaultAccelerator:(BOOL)use { if ((self = [super init])) { model_ = model; @@ -122,7 +122,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; closeCallback = callback; } -- (void)populateWithModel:(atom::AtomMenuModel*)model { +- (void)populateWithModel:(electron::AtomMenuModel*)model { if (!menu_) return; @@ -138,7 +138,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; const int count = model->GetItemCount(); for (int index = 0; index < count; index++) { - if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR) + if (model->GetTypeAt(index) == electron::AtomMenuModel::TYPE_SEPARATOR) [self addSeparatorToMenu:menu_ atIndex:index]; else [self addItemToMenu:menu_ atIndex:index fromModel:model]; @@ -158,12 +158,12 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; // Creates a NSMenu from the given model. If the model has submenus, this can // be invoked recursively. -- (NSMenu*)menuFromModel:(atom::AtomMenuModel*)model { +- (NSMenu*)menuFromModel:(electron::AtomMenuModel*)model { NSMenu* menu = [[[NSMenu alloc] initWithTitle:@""] autorelease]; const int count = model->GetItemCount(); for (int index = 0; index < count; index++) { - if (model->GetTypeAt(index) == atom::AtomMenuModel::TYPE_SEPARATOR) + if (model->GetTypeAt(index) == electron::AtomMenuModel::TYPE_SEPARATOR) [self addSeparatorToMenu:menu atIndex:index]; else [self addItemToMenu:menu atIndex:index fromModel:model]; @@ -219,7 +219,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; // associated with the entry in the model identified by |modelIndex|. - (void)addItemToMenu:(NSMenu*)menu atIndex:(NSInteger)index - fromModel:(atom::AtomMenuModel*)model { + fromModel:(electron::AtomMenuModel*)model { base::string16 label16 = model->GetLabelAt(index); NSString* label = l10n_util::FixUpWindowsStyleLabel(label16); @@ -234,7 +234,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; [item setImage:icon.ToNSImage()]; base::string16 role = model->GetRoleAt(index); - atom::AtomMenuModel::ItemType type = model->GetTypeAt(index); + electron::AtomMenuModel::ItemType type = model->GetTypeAt(index); if (role == base::ASCIIToUTF16("services")) { base::string16 title = base::ASCIIToUTF16("Services"); @@ -245,7 +245,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; NSMenu* submenu = [[NSMenu alloc] initWithTitle:label]; [item setSubmenu:submenu]; [NSApp setServicesMenu:submenu]; - } else if (type == atom::AtomMenuModel::TYPE_SUBMENU && + } else if (type == electron::AtomMenuModel::TYPE_SUBMENU && model->IsVisibleAt(index)) { // We need to specifically check that the submenu top-level item has been // enabled as it's not validated by validateUserInterfaceItem @@ -255,8 +255,8 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; // Recursively build a submenu from the sub-model at this index. [item setTarget:nil]; [item setAction:nil]; - atom::AtomMenuModel* submenuModel = - static_cast(model->GetSubmenuModelAt(index)); + electron::AtomMenuModel* submenuModel = + static_cast(model->GetSubmenuModelAt(index)); NSMenu* submenu = MenuHasVisibleItems(submenuModel) ? [self menuFromModel:submenuModel] : MakeEmptySubmenu(); @@ -320,7 +320,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; return NO; NSInteger modelIndex = [item tag]; - atom::AtomMenuModel* model = static_cast( + electron::AtomMenuModel* model = static_cast( [[(id)item representedObject] pointerValue]); DCHECK(model); if (model) { @@ -339,7 +339,7 @@ static base::scoped_nsobject recentDocumentsMenuSwap_; // item chosen. - (void)itemSelected:(id)sender { NSInteger modelIndex = [sender tag]; - atom::AtomMenuModel* model = static_cast( + electron::AtomMenuModel* model = static_cast( [[sender representedObject] pointerValue]); DCHECK(model); if (model) { diff --git a/shell/browser/ui/cocoa/atom_native_widget_mac.h b/shell/browser/ui/cocoa/atom_native_widget_mac.h index c2988809fd..65ce66874d 100644 --- a/shell/browser/ui/cocoa/atom_native_widget_mac.h +++ b/shell/browser/ui/cocoa/atom_native_widget_mac.h @@ -7,7 +7,7 @@ #include "ui/views/widget/native_widget_mac.h" -namespace atom { +namespace electron { class NativeWindowMac; @@ -30,6 +30,6 @@ class AtomNativeWidgetMac : public views::NativeWidgetMac { DISALLOW_COPY_AND_ASSIGN(AtomNativeWidgetMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_COCOA_ATOM_NATIVE_WIDGET_MAC_H_ diff --git a/shell/browser/ui/cocoa/atom_native_widget_mac.mm b/shell/browser/ui/cocoa/atom_native_widget_mac.mm index a6f90e5092..3900f6cb85 100644 --- a/shell/browser/ui/cocoa/atom_native_widget_mac.mm +++ b/shell/browser/ui/cocoa/atom_native_widget_mac.mm @@ -6,7 +6,7 @@ #include "shell/browser/ui/cocoa/atom_ns_window.h" -namespace atom { +namespace electron { AtomNativeWidgetMac::AtomNativeWidgetMac( NativeWindowMac* shell, @@ -24,4 +24,4 @@ NativeWidgetMacNSWindow* AtomNativeWidgetMac::CreateNSWindow( styleMask:style_mask_] autorelease]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/cocoa/atom_ns_window.h b/shell/browser/ui/cocoa/atom_ns_window.h index 8d1b9ce059..f6c7ee65d1 100644 --- a/shell/browser/ui/cocoa/atom_ns_window.h +++ b/shell/browser/ui/cocoa/atom_ns_window.h @@ -9,7 +9,7 @@ #include "shell/browser/ui/cocoa/event_dispatching_window.h" #include "ui/views/widget/native_widget_mac.h" -namespace atom { +namespace electron { class NativeWindowMac; @@ -25,20 +25,20 @@ class ScopedDisableResize { static bool disable_resize_; }; -} // namespace atom +} // namespace electron @interface AtomNSWindow : NativeWidgetMacNSWindow { @private - atom::NativeWindowMac* shell_; + electron::NativeWindowMac* shell_; } @property BOOL acceptsFirstMouse; @property BOOL enableLargerThanScreen; @property BOOL disableAutoHideCursor; @property BOOL disableKeyOrMainWindow; @property(nonatomic, retain) NSView* vibrantView; -- (id)initWithShell:(atom::NativeWindowMac*)shell +- (id)initWithShell:(electron::NativeWindowMac*)shell styleMask:(NSUInteger)styleMask; -- (atom::NativeWindowMac*)shell; +- (electron::NativeWindowMac*)shell; - (id)accessibilityFocusedUIElement; - (NSRect)originalContentRectForFrameRect:(NSRect)frameRect; - (void)toggleFullScreenMode:(id)sender; diff --git a/shell/browser/ui/cocoa/atom_ns_window.mm b/shell/browser/ui/cocoa/atom_ns_window.mm index f3d800881e..86040fe448 100644 --- a/shell/browser/ui/cocoa/atom_ns_window.mm +++ b/shell/browser/ui/cocoa/atom_ns_window.mm @@ -11,11 +11,11 @@ #include "shell/browser/ui/cocoa/root_view_mac.h" #include "ui/base/cocoa/window_size_constants.h" -namespace atom { +namespace electron { bool ScopedDisableResize::disable_resize_ = false; -} // namespace atom +} // namespace electron @implementation AtomNSWindow @@ -25,7 +25,7 @@ bool ScopedDisableResize::disable_resize_ = false; @synthesize disableKeyOrMainWindow; @synthesize vibrantView; -- (id)initWithShell:(atom::NativeWindowMac*)shell +- (id)initWithShell:(electron::NativeWindowMac*)shell styleMask:(NSUInteger)styleMask { if ((self = [super initWithContentRect:ui::kWindowSizeDeterminedLater styleMask:styleMask @@ -36,7 +36,7 @@ bool ScopedDisableResize::disable_resize_ = false; return self; } -- (atom::NativeWindowMac*)shell { +- (electron::NativeWindowMac*)shell { return shell_; } @@ -81,7 +81,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (NSRect)constrainFrameRect:(NSRect)frameRect toScreen:(NSScreen*)screen { // Resizing is disabled. - if (atom::ScopedDisableResize::IsResizeDisabled()) + if (electron::ScopedDisableResize::IsResizeDisabled()) return [self frame]; // Enable the window to be larger than screen. @@ -94,7 +94,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)setFrame:(NSRect)windowFrame display:(BOOL)displayViews { // constrainFrameRect is not called on hidden windows so disable adjusting // the frame directly when resize is disabled - if (!atom::ScopedDisableResize::IsResizeDisabled()) + if (!electron::ScopedDisableResize::IsResizeDisabled()) [super setFrame:windowFrame display:displayViews]; } @@ -157,7 +157,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)performClose:(id)sender { if (shell_->title_bar_style() == - atom::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) { + electron::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) { [[self delegate] windowShouldClose:self]; } else if (shell_->IsSimpleFullScreen()) { if ([[self delegate] respondsToSelector:@selector(windowShouldClose:)]) { @@ -182,7 +182,7 @@ bool ScopedDisableResize::disable_resize_ = false; - (void)performMiniaturize:(id)sender { if (shell_->title_bar_style() == - atom::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) + electron::NativeWindowMac::TitleBarStyle::CUSTOM_BUTTONS_ON_HOVER) [self miniaturize:self]; else [super performMiniaturize:sender]; diff --git a/shell/browser/ui/cocoa/atom_ns_window_delegate.h b/shell/browser/ui/cocoa/atom_ns_window_delegate.h index 4a6f6b850c..80112054e4 100644 --- a/shell/browser/ui/cocoa/atom_ns_window_delegate.h +++ b/shell/browser/ui/cocoa/atom_ns_window_delegate.h @@ -9,19 +9,19 @@ #include "components/remote_cocoa/app_shim/views_nswindow_delegate.h" -namespace atom { +namespace electron { class NativeWindowMac; } @interface AtomNSWindowDelegate : ViewsNSWindowDelegate { @private - atom::NativeWindowMac* shell_; + electron::NativeWindowMac* shell_; bool is_zooming_; int level_; bool is_resizable_; } -- (id)initWithShell:(atom::NativeWindowMac*)shell; +- (id)initWithShell:(electron::NativeWindowMac*)shell; @end #endif // SHELL_BROWSER_UI_COCOA_ATOM_NS_WINDOW_DELEGATE_H_ diff --git a/shell/browser/ui/cocoa/atom_ns_window_delegate.mm b/shell/browser/ui/cocoa/atom_ns_window_delegate.mm index df8ba71cee..f685377843 100644 --- a/shell/browser/ui/cocoa/atom_ns_window_delegate.mm +++ b/shell/browser/ui/cocoa/atom_ns_window_delegate.mm @@ -15,11 +15,11 @@ #include "ui/views/cocoa/native_widget_mac_ns_window_host.h" #include "ui/views/widget/native_widget_mac.h" -using TitleBarStyle = atom::NativeWindowMac::TitleBarStyle; +using TitleBarStyle = electron::NativeWindowMac::TitleBarStyle; @implementation AtomNSWindowDelegate -- (id)initWithShell:(atom::NativeWindowMac*)shell { +- (id)initWithShell:(electron::NativeWindowMac*)shell { // The views library assumes the window delegate must be an instance of // ViewsNSWindowDelegate, since we don't have a way to override the creation // of NSWindowDelegate, we have to dynamically replace the window delegate @@ -278,7 +278,7 @@ using TitleBarStyle = atom::NativeWindowMac::TitleBarStyle; - (IBAction)newWindowForTab:(id)sender { shell_->NotifyNewWindowForTab(); - atom::Browser::Get()->NewWindowForTab(); + electron::Browser::Get()->NewWindowForTab(); } #pragma mark - NSTouchBarDelegate diff --git a/shell/browser/ui/cocoa/atom_touch_bar.h b/shell/browser/ui/cocoa/atom_touch_bar.h index 68987d9789..450ebe24de 100644 --- a/shell/browser/ui/cocoa/atom_touch_bar.h +++ b/shell/browser/ui/cocoa/atom_touch_bar.h @@ -24,11 +24,11 @@ std::vector ordered_settings_; std::map settings_; id delegate_; - atom::NativeWindow* window_; + electron::NativeWindow* window_; } - (id)initWithDelegate:(id)delegate - window:(atom::NativeWindow*)window + window:(electron::NativeWindow*)window settings:(const std::vector&)settings; - (NSTouchBar*)makeTouchBar API_AVAILABLE(macosx(10.12.2)); diff --git a/shell/browser/ui/cocoa/atom_touch_bar.mm b/shell/browser/ui/cocoa/atom_touch_bar.mm index 18abbb5f48..9b17e1612b 100644 --- a/shell/browser/ui/cocoa/atom_touch_bar.mm +++ b/shell/browser/ui/cocoa/atom_touch_bar.mm @@ -36,7 +36,7 @@ static NSString* const TextScrubberItemIdentifier = @"scrubber.text.item"; static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; - (id)initWithDelegate:(id)delegate - window:(atom::NativeWindow*)window + window:(electron::NativeWindow*)window settings: (const std::vector&)settings { if ((self = [super init])) { @@ -244,7 +244,8 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; NSString* item_id = [self idFromIdentifier:identifier withPrefix:ColorPickerIdentifier]; NSColor* color = ((NSColorPickerTouchBarItem*)sender).color; - std::string hex_color = atom::ToRGBHex(skia::NSDeviceColorToSkColor(color)); + std::string hex_color = + electron::ToRGBHex(skia::NSDeviceColorToSkColor(color)); base::DictionaryValue details; details.SetString("color", hex_color); window_->NotifyTouchBarItemInteraction([item_id UTF8String], details); @@ -329,7 +330,7 @@ static NSString* const ImageScrubberItemIdentifier = @"scrubber.image.item"; } - (NSColor*)colorFromHexColorString:(const std::string&)colorString { - SkColor color = atom::ParseHexColor(colorString); + SkColor color = electron::ParseHexColor(colorString); return skia::SkColorToDeviceNSColor(color); } diff --git a/shell/browser/ui/cocoa/delayed_native_view_host.cc b/shell/browser/ui/cocoa/delayed_native_view_host.cc index 5056646f7d..6c606c6c76 100644 --- a/shell/browser/ui/cocoa/delayed_native_view_host.cc +++ b/shell/browser/ui/cocoa/delayed_native_view_host.cc @@ -4,7 +4,7 @@ #include "shell/browser/ui/cocoa/delayed_native_view_host.h" -namespace atom { +namespace electron { DelayedNativeViewHost::DelayedNativeViewHost(gfx::NativeView native_view) : native_view_(native_view) {} @@ -18,4 +18,4 @@ void DelayedNativeViewHost::ViewHierarchyChanged( Attach(native_view_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/cocoa/delayed_native_view_host.h b/shell/browser/ui/cocoa/delayed_native_view_host.h index 141112740f..90f914a122 100644 --- a/shell/browser/ui/cocoa/delayed_native_view_host.h +++ b/shell/browser/ui/cocoa/delayed_native_view_host.h @@ -7,7 +7,7 @@ #include "ui/views/controls/native/native_view_host.h" -namespace atom { +namespace electron { // Automatically attach the native view after the NativeViewHost is attached to // a widget. (Attaching it directly would cause crash.) @@ -26,6 +26,6 @@ class DelayedNativeViewHost : public views::NativeViewHost { DISALLOW_COPY_AND_ASSIGN(DelayedNativeViewHost); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_COCOA_DELAYED_NATIVE_VIEW_HOST_H_ diff --git a/shell/browser/ui/cocoa/root_view_mac.h b/shell/browser/ui/cocoa/root_view_mac.h index 7d8556d9d5..074d62f9ee 100644 --- a/shell/browser/ui/cocoa/root_view_mac.h +++ b/shell/browser/ui/cocoa/root_view_mac.h @@ -7,7 +7,7 @@ #include "ui/views/view.h" -namespace atom { +namespace electron { class NativeWindow; @@ -28,6 +28,6 @@ class RootViewMac : public views::View { DISALLOW_COPY_AND_ASSIGN(RootViewMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_COCOA_ROOT_VIEW_MAC_H_ diff --git a/shell/browser/ui/cocoa/root_view_mac.mm b/shell/browser/ui/cocoa/root_view_mac.mm index 325753f42e..75bae1092d 100644 --- a/shell/browser/ui/cocoa/root_view_mac.mm +++ b/shell/browser/ui/cocoa/root_view_mac.mm @@ -6,7 +6,7 @@ #include "shell/browser/native_window.h" -namespace atom { +namespace electron { RootViewMac::RootViewMac(NativeWindow* window) : window_(window) { set_owned_by_client(); @@ -29,4 +29,4 @@ gfx::Size RootViewMac::GetMaximumSize() const { return window_->GetMaximumSize(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/cocoa/views_delegate_mac.h b/shell/browser/ui/cocoa/views_delegate_mac.h index 03b9c33ab9..8302d62894 100644 --- a/shell/browser/ui/cocoa/views_delegate_mac.h +++ b/shell/browser/ui/cocoa/views_delegate_mac.h @@ -7,7 +7,7 @@ #include "ui/views/views_delegate.h" -namespace atom { +namespace electron { class ViewsDelegateMac : public views::ViewsDelegate { public: @@ -25,6 +25,6 @@ class ViewsDelegateMac : public views::ViewsDelegate { DISALLOW_COPY_AND_ASSIGN(ViewsDelegateMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_COCOA_VIEWS_DELEGATE_MAC_H_ diff --git a/shell/browser/ui/cocoa/views_delegate_mac.mm b/shell/browser/ui/cocoa/views_delegate_mac.mm index 084ef4595a..7e1242c426 100644 --- a/shell/browser/ui/cocoa/views_delegate_mac.mm +++ b/shell/browser/ui/cocoa/views_delegate_mac.mm @@ -7,7 +7,7 @@ #include "content/public/browser/context_factory.h" #include "ui/views/widget/native_widget_mac.h" -namespace atom { +namespace electron { ViewsDelegateMac::ViewsDelegateMac() {} @@ -40,4 +40,4 @@ ui::ContextFactoryPrivate* ViewsDelegateMac::GetContextFactoryPrivate() { return content::GetContextFactoryPrivate(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/devtools_manager_delegate.cc b/shell/browser/ui/devtools_manager_delegate.cc index 4cee7c9133..d54c78d8ba 100644 --- a/shell/browser/ui/devtools_manager_delegate.cc +++ b/shell/browser/ui/devtools_manager_delegate.cc @@ -30,7 +30,7 @@ #include "shell/browser/atom_paths.h" #include "ui/base/resource/resource_bundle.h" -namespace atom { +namespace electron { namespace { @@ -122,4 +122,4 @@ bool DevToolsManagerDelegate::HasBundledFrontendResources() { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/devtools_manager_delegate.h b/shell/browser/ui/devtools_manager_delegate.h index 070a104790..f1a0ddf6a8 100644 --- a/shell/browser/ui/devtools_manager_delegate.h +++ b/shell/browser/ui/devtools_manager_delegate.h @@ -12,7 +12,7 @@ #include "base/macros.h" #include "content/public/browser/devtools_manager_delegate.h" -namespace atom { +namespace electron { class DevToolsManagerDelegate : public content::DevToolsManagerDelegate { public: @@ -37,6 +37,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate { DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_DEVTOOLS_MANAGER_DELEGATE_H_ diff --git a/shell/browser/ui/devtools_ui.cc b/shell/browser/ui/devtools_ui.cc index 5783359ab6..7d8c4e6333 100644 --- a/shell/browser/ui/devtools_ui.cc +++ b/shell/browser/ui/devtools_ui.cc @@ -15,7 +15,7 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/web_ui.h" -namespace atom { +namespace electron { namespace { @@ -117,4 +117,4 @@ DevToolsUI::DevToolsUI(content::BrowserContext* browser_context, std::make_unique()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/devtools_ui.h b/shell/browser/ui/devtools_ui.h index 9b1edae3cd..1bbde643a8 100644 --- a/shell/browser/ui/devtools_ui.h +++ b/shell/browser/ui/devtools_ui.h @@ -9,7 +9,7 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/web_ui_controller.h" -namespace atom { +namespace electron { class BrowserContext; @@ -22,6 +22,6 @@ class DevToolsUI : public content::WebUIController { DISALLOW_COPY_AND_ASSIGN(DevToolsUI); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_DEVTOOLS_UI_H_ diff --git a/shell/browser/ui/drag_util.h b/shell/browser/ui/drag_util.h index e58526aa2a..784bf879b9 100644 --- a/shell/browser/ui/drag_util.h +++ b/shell/browser/ui/drag_util.h @@ -13,12 +13,12 @@ namespace base { class FilePath; } -namespace atom { +namespace electron { void DragFileItems(const std::vector& files, const gfx::Image& icon, gfx::NativeView view); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_DRAG_UTIL_H_ diff --git a/shell/browser/ui/drag_util_mac.mm b/shell/browser/ui/drag_util_mac.mm index 9255a7d114..811a0c8d10 100644 --- a/shell/browser/ui/drag_util_mac.mm +++ b/shell/browser/ui/drag_util_mac.mm @@ -10,7 +10,7 @@ #include "base/strings/sys_string_conversions.h" #include "shell/browser/ui/drag_util.h" -namespace atom { +namespace electron { namespace { @@ -58,4 +58,4 @@ void DragFileItems(const std::vector& files, slideBack:YES]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/drag_util_views.cc b/shell/browser/ui/drag_util_views.cc index cec4c1f4d8..0d80d743d0 100644 --- a/shell/browser/ui/drag_util_views.cc +++ b/shell/browser/ui/drag_util_views.cc @@ -15,7 +15,7 @@ #include "ui/views/widget/widget.h" #include "url/gurl.h" -namespace atom { +namespace electron { void DragFileItems(const std::vector& files, const gfx::Image& icon, @@ -46,4 +46,4 @@ void DragFileItems(const std::vector& files, ui::DragDropTypes::DRAG_EVENT_SOURCE_MOUSE); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/file_dialog.h b/shell/browser/ui/file_dialog.h index 2279170a1d..0d6900c831 100644 --- a/shell/browser/ui/file_dialog.h +++ b/shell/browser/ui/file_dialog.h @@ -14,7 +14,7 @@ #include "shell/common/native_mate_converters/file_path_converter.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { class NativeWindow; } @@ -36,7 +36,7 @@ enum FileDialogProperty { }; struct DialogSettings { - atom::NativeWindow* parent_window = nullptr; + electron::NativeWindow* parent_window = nullptr; std::string title; std::string message; std::string button_label; @@ -57,12 +57,12 @@ bool ShowOpenDialogSync(const DialogSettings& settings, std::vector* paths); void ShowOpenDialog(const DialogSettings& settings, - atom::util::Promise promise); + electron::util::Promise promise); bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path); void ShowSaveDialog(const DialogSettings& settings, - atom::util::Promise promise); + electron::util::Promise promise); } // namespace file_dialog diff --git a/shell/browser/ui/file_dialog_gtk.cc b/shell/browser/ui/file_dialog_gtk.cc index 47a3314197..5a989d429f 100644 --- a/shell/browser/ui/file_dialog_gtk.cc +++ b/shell/browser/ui/file_dialog_gtk.cc @@ -44,7 +44,8 @@ void OnFileFilterDataDestroyed(std::string* file_extension) { class FileChooserDialog { public: FileChooserDialog(GtkFileChooserAction action, const DialogSettings& settings) - : parent_(static_cast(settings.parent_window)), + : parent_( + static_cast(settings.parent_window)), filters_(settings.filters) { const char* confirm_text = _("_OK"); @@ -126,13 +127,13 @@ class FileChooserDialog { gtk_window_present_with_time(GTK_WINDOW(dialog_), time); } - void RunSaveAsynchronous(atom::util::Promise promise) { - save_promise_.reset(new atom::util::Promise(std::move(promise))); + void RunSaveAsynchronous(electron::util::Promise promise) { + save_promise_.reset(new electron::util::Promise(std::move(promise))); RunAsynchronous(); } - void RunOpenAsynchronous(atom::util::Promise promise) { - open_promise_.reset(new atom::util::Promise(std::move(promise))); + void RunOpenAsynchronous(electron::util::Promise promise) { + open_promise_.reset(new electron::util::Promise(std::move(promise))); RunAsynchronous(); } @@ -166,15 +167,15 @@ class FileChooserDialog { private: void AddFilters(const Filters& filters); - atom::NativeWindowViews* parent_; - atom::UnresponsiveSuppressor unresponsive_suppressor_; + electron::NativeWindowViews* parent_; + electron::UnresponsiveSuppressor unresponsive_suppressor_; GtkWidget* dialog_; GtkWidget* preview_; Filters filters_; - std::unique_ptr save_promise_; - std::unique_ptr open_promise_; + std::unique_ptr save_promise_; + std::unique_ptr open_promise_; // Callback for when we update the preview for the selection. CHROMEG_CALLBACK_0(FileChooserDialog, void, OnUpdatePreview, GtkWidget*); @@ -281,7 +282,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings, } void ShowOpenDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { GtkFileChooserAction action = GTK_FILE_CHOOSER_ACTION_OPEN; if (settings.properties & FILE_DIALOG_OPEN_DIRECTORY) action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER; @@ -302,7 +303,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) { } void ShowSaveDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { FileChooserDialog* save_dialog = new FileChooserDialog(GTK_FILE_CHOOSER_ACTION_SAVE, settings); save_dialog->RunSaveAsynchronous(std::move(promise)); diff --git a/shell/browser/ui/file_dialog_mac.mm b/shell/browser/ui/file_dialog_mac.mm index f3ec422cb8..4bc61f7664 100644 --- a/shell/browser/ui/file_dialog_mac.mm +++ b/shell/browser/ui/file_dialog_mac.mm @@ -291,7 +291,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings, void OpenDialogCompletion(int chosen, NSOpenPanel* dialog, bool security_scoped_bookmarks, - atom::util::Promise promise) { + electron::util::Promise promise) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); if (chosen == NSFileHandlingPanelCancelButton) { dict.Set("canceled", true); @@ -320,7 +320,7 @@ void OpenDialogCompletion(int chosen, } void ShowOpenDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { NSOpenPanel* dialog = [NSOpenPanel openPanel]; SetupDialog(dialog, settings); @@ -330,7 +330,7 @@ void ShowOpenDialog(const DialogSettings& settings, // and pass it to the completion handler. bool security_scoped_bookmarks = settings.security_scoped_bookmarks; - __block atom::util::Promise p = std::move(promise); + __block electron::util::Promise p = std::move(promise); if (!settings.parent_window || !settings.parent_window->GetNativeWindow() || settings.force_detached) { @@ -367,7 +367,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) { void SaveDialogCompletion(int chosen, NSSavePanel* dialog, bool security_scoped_bookmarks, - atom::util::Promise promise) { + electron::util::Promise promise) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); if (chosen == NSFileHandlingPanelCancelButton) { dict.Set("canceled", true); @@ -391,7 +391,7 @@ void SaveDialogCompletion(int chosen, } void ShowSaveDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { NSSavePanel* dialog = [NSSavePanel savePanel]; SetupDialog(dialog, settings); @@ -401,7 +401,7 @@ void ShowSaveDialog(const DialogSettings& settings, // and pass it to the completion handler. bool security_scoped_bookmarks = settings.security_scoped_bookmarks; - __block atom::util::Promise p = std::move(promise); + __block electron::util::Promise p = std::move(promise); if (!settings.parent_window || !settings.parent_window->GetNativeWindow() || settings.force_detached) { diff --git a/shell/browser/ui/file_dialog_win.cc b/shell/browser/ui/file_dialog_win.cc index af94cb8145..0192c1a375 100644 --- a/shell/browser/ui/file_dialog_win.cc +++ b/shell/browser/ui/file_dialog_win.cc @@ -81,7 +81,7 @@ bool CreateDialogThread(RunState* run_state) { return true; } -void OnDialogOpened(atom::util::Promise promise, +void OnDialogOpened(electron::util::Promise promise, bool canceled, std::vector paths) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); @@ -92,7 +92,7 @@ void OnDialogOpened(atom::util::Promise promise, void RunOpenDialogInNewThread(const RunState& run_state, const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { std::vector paths; bool result = ShowOpenDialogSync(settings, &paths); run_state.ui_task_runner->PostTask( @@ -101,7 +101,7 @@ void RunOpenDialogInNewThread(const RunState& run_state, run_state.ui_task_runner->DeleteSoon(FROM_HERE, run_state.dialog_thread); } -void OnSaveDialogDone(atom::util::Promise promise, +void OnSaveDialogDone(electron::util::Promise promise, bool canceled, const base::FilePath path) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); @@ -112,7 +112,7 @@ void OnSaveDialogDone(atom::util::Promise promise, void RunSaveDialogInNewThread(const RunState& run_state, const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { base::FilePath path; bool result = ShowSaveDialogSync(settings, &path); run_state.ui_task_runner->PostTask( @@ -160,10 +160,10 @@ static void SetDefaultFolder(IFileDialog* dialog, static HRESULT ShowFileDialog(IFileDialog* dialog, const DialogSettings& settings) { - atom::UnresponsiveSuppressor suppressor; + electron::UnresponsiveSuppressor suppressor; HWND parent_window = settings.parent_window - ? static_cast(settings.parent_window) + ? static_cast(settings.parent_window) ->GetAcceleratedWidget() : NULL; @@ -272,7 +272,7 @@ bool ShowOpenDialogSync(const DialogSettings& settings, } void ShowOpenDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); RunState run_state; if (!CreateDialogThread(&run_state)) { @@ -317,7 +317,7 @@ bool ShowSaveDialogSync(const DialogSettings& settings, base::FilePath* path) { } void ShowSaveDialog(const DialogSettings& settings, - atom::util::Promise promise) { + electron::util::Promise promise) { RunState run_state; if (!CreateDialogThread(&run_state)) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(promise.isolate()); diff --git a/shell/browser/ui/inspectable_web_contents.cc b/shell/browser/ui/inspectable_web_contents.cc index cd6c9532a1..8ca58ffec1 100644 --- a/shell/browser/ui/inspectable_web_contents.cc +++ b/shell/browser/ui/inspectable_web_contents.cc @@ -7,7 +7,7 @@ #include "shell/browser/ui/inspectable_web_contents_impl.h" -namespace atom { +namespace electron { InspectableWebContents* InspectableWebContents::Create( content::WebContents* web_contents, @@ -16,4 +16,4 @@ InspectableWebContents* InspectableWebContents::Create( return new InspectableWebContentsImpl(web_contents, pref_service, is_guest); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index 3f1793bf29..df8b70773e 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -20,7 +20,7 @@ class DevToolsAgentHost; class PrefService; -namespace atom { +namespace electron { class InspectableWebContentsDelegate; class InspectableWebContentsView; @@ -61,6 +61,6 @@ class InspectableWebContents { virtual void InspectElement(int x, int y) = 0; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_H_ diff --git a/shell/browser/ui/inspectable_web_contents_delegate.h b/shell/browser/ui/inspectable_web_contents_delegate.h index 235f9df1c6..363ef1e202 100644 --- a/shell/browser/ui/inspectable_web_contents_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_delegate.h @@ -10,7 +10,7 @@ #include "base/files/file_path.h" -namespace atom { +namespace electron { class InspectableWebContentsDelegate { public: @@ -37,6 +37,6 @@ class InspectableWebContentsDelegate { const std::string& query) {} }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_DELEGATE_H_ diff --git a/shell/browser/ui/inspectable_web_contents_impl.cc b/shell/browser/ui/inspectable_web_contents_impl.cc index 23dabdb778..03dd06e386 100644 --- a/shell/browser/ui/inspectable_web_contents_impl.cc +++ b/shell/browser/ui/inspectable_web_contents_impl.cc @@ -45,7 +45,7 @@ #include "ui/display/display.h" #include "ui/display/screen.h" -namespace atom { +namespace electron { namespace { @@ -914,4 +914,4 @@ void InspectableWebContentsImpl::SendMessageAck(int request_id, CallClientFunction("DevToolsAPI.embedderMessageAck", &id_value, arg, nullptr); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/inspectable_web_contents_impl.h b/shell/browser/ui/inspectable_web_contents_impl.h index d31a25cfe2..5a93e458f3 100644 --- a/shell/browser/ui/inspectable_web_contents_impl.h +++ b/shell/browser/ui/inspectable_web_contents_impl.h @@ -27,7 +27,7 @@ class PrefService; class PrefRegistrySimple; -namespace atom { +namespace electron { class InspectableWebContentsDelegate; class InspectableWebContentsView; @@ -245,6 +245,6 @@ class InspectableWebContentsImpl DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsImpl); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_IMPL_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view.h b/shell/browser/ui/inspectable_web_contents_view.h index 02a0214e45..f082e2b24e 100644 --- a/shell/browser/ui/inspectable_web_contents_view.h +++ b/shell/browser/ui/inspectable_web_contents_view.h @@ -17,7 +17,7 @@ class View; } #endif -namespace atom { +namespace electron { class InspectableWebContentsViewDelegate; @@ -57,6 +57,6 @@ class InspectableWebContentsView { InspectableWebContentsViewDelegate* delegate_; // weak references. }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view_delegate.cc b/shell/browser/ui/inspectable_web_contents_view_delegate.cc index ecf1f34a14..a4d969b453 100644 --- a/shell/browser/ui/inspectable_web_contents_view_delegate.cc +++ b/shell/browser/ui/inspectable_web_contents_view_delegate.cc @@ -5,10 +5,10 @@ #include "shell/browser/ui/inspectable_web_contents_view_delegate.h" -namespace atom { +namespace electron { gfx::ImageSkia InspectableWebContentsViewDelegate::GetDevToolsWindowIcon() { return gfx::ImageSkia(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/inspectable_web_contents_view_delegate.h b/shell/browser/ui/inspectable_web_contents_view_delegate.h index b46d98db58..73c4214d38 100644 --- a/shell/browser/ui/inspectable_web_contents_view_delegate.h +++ b/shell/browser/ui/inspectable_web_contents_view_delegate.h @@ -10,7 +10,7 @@ #include "ui/gfx/image/image_skia.h" -namespace atom { +namespace electron { class InspectableWebContentsViewDelegate { public: @@ -30,6 +30,6 @@ class InspectableWebContentsViewDelegate { #endif }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_DELEGATE_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view_mac.h b/shell/browser/ui/inspectable_web_contents_view_mac.h index 704ca943c6..a788c0dadf 100644 --- a/shell/browser/ui/inspectable_web_contents_view_mac.h +++ b/shell/browser/ui/inspectable_web_contents_view_mac.h @@ -12,7 +12,7 @@ @class AtomInspectableWebContentsView; -namespace atom { +namespace electron { class InspectableWebContentsImpl; @@ -45,6 +45,6 @@ class InspectableWebContentsViewMac : public InspectableWebContentsView { DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_INSPECTABLE_WEB_CONTENTS_VIEW_MAC_H_ diff --git a/shell/browser/ui/inspectable_web_contents_view_mac.mm b/shell/browser/ui/inspectable_web_contents_view_mac.mm index aad2990f31..4a241a7917 100644 --- a/shell/browser/ui/inspectable_web_contents_view_mac.mm +++ b/shell/browser/ui/inspectable_web_contents_view_mac.mm @@ -12,7 +12,7 @@ #include "shell/browser/ui/inspectable_web_contents.h" #include "shell/browser/ui/inspectable_web_contents_view_delegate.h" -namespace atom { +namespace electron { InspectableWebContentsView* CreateInspectableContentsView( InspectableWebContentsImpl* inspectable_web_contents) { @@ -63,4 +63,4 @@ void InspectableWebContentsViewMac::SetTitle(const base::string16& title) { [view_ setTitle:base::SysUTF16ToNSString(title)]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/message_box.h b/shell/browser/ui/message_box.h index ea195df87a..514fd7704b 100644 --- a/shell/browser/ui/message_box.h +++ b/shell/browser/ui/message_box.h @@ -12,7 +12,7 @@ #include "base/strings/string16.h" #include "ui/gfx/image/image_skia.h" -namespace atom { +namespace electron { class NativeWindow; @@ -30,12 +30,12 @@ enum MessageBoxOptions { }; struct MessageBoxSettings { - atom::NativeWindow* parent_window = nullptr; - MessageBoxType type = atom::MessageBoxType::kNone; + electron::NativeWindow* parent_window = nullptr; + MessageBoxType type = electron::MessageBoxType::kNone; std::vector buttons; int default_id; int cancel_id; - int options = atom::MessageBoxOptions::MESSAGE_BOX_NONE; + int options = electron::MessageBoxOptions::MESSAGE_BOX_NONE; std::string title; std::string message; std::string detail; @@ -60,6 +60,6 @@ void ShowMessageBox(const MessageBoxSettings& settings, // stage of application. void ShowErrorBox(const base::string16& title, const base::string16& content); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_MESSAGE_BOX_H_ diff --git a/shell/browser/ui/message_box_gtk.cc b/shell/browser/ui/message_box_gtk.cc index 46a5aa5e21..6160ea9065 100644 --- a/shell/browser/ui/message_box_gtk.cc +++ b/shell/browser/ui/message_box_gtk.cc @@ -25,7 +25,7 @@ #define ANSI_BACKGROUND_GRAY "\x1b[47m" #define ANSI_RESET "\x1b[0m" -namespace atom { +namespace electron { MessageBoxSettings::MessageBoxSettings() = default; MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default; @@ -166,7 +166,7 @@ class GtkMessageBox : public NativeWindowObserver { CHROMEG_CALLBACK_0(GtkMessageBox, void, OnCheckboxToggled, GtkWidget*); private: - atom::UnresponsiveSuppressor unresponsive_suppressor_; + electron::UnresponsiveSuppressor unresponsive_suppressor_; // The id to return when the dialog is closed without pressing buttons. int cancel_id_ = 0; @@ -207,8 +207,8 @@ void ShowMessageBox(const MessageBoxSettings& settings, void ShowErrorBox(const base::string16& title, const base::string16& content) { if (Browser::Get()->is_ready()) { - atom::MessageBoxSettings settings; - settings.type = atom::MessageBoxType::kError; + electron::MessageBoxSettings settings; + settings.type = electron::MessageBoxType::kError; settings.buttons = {"OK"}; settings.title = "Error"; settings.message = base::UTF16ToUTF8(title); @@ -224,4 +224,4 @@ void ShowErrorBox(const base::string16& title, const base::string16& content) { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/message_box_mac.mm b/shell/browser/ui/message_box_mac.mm index fabb29d817..5e91015c30 100644 --- a/shell/browser/ui/message_box_mac.mm +++ b/shell/browser/ui/message_box_mac.mm @@ -17,7 +17,7 @@ #include "skia/ext/skia_utils_mac.h" #include "ui/gfx/image/image_skia.h" -namespace atom { +namespace electron { MessageBoxSettings::MessageBoxSettings() = default; MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default; @@ -149,4 +149,4 @@ void ShowErrorBox(const base::string16& title, const base::string16& content) { [alert release]; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/message_box_win.cc b/shell/browser/ui/message_box_win.cc index 006228a379..3a42257156 100644 --- a/shell/browser/ui/message_box_win.cc +++ b/shell/browser/ui/message_box_win.cc @@ -24,7 +24,7 @@ #include "ui/gfx/icon_util.h" #include "ui/gfx/image/image_skia.h" -namespace atom { +namespace electron { MessageBoxSettings::MessageBoxSettings() = default; MessageBoxSettings::MessageBoxSettings(const MessageBoxSettings&) = default; @@ -100,8 +100,8 @@ int ShowTaskDialogUTF16(NativeWindow* parent, config.dwFlags = flags; if (parent) { - config.hwndParent = - static_cast(parent)->GetAcceleratedWidget(); + config.hwndParent = static_cast(parent) + ->GetAcceleratedWidget(); } if (default_id > 0) @@ -219,7 +219,7 @@ void RunMessageBoxInNewThread(base::Thread* thread, } // namespace int ShowMessageBoxSync(const MessageBoxSettings& settings) { - atom::UnresponsiveSuppressor suppressor; + electron::UnresponsiveSuppressor suppressor; return ShowTaskDialogUTF8(settings); } @@ -241,9 +241,9 @@ void ShowMessageBox(const MessageBoxSettings& settings, } void ShowErrorBox(const base::string16& title, const base::string16& content) { - atom::UnresponsiveSuppressor suppressor; + electron::UnresponsiveSuppressor suppressor; ShowTaskDialogUTF16(nullptr, MessageBoxType::kError, {}, -1, 0, 0, L"Error", title, content, L"", nullptr, gfx::ImageSkia()); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/tray_icon.cc b/shell/browser/ui/tray_icon.cc index ef09d57d73..555eb05ed6 100644 --- a/shell/browser/ui/tray_icon.cc +++ b/shell/browser/ui/tray_icon.cc @@ -4,7 +4,7 @@ #include "shell/browser/ui/tray_icon.h" -namespace atom { +namespace electron { TrayIcon::TrayIcon() {} @@ -102,4 +102,4 @@ void TrayIcon::NotifyDragEnded() { observer.OnDragEnded(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/tray_icon.h b/shell/browser/ui/tray_icon.h index 11cce17b46..8169180c60 100644 --- a/shell/browser/ui/tray_icon.h +++ b/shell/browser/ui/tray_icon.h @@ -13,7 +13,7 @@ #include "shell/browser/ui/tray_icon_observer.h" #include "ui/gfx/geometry/rect.h" -namespace atom { +namespace electron { class TrayIcon { public: @@ -107,6 +107,6 @@ class TrayIcon { DISALLOW_COPY_AND_ASSIGN(TrayIcon); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_TRAY_ICON_H_ diff --git a/shell/browser/ui/tray_icon_cocoa.h b/shell/browser/ui/tray_icon_cocoa.h index e29e616a8d..e14cd20395 100644 --- a/shell/browser/ui/tray_icon_cocoa.h +++ b/shell/browser/ui/tray_icon_cocoa.h @@ -15,7 +15,7 @@ @class AtomMenuController; @class StatusItemView; -namespace atom { +namespace electron { class TrayIconCocoa : public TrayIcon, public AtomMenuModel::Observer { public: @@ -52,6 +52,6 @@ class TrayIconCocoa : public TrayIcon, public AtomMenuModel::Observer { DISALLOW_COPY_AND_ASSIGN(TrayIconCocoa); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_TRAY_ICON_COCOA_H_ diff --git a/shell/browser/ui/tray_icon_cocoa.mm b/shell/browser/ui/tray_icon_cocoa.mm index 130a786e93..bf31b8d6df 100644 --- a/shell/browser/ui/tray_icon_cocoa.mm +++ b/shell/browser/ui/tray_icon_cocoa.mm @@ -27,9 +27,9 @@ const CGFloat kVerticalTitleMargin = 2; } // namespace @interface StatusItemView : NSView { - atom::TrayIconCocoa* trayIcon_; // weak + electron::TrayIconCocoa* trayIcon_; // weak AtomMenuController* menuController_; // weak - atom::TrayIcon::HighlightMode highlight_mode_; + electron::TrayIcon::HighlightMode highlight_mode_; BOOL ignoreDoubleClickEvents_; BOOL forceHighlight_; BOOL inMouseEventSequence_; @@ -52,10 +52,10 @@ const CGFloat kVerticalTitleMargin = 2; [super dealloc]; } -- (id)initWithIcon:(atom::TrayIconCocoa*)icon { +- (id)initWithIcon:(electron::TrayIconCocoa*)icon { trayIcon_ = icon; menuController_ = nil; - highlight_mode_ = atom::TrayIcon::HighlightMode::SELECTION; + highlight_mode_ = electron::TrayIcon::HighlightMode::SELECTION; ignoreDoubleClickEvents_ = NO; forceHighlight_ = NO; inMouseEventSequence_ = NO; @@ -219,7 +219,7 @@ const CGFloat kVerticalTitleMargin = 2; alternateImage_.reset([image copy]); } -- (void)setHighlight:(atom::TrayIcon::HighlightMode)mode { +- (void)setHighlight:(electron::TrayIcon::HighlightMode)mode { highlight_mode_ = mode; [self setNeedsDisplay:YES]; } @@ -332,7 +332,7 @@ const CGFloat kVerticalTitleMargin = 2; [self setNeedsDisplay:YES]; } -- (void)popUpContextMenu:(atom::AtomMenuModel*)menu_model { +- (void)popUpContextMenu:(electron::AtomMenuModel*)menu_model { // Show a custom menu. if (menu_model) { base::scoped_nsobject menuController( @@ -431,7 +431,7 @@ const CGFloat kVerticalTitleMargin = 2; } - (BOOL)shouldHighlight { - using HighlightMode = atom::TrayIcon::HighlightMode; + using HighlightMode = electron::TrayIcon::HighlightMode; switch (highlight_mode_) { case HighlightMode::ALWAYS: return true; @@ -445,7 +445,7 @@ const CGFloat kVerticalTitleMargin = 2; @end -namespace atom { +namespace electron { TrayIconCocoa::TrayIconCocoa() { status_item_view_.reset([[StatusItemView alloc] initWithIcon:this]); @@ -527,4 +527,4 @@ TrayIcon* TrayIcon::Create() { return new TrayIconCocoa; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/tray_icon_gtk.cc b/shell/browser/ui/tray_icon_gtk.cc index d10446aaa2..0fa6a21589 100644 --- a/shell/browser/ui/tray_icon_gtk.cc +++ b/shell/browser/ui/tray_icon_gtk.cc @@ -11,7 +11,7 @@ #include "ui/gfx/image/image.h" #include "ui/views/linux_ui/linux_ui.h" -namespace atom { +namespace electron { TrayIconGtk::TrayIconGtk() {} @@ -50,4 +50,4 @@ TrayIcon* TrayIcon::Create() { return new TrayIconGtk; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/tray_icon_gtk.h b/shell/browser/ui/tray_icon_gtk.h index 330cc7fb36..23af3e4ae9 100644 --- a/shell/browser/ui/tray_icon_gtk.h +++ b/shell/browser/ui/tray_icon_gtk.h @@ -15,7 +15,7 @@ namespace views { class StatusIconLinux; } -namespace atom { +namespace electron { class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { public: @@ -37,6 +37,6 @@ class TrayIconGtk : public TrayIcon, public views::StatusIconLinux::Delegate { DISALLOW_COPY_AND_ASSIGN(TrayIconGtk); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_TRAY_ICON_GTK_H_ diff --git a/shell/browser/ui/tray_icon_observer.h b/shell/browser/ui/tray_icon_observer.h index 49361dc7eb..3bfe520d18 100644 --- a/shell/browser/ui/tray_icon_observer.h +++ b/shell/browser/ui/tray_icon_observer.h @@ -15,7 +15,7 @@ class Rect; class Point; } // namespace gfx -namespace atom { +namespace electron { class TrayIconObserver : public base::CheckedObserver { public: @@ -41,6 +41,6 @@ class TrayIconObserver : public base::CheckedObserver { ~TrayIconObserver() override {} }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_TRAY_ICON_OBSERVER_H_ diff --git a/shell/browser/ui/tray_icon_win.cc b/shell/browser/ui/tray_icon_win.cc index 1c0e1f6c0d..eb61b8edc3 100644 --- a/shell/browser/ui/tray_icon_win.cc +++ b/shell/browser/ui/tray_icon_win.cc @@ -5,7 +5,7 @@ #include "shell/browser/ui/win/notify_icon.h" #include "shell/browser/ui/win/notify_icon_host.h" -namespace atom { +namespace electron { // static TrayIcon* TrayIcon::Create() { @@ -13,4 +13,4 @@ TrayIcon* TrayIcon::Create() { return host.CreateNotifyIcon(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/atom_views_delegate.cc b/shell/browser/ui/views/atom_views_delegate.cc index 209c86c4c1..2bae901e4a 100644 --- a/shell/browser/ui/views/atom_views_delegate.cc +++ b/shell/browser/ui/views/atom_views_delegate.cc @@ -28,7 +28,7 @@ bool IsDesktopEnvironmentUnity() { } // namespace -namespace atom { +namespace electron { ViewsDelegate::ViewsDelegate() {} @@ -112,4 +112,4 @@ bool ViewsDelegate::WindowManagerProvidesTitleBar(bool maximized) { #endif } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/atom_views_delegate.h b/shell/browser/ui/views/atom_views_delegate.h index 826bbec897..d3a086652e 100644 --- a/shell/browser/ui/views/atom_views_delegate.h +++ b/shell/browser/ui/views/atom_views_delegate.h @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "ui/views/views_delegate.h" -namespace atom { +namespace electron { class ViewsDelegate : public views::ViewsDelegate { public: @@ -53,6 +53,6 @@ class ViewsDelegate : public views::ViewsDelegate { DISALLOW_COPY_AND_ASSIGN(ViewsDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_ATOM_VIEWS_DELEGATE_H_ diff --git a/shell/browser/ui/views/autofill_popup_view.cc b/shell/browser/ui/views/autofill_popup_view.cc index 5d6baa815a..9d1218a38f 100644 --- a/shell/browser/ui/views/autofill_popup_view.cc +++ b/shell/browser/ui/views/autofill_popup_view.cc @@ -19,7 +19,7 @@ #include "ui/views/focus/focus_manager.h" #include "ui/views/widget/widget.h" -namespace atom { +namespace electron { void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) { node_data->role = ax::mojom::Role::kMenuItem; @@ -489,4 +489,4 @@ void AutofillPopupView::RemoveObserver() { views::WidgetFocusManager::GetInstance()->RemoveFocusChangeListener(this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/autofill_popup_view.h b/shell/browser/ui/views/autofill_popup_view.h index f22863e936..bdc8fbd81a 100644 --- a/shell/browser/ui/views/autofill_popup_view.h +++ b/shell/browser/ui/views/autofill_popup_view.h @@ -23,7 +23,7 @@ #include "shell/browser/osr/osr_view_proxy.h" #endif -namespace atom { +namespace electron { const int kPopupBorderThickness = 1; const int kSmallerFontSizeDelta = -1; @@ -150,6 +150,6 @@ class AutofillPopupView : public views::WidgetDelegateView, base::WeakPtrFactory weak_ptr_factory_; }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_AUTOFILL_POPUP_VIEW_H_ diff --git a/shell/browser/ui/views/frameless_view.cc b/shell/browser/ui/views/frameless_view.cc index 48e4d00550..060e87df7e 100644 --- a/shell/browser/ui/views/frameless_view.cc +++ b/shell/browser/ui/views/frameless_view.cc @@ -10,7 +10,7 @@ #include "ui/views/widget/widget.h" #include "ui/views/widget/widget_delegate.h" -namespace atom { +namespace electron { namespace { @@ -111,4 +111,4 @@ const char* FramelessView::GetClassName() const { return kViewClassName; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/frameless_view.h b/shell/browser/ui/views/frameless_view.h index 14bc1ad63d..7719fa19c3 100644 --- a/shell/browser/ui/views/frameless_view.h +++ b/shell/browser/ui/views/frameless_view.h @@ -11,7 +11,7 @@ namespace views { class Widget; } -namespace atom { +namespace electron { class NativeWindowViews; @@ -52,6 +52,6 @@ class FramelessView : public views::NonClientFrameView { DISALLOW_COPY_AND_ASSIGN(FramelessView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_FRAMELESS_VIEW_H_ diff --git a/shell/browser/ui/views/global_menu_bar_x11.cc b/shell/browser/ui/views/global_menu_bar_x11.cc index 52f291a086..8452dcb018 100644 --- a/shell/browser/ui/views/global_menu_bar_x11.cc +++ b/shell/browser/ui/views/global_menu_bar_x11.cc @@ -51,7 +51,7 @@ typedef DbusmenuServer* (*dbusmenu_server_new_func)(const char* object); typedef void (*dbusmenu_server_set_root_func)(DbusmenuServer* self, DbusmenuMenuitem* root); -namespace atom { +namespace electron { namespace { @@ -333,4 +333,4 @@ void GlobalMenuBarX11::OnSubMenuShow(DbusmenuMenuitem* item) { BuildMenuFromModel(model->GetSubmenuModelAt(id), item); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/global_menu_bar_x11.h b/shell/browser/ui/views/global_menu_bar_x11.h index f369a0f6ee..b0ccf33217 100644 --- a/shell/browser/ui/views/global_menu_bar_x11.h +++ b/shell/browser/ui/views/global_menu_bar_x11.h @@ -20,7 +20,7 @@ namespace ui { class Accelerator; } -namespace atom { +namespace electron { class NativeWindowViews; @@ -76,6 +76,6 @@ class GlobalMenuBarX11 { DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_GLOBAL_MENU_BAR_X11_H_ diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.cc b/shell/browser/ui/views/inspectable_web_contents_view_views.cc index f2df627696..6669e17b4f 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.cc +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.cc @@ -14,7 +14,7 @@ #include "ui/views/widget/widget_delegate.h" #include "ui/views/window/client_view.h" -namespace atom { +namespace electron { namespace { @@ -232,4 +232,4 @@ void InspectableWebContentsViewViews::Layout() { contents_web_view_->SetBoundsRect(new_contents_bounds); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/inspectable_web_contents_view_views.h b/shell/browser/ui/views/inspectable_web_contents_view_views.h index 860027b3cd..0c4e5223a0 100644 --- a/shell/browser/ui/views/inspectable_web_contents_view_views.h +++ b/shell/browser/ui/views/inspectable_web_contents_view_views.h @@ -18,7 +18,7 @@ class Widget; class WidgetDelegate; } // namespace views -namespace atom { +namespace electron { class InspectableWebContentsImpl; @@ -67,6 +67,6 @@ class InspectableWebContentsViewViews : public InspectableWebContentsView, DISALLOW_COPY_AND_ASSIGN(InspectableWebContentsViewViews); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_INSPECTABLE_WEB_CONTENTS_VIEW_VIEWS_H_ diff --git a/shell/browser/ui/views/menu_bar.cc b/shell/browser/ui/views/menu_bar.cc index 2a4d3d4579..ad261c37fe 100644 --- a/shell/browser/ui/views/menu_bar.cc +++ b/shell/browser/ui/views/menu_bar.cc @@ -24,7 +24,7 @@ #include "ui/gfx/color_utils.h" #endif -namespace atom { +namespace electron { namespace { @@ -161,7 +161,7 @@ bool MenuBar::AcceleratorPressed(const ui::Accelerator& accelerator) { auto* button = static_cast(children[i]); bool shifted = false; auto keycode = - atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted); + electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted); if (keycode == accelerator.key_code()) { const gfx::Point p(0, 0); @@ -191,7 +191,7 @@ bool MenuBar::SetPaneFocus(views::View* initial_focus) { // views::View::Focus // views::FocusManager::SetFocusedViewWithReason // views::AccessiblePaneView::SetPaneFocus - // atom::MenuBar::SetPaneFocus + // electron::MenuBar::SetPaneFocus if (initial_focus && initial_focus->GetWidget()) { aura::Window* window = initial_focus->GetWidget()->GetNativeWindow(); if (!window || !window->GetRootWindow()) @@ -207,7 +207,7 @@ bool MenuBar::SetPaneFocus(views::View* initial_focus) { auto* button = static_cast(children[i]); bool shifted = false; auto keycode = - atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted); + electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted); // We want the menu items to activate if the user presses the accelerator // key, even without alt, since we are now focused on the menu bar @@ -238,7 +238,7 @@ void MenuBar::RemovePaneFocus() { auto* button = static_cast(children[i]); bool shifted = false; auto keycode = - atom::KeyboardCodeFromCharCode(button->accelerator(), &shifted); + electron::KeyboardCodeFromCharCode(button->accelerator(), &shifted); if (keycode != ui::VKEY_UNKNOWN && unreg.find(keycode) != unreg.end()) { unreg.insert(keycode); @@ -346,4 +346,4 @@ void MenuBar::UpdateViewColors() { #endif } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/menu_bar.h b/shell/browser/ui/views/menu_bar.h index b2f564312e..9675ffad27 100644 --- a/shell/browser/ui/views/menu_bar.h +++ b/shell/browser/ui/views/menu_bar.h @@ -20,7 +20,7 @@ class Button; class MenuButton; } // namespace views -namespace atom { +namespace electron { class MenuBarColorUpdater : public views::FocusChangeListener { public: @@ -38,7 +38,7 @@ class MenuBarColorUpdater : public views::FocusChangeListener { class MenuBar : public views::AccessiblePaneView, public views::MenuButtonListener, - public atom::MenuDelegate::Observer { + public electron::MenuDelegate::Observer { public: static const char kViewClassName[]; @@ -65,7 +65,7 @@ class MenuBar : public views::AccessiblePaneView, AtomMenuModel** menu_model, views::MenuButton** button); - // atom::MenuDelegate::Observer: + // electron::MenuDelegate::Observer: void OnBeforeExecuteCommand() override; void OnMenuClosed() override; @@ -109,6 +109,6 @@ class MenuBar : public views::AccessiblePaneView, DISALLOW_COPY_AND_ASSIGN(MenuBar); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_MENU_BAR_H_ diff --git a/shell/browser/ui/views/menu_delegate.cc b/shell/browser/ui/views/menu_delegate.cc index cdb20eac28..3dc49977a6 100644 --- a/shell/browser/ui/views/menu_delegate.cc +++ b/shell/browser/ui/views/menu_delegate.cc @@ -14,7 +14,7 @@ #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/widget/widget.h" -namespace atom { +namespace electron { MenuDelegate::MenuDelegate(MenuBar* menu_bar) : menu_bar_(menu_bar), id_(-1), hold_first_switch_(false) {} @@ -140,4 +140,4 @@ views::MenuItemView* MenuDelegate::GetSiblingMenu( return nullptr; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/menu_delegate.h b/shell/browser/ui/views/menu_delegate.h index 39968c2afb..db19b265c6 100644 --- a/shell/browser/ui/views/menu_delegate.h +++ b/shell/browser/ui/views/menu_delegate.h @@ -16,7 +16,7 @@ class MenuRunner; class Button; } // namespace views -namespace atom { +namespace electron { class MenuBar; @@ -75,6 +75,6 @@ class MenuDelegate : public views::MenuDelegate { DISALLOW_COPY_AND_ASSIGN(MenuDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_MENU_DELEGATE_H_ diff --git a/shell/browser/ui/views/menu_model_adapter.cc b/shell/browser/ui/views/menu_model_adapter.cc index 0856637f31..f18c8210f1 100644 --- a/shell/browser/ui/views/menu_model_adapter.cc +++ b/shell/browser/ui/views/menu_model_adapter.cc @@ -4,7 +4,7 @@ #include "shell/browser/ui/views/menu_model_adapter.h" -namespace atom { +namespace electron { MenuModelAdapter::MenuModelAdapter(AtomMenuModel* menu_model) : views::MenuModelAdapter(menu_model), menu_model_(menu_model) {} @@ -22,4 +22,4 @@ bool MenuModelAdapter::GetAccelerator(int id, return false; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/menu_model_adapter.h b/shell/browser/ui/views/menu_model_adapter.h index a7a156dc84..6647fa3435 100644 --- a/shell/browser/ui/views/menu_model_adapter.h +++ b/shell/browser/ui/views/menu_model_adapter.h @@ -8,7 +8,7 @@ #include "shell/browser/ui/atom_menu_model.h" #include "ui/views/controls/menu/menu_model_adapter.h" -namespace atom { +namespace electron { class MenuModelAdapter : public views::MenuModelAdapter { public: @@ -24,6 +24,6 @@ class MenuModelAdapter : public views::MenuModelAdapter { DISALLOW_COPY_AND_ASSIGN(MenuModelAdapter); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_MENU_MODEL_ADAPTER_H_ diff --git a/shell/browser/ui/views/native_frame_view.cc b/shell/browser/ui/views/native_frame_view.cc index 4a9acb89f2..02f7ba8c2f 100644 --- a/shell/browser/ui/views/native_frame_view.cc +++ b/shell/browser/ui/views/native_frame_view.cc @@ -6,7 +6,7 @@ #include "shell/browser/native_window.h" -namespace atom { +namespace electron { const char NativeFrameView::kViewClassName[] = "AtomNativeFrameView"; @@ -25,4 +25,4 @@ const char* NativeFrameView::GetClassName() const { return kViewClassName; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/native_frame_view.h b/shell/browser/ui/views/native_frame_view.h index 960486e7da..2b5b85f6a2 100644 --- a/shell/browser/ui/views/native_frame_view.h +++ b/shell/browser/ui/views/native_frame_view.h @@ -7,7 +7,7 @@ #include "ui/views/window/native_frame_view.h" -namespace atom { +namespace electron { class NativeWindow; @@ -30,6 +30,6 @@ class NativeFrameView : public views::NativeFrameView { DISALLOW_COPY_AND_ASSIGN(NativeFrameView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_NATIVE_FRAME_VIEW_H_ diff --git a/shell/browser/ui/views/root_view.cc b/shell/browser/ui/views/root_view.cc index 96e5b84b02..1af5a439c1 100644 --- a/shell/browser/ui/views/root_view.cc +++ b/shell/browser/ui/views/root_view.cc @@ -8,7 +8,7 @@ #include "shell/browser/native_window.h" #include "shell/browser/ui/views/menu_bar.h" -namespace atom { +namespace electron { namespace { @@ -230,4 +230,4 @@ void RootView::SetInsets(const gfx::Insets& insets) { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/root_view.h b/shell/browser/ui/views/root_view.h index 6c2360c198..07c440946e 100644 --- a/shell/browser/ui/views/root_view.h +++ b/shell/browser/ui/views/root_view.h @@ -16,7 +16,7 @@ namespace content { struct NativeWebKeyboardEvent; } -namespace atom { +namespace electron { class AtomMenuModel; class MenuBar; @@ -69,6 +69,6 @@ class RootView : public views::View { DISALLOW_COPY_AND_ASSIGN(RootView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_ROOT_VIEW_H_ diff --git a/shell/browser/ui/views/submenu_button.cc b/shell/browser/ui/views/submenu_button.cc index bf03cba366..38b8adeea3 100644 --- a/shell/browser/ui/views/submenu_button.cc +++ b/shell/browser/ui/views/submenu_button.cc @@ -17,7 +17,7 @@ #include "ui/views/animation/ink_drop_impl.h" #include "ui/views/controls/button/label_button_border.h" -namespace atom { +namespace electron { SubmenuButton::SubmenuButton(const base::string16& title, views::MenuButtonListener* menu_button_listener, @@ -113,4 +113,4 @@ void SubmenuButton::GetCharacterPosition(const base::string16& text, &height, 0, 0); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/submenu_button.h b/shell/browser/ui/views/submenu_button.h index c3733dd9f2..01416ce212 100644 --- a/shell/browser/ui/views/submenu_button.h +++ b/shell/browser/ui/views/submenu_button.h @@ -11,7 +11,7 @@ #include "ui/views/animation/ink_drop_highlight.h" #include "ui/views/controls/button/menu_button.h" -namespace atom { +namespace electron { // Special button that used by menu bar to show submenus. class SubmenuButton : public views::MenuButton { @@ -58,6 +58,6 @@ class SubmenuButton : public views::MenuButton { DISALLOW_COPY_AND_ASSIGN(SubmenuButton); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_SUBMENU_BUTTON_H_ diff --git a/shell/browser/ui/views/win_frame_view.cc b/shell/browser/ui/views/win_frame_view.cc index 1c4c427d7c..61f72e4aad 100644 --- a/shell/browser/ui/views/win_frame_view.cc +++ b/shell/browser/ui/views/win_frame_view.cc @@ -8,7 +8,7 @@ #include "ui/views/widget/widget.h" #include "ui/views/win/hwnd_util.h" -namespace atom { +namespace electron { const char WinFrameView::kViewClassName[] = "WinFrameView"; @@ -34,4 +34,4 @@ const char* WinFrameView::GetClassName() const { return kViewClassName; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/views/win_frame_view.h b/shell/browser/ui/views/win_frame_view.h index b5366630a4..884a13e506 100644 --- a/shell/browser/ui/views/win_frame_view.h +++ b/shell/browser/ui/views/win_frame_view.h @@ -7,7 +7,7 @@ #include "shell/browser/ui/views/frameless_view.h" -namespace atom { +namespace electron { class WinFrameView : public FramelessView { public: @@ -27,6 +27,6 @@ class WinFrameView : public FramelessView { DISALLOW_COPY_AND_ASSIGN(WinFrameView); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_VIEWS_WIN_FRAME_VIEW_H_ diff --git a/shell/browser/ui/webui/pdf_viewer_handler.cc b/shell/browser/ui/webui/pdf_viewer_handler.cc index 0ddebfc563..c36ddb46ec 100644 --- a/shell/browser/ui/webui/pdf_viewer_handler.cc +++ b/shell/browser/ui/webui/pdf_viewer_handler.cc @@ -21,7 +21,7 @@ #include "ui/base/l10n/l10n_util.h" #include "ui/base/webui/web_ui_util.h" -namespace atom { +namespace electron { namespace { @@ -228,4 +228,4 @@ void PdfViewerHandler::RemoveObserver() { zoom_controller->RemoveObserver(this); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/webui/pdf_viewer_handler.h b/shell/browser/ui/webui/pdf_viewer_handler.h index 207df2498f..a8abd88c9a 100644 --- a/shell/browser/ui/webui/pdf_viewer_handler.h +++ b/shell/browser/ui/webui/pdf_viewer_handler.h @@ -21,7 +21,7 @@ namespace content { struct StreamInfo; } -namespace atom { +namespace electron { class PdfViewerHandler : public content::WebUIMessageHandler, public WebContentsZoomController::Observer { @@ -56,6 +56,6 @@ class PdfViewerHandler : public content::WebUIMessageHandler, DISALLOW_COPY_AND_ASSIGN(PdfViewerHandler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WEBUI_PDF_VIEWER_HANDLER_H_ diff --git a/shell/browser/ui/webui/pdf_viewer_ui.cc b/shell/browser/ui/webui/pdf_viewer_ui.cc index 032df63389..77aa4cb3eb 100644 --- a/shell/browser/ui/webui/pdf_viewer_ui.cc +++ b/shell/browser/ui/webui/pdf_viewer_ui.cc @@ -40,7 +40,7 @@ using content::BrowserThread; -namespace atom { +namespace electron { namespace { @@ -118,7 +118,7 @@ void CallMigrationCallback(T callback, class PdfViewerUI::ResourceRequester : public base::RefCountedThreadSafe, - public atom::LayeredResourceHandler::Delegate { + public electron::LayeredResourceHandler::Delegate { public: explicit ResourceRequester(StreamResponseCallback cb) : stream_response_cb_(std::move(cb)) {} @@ -160,8 +160,8 @@ class PdfViewerUI::ResourceRequester stream_info_->original_url = request->url(); // Helper to fill stream response details. - handler.reset(new atom::LayeredResourceHandler(request.get(), - std::move(handler), this)); + handler.reset(new electron::LayeredResourceHandler( + request.get(), std::move(handler), this)); content::ResourceDispatcherHostImpl::Get()->BeginURLRequest( std::move(request), std::move(handler), @@ -172,7 +172,7 @@ class PdfViewerUI::ResourceRequester } protected: - // atom::LayeredResourceHandler::Delegate: + // electron::LayeredResourceHandler::Delegate: void OnResponseStarted(network::ResourceResponse* response) override { DCHECK_CURRENTLY_ON(BrowserThread::IO); @@ -255,4 +255,4 @@ void PdfViewerUI::OnSaveURLAs(const GURL& url, web_contents()->SaveFrame(url, referrer); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/webui/pdf_viewer_ui.h b/shell/browser/ui/webui/pdf_viewer_ui.h index b19df6163a..24af7378ca 100644 --- a/shell/browser/ui/webui/pdf_viewer_ui.h +++ b/shell/browser/ui/webui/pdf_viewer_ui.h @@ -18,7 +18,7 @@ class BrowserContext; struct StreamInfo; } // namespace content -namespace atom { +namespace electron { class PdfViewerHandler; @@ -56,6 +56,6 @@ class PdfViewerUI : public content::WebUIController, DISALLOW_COPY_AND_ASSIGN(PdfViewerUI); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WEBUI_PDF_VIEWER_UI_H_ diff --git a/shell/browser/ui/win/atom_desktop_native_widget_aura.cc b/shell/browser/ui/win/atom_desktop_native_widget_aura.cc index d1457cf96a..1417207abb 100644 --- a/shell/browser/ui/win/atom_desktop_native_widget_aura.cc +++ b/shell/browser/ui/win/atom_desktop_native_widget_aura.cc @@ -8,7 +8,7 @@ #include "ui/views/corewm/tooltip_controller.h" #include "ui/wm/public/tooltip_client.h" -namespace atom { +namespace electron { AtomDesktopNativeWidgetAura::AtomDesktopNativeWidgetAura( NativeWindowViews* native_window_view) @@ -56,4 +56,4 @@ void AtomDesktopNativeWidgetAura::OnWindowActivated( } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/atom_desktop_native_widget_aura.h b/shell/browser/ui/win/atom_desktop_native_widget_aura.h index ab4a53491a..a08a8cbc86 100644 --- a/shell/browser/ui/win/atom_desktop_native_widget_aura.h +++ b/shell/browser/ui/win/atom_desktop_native_widget_aura.h @@ -12,7 +12,7 @@ namespace views { class DesktopWindowTreeHost; } -namespace atom { +namespace electron { class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura { public: @@ -37,6 +37,6 @@ class AtomDesktopNativeWidgetAura : public views::DesktopNativeWidgetAura { DISALLOW_COPY_AND_ASSIGN(AtomDesktopNativeWidgetAura); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_ATOM_DESKTOP_NATIVE_WIDGET_AURA_H_ diff --git a/shell/browser/ui/win/atom_desktop_window_tree_host_win.cc b/shell/browser/ui/win/atom_desktop_window_tree_host_win.cc index 75b30edaae..fe698cc69e 100644 --- a/shell/browser/ui/win/atom_desktop_window_tree_host_win.cc +++ b/shell/browser/ui/win/atom_desktop_window_tree_host_win.cc @@ -4,7 +4,7 @@ #include "shell/browser/ui/win/atom_desktop_window_tree_host_win.h" -namespace atom { +namespace electron { AtomDesktopWindowTreeHostWin::AtomDesktopWindowTreeHostWin( NativeWindowViews* native_window_view, @@ -29,4 +29,4 @@ bool AtomDesktopWindowTreeHostWin::HasNativeFrame() const { return true; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/atom_desktop_window_tree_host_win.h b/shell/browser/ui/win/atom_desktop_window_tree_host_win.h index ee39a5ad64..01f60dabe7 100644 --- a/shell/browser/ui/win/atom_desktop_window_tree_host_win.h +++ b/shell/browser/ui/win/atom_desktop_window_tree_host_win.h @@ -10,7 +10,7 @@ #include "shell/browser/native_window_views.h" #include "ui/views/widget/desktop_aura/desktop_window_tree_host_win.h" -namespace atom { +namespace electron { class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin { public: @@ -32,6 +32,6 @@ class AtomDesktopWindowTreeHostWin : public views::DesktopWindowTreeHostWin { DISALLOW_COPY_AND_ASSIGN(AtomDesktopWindowTreeHostWin); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_ATOM_DESKTOP_WINDOW_TREE_HOST_WIN_H_ diff --git a/shell/browser/ui/win/jump_list.cc b/shell/browser/ui/win/jump_list.cc index c61f6d2b15..2ef4c46f2c 100644 --- a/shell/browser/ui/win/jump_list.cc +++ b/shell/browser/ui/win/jump_list.cc @@ -12,9 +12,9 @@ namespace { -using atom::JumpListCategory; -using atom::JumpListItem; -using atom::JumpListResult; +using electron::JumpListCategory; +using electron::JumpListItem; +using electron::JumpListResult; bool AppendTask(const JumpListItem& item, IObjectCollection* collection) { DCHECK(collection); @@ -148,7 +148,7 @@ void ConvertRemovedJumpListItems(IObjectArray* in, } // namespace -namespace atom { +namespace electron { JumpListItem::JumpListItem() = default; JumpListItem::JumpListItem(const JumpListItem&) = default; @@ -347,4 +347,4 @@ JumpListResult JumpList::AppendCategories( return result; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/jump_list.h b/shell/browser/ui/win/jump_list.h index c9a72d0e68..9f36c06b81 100644 --- a/shell/browser/ui/win/jump_list.h +++ b/shell/browser/ui/win/jump_list.h @@ -12,7 +12,7 @@ #include "base/files/file_path.h" #include "base/macros.h" -namespace atom { +namespace electron { enum class JumpListResult : int { SUCCESS = 0, @@ -117,6 +117,6 @@ class JumpList { DISALLOW_COPY_AND_ASSIGN(JumpList); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_JUMP_LIST_H_ diff --git a/shell/browser/ui/win/notify_icon.cc b/shell/browser/ui/win/notify_icon.cc index 2a4d161927..c78b0f3236 100644 --- a/shell/browser/ui/win/notify_icon.cc +++ b/shell/browser/ui/win/notify_icon.cc @@ -17,7 +17,7 @@ #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/widget/widget.h" -namespace atom { +namespace electron { NotifyIcon::NotifyIcon(NotifyIconHost* host, UINT id, HWND window, UINT message) : host_(host), @@ -201,4 +201,4 @@ void NotifyIcon::OnContextMenuClosed() { widget_->Close(); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/notify_icon.h b/shell/browser/ui/win/notify_icon.h index e25475b230..9a809223c9 100644 --- a/shell/browser/ui/win/notify_icon.h +++ b/shell/browser/ui/win/notify_icon.h @@ -27,7 +27,7 @@ class MenuRunner; class Widget; } // namespace views -namespace atom { +namespace electron { class NotifyIconHost; @@ -97,6 +97,6 @@ class NotifyIcon : public TrayIcon { DISALLOW_COPY_AND_ASSIGN(NotifyIcon); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_H_ diff --git a/shell/browser/ui/win/notify_icon_host.cc b/shell/browser/ui/win/notify_icon_host.cc index 34ba2a2981..0ec1b02a95 100644 --- a/shell/browser/ui/win/notify_icon_host.cc +++ b/shell/browser/ui/win/notify_icon_host.cc @@ -16,7 +16,7 @@ #include "ui/events/win/system_event_state_lookup.h" #include "ui/gfx/win/hwnd_util.h" -namespace atom { +namespace electron { namespace { @@ -180,4 +180,4 @@ UINT NotifyIconHost::NextIconId() { return kBaseIconId + icon_id; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/notify_icon_host.h b/shell/browser/ui/win/notify_icon_host.h index c74e393a02..dec37abd1d 100644 --- a/shell/browser/ui/win/notify_icon_host.h +++ b/shell/browser/ui/win/notify_icon_host.h @@ -11,7 +11,7 @@ #include "base/macros.h" -namespace atom { +namespace electron { class NotifyIcon; @@ -61,6 +61,6 @@ class NotifyIconHost { DISALLOW_COPY_AND_ASSIGN(NotifyIconHost); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_NOTIFY_ICON_HOST_H_ diff --git a/shell/browser/ui/win/taskbar_host.cc b/shell/browser/ui/win/taskbar_host.cc index 1e362f376b..6b9c26b044 100644 --- a/shell/browser/ui/win/taskbar_host.cc +++ b/shell/browser/ui/win/taskbar_host.cc @@ -15,7 +15,7 @@ #include "ui/display/win/screen_win.h" #include "ui/gfx/icon_util.h" -namespace atom { +namespace electron { namespace { @@ -223,4 +223,4 @@ bool TaskbarHost::InitializeTaskbar() { } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/win/taskbar_host.h b/shell/browser/ui/win/taskbar_host.h index f5ff11a9ce..886633ff27 100644 --- a/shell/browser/ui/win/taskbar_host.h +++ b/shell/browser/ui/win/taskbar_host.h @@ -17,7 +17,7 @@ #include "ui/gfx/geometry/rect.h" #include "ui/gfx/image/image.h" -namespace atom { +namespace electron { class TaskbarHost { public: @@ -78,6 +78,6 @@ class TaskbarHost { DISALLOW_COPY_AND_ASSIGN(TaskbarHost); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_WIN_TASKBAR_HOST_H_ diff --git a/shell/browser/ui/x/event_disabler.cc b/shell/browser/ui/x/event_disabler.cc index 2c357b158f..2374f67fbf 100644 --- a/shell/browser/ui/x/event_disabler.cc +++ b/shell/browser/ui/x/event_disabler.cc @@ -6,7 +6,7 @@ #include -namespace atom { +namespace electron { EventDisabler::EventDisabler() {} @@ -24,4 +24,4 @@ ui::EventRewriteStatus EventDisabler::NextDispatchEvent( return ui::EVENT_REWRITE_CONTINUE; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/x/event_disabler.h b/shell/browser/ui/x/event_disabler.h index 275636b758..b972074377 100644 --- a/shell/browser/ui/x/event_disabler.h +++ b/shell/browser/ui/x/event_disabler.h @@ -10,7 +10,7 @@ #include "base/macros.h" #include "ui/events/event_rewriter.h" -namespace atom { +namespace electron { class EventDisabler : public ui::EventRewriter { public: @@ -29,6 +29,6 @@ class EventDisabler : public ui::EventRewriter { DISALLOW_COPY_AND_ASSIGN(EventDisabler); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_X_EVENT_DISABLER_H_ diff --git a/shell/browser/ui/x/window_state_watcher.cc b/shell/browser/ui/x/window_state_watcher.cc index 2eef3f43fa..9199483a61 100644 --- a/shell/browser/ui/x/window_state_watcher.cc +++ b/shell/browser/ui/x/window_state_watcher.cc @@ -8,7 +8,7 @@ #include "ui/gfx/x/x11.h" #include "ui/gfx/x/x11_atom_cache.h" -namespace atom { +namespace electron { WindowStateWatcher::WindowStateWatcher(NativeWindowViews* window) : window_(window), widget_(window->GetAcceleratedWidget()) { @@ -61,4 +61,4 @@ bool WindowStateWatcher::IsWindowStateEvent(const ui::PlatformEvent& event) { event->type == PropertyNotify && event->xproperty.window == widget_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/x/window_state_watcher.h b/shell/browser/ui/x/window_state_watcher.h index d9b1e1cb30..6018e4ffa0 100644 --- a/shell/browser/ui/x/window_state_watcher.h +++ b/shell/browser/ui/x/window_state_watcher.h @@ -9,7 +9,7 @@ #include "shell/browser/native_window_views.h" -namespace atom { +namespace electron { class WindowStateWatcher : public ui::PlatformEventObserver { public: @@ -33,6 +33,6 @@ class WindowStateWatcher : public ui::PlatformEventObserver { DISALLOW_COPY_AND_ASSIGN(WindowStateWatcher); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_X_WINDOW_STATE_WATCHER_H_ diff --git a/shell/browser/ui/x/x_window_utils.cc b/shell/browser/ui/x/x_window_utils.cc index 906e8c46c3..761ce6d9f7 100644 --- a/shell/browser/ui/x/x_window_utils.cc +++ b/shell/browser/ui/x/x_window_utils.cc @@ -15,7 +15,7 @@ #include "dbus/object_proxy.h" #include "ui/base/x/x11_util.h" -namespace atom { +namespace electron { ::Atom GetAtom(const char* name) { return XInternAtom(gfx::GetXDisplay(), name, false); @@ -109,4 +109,4 @@ void MoveWindowToForeground(::Window xwindow) { XFlush(xdisplay); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/ui/x/x_window_utils.h b/shell/browser/ui/x/x_window_utils.h index ee78f189f3..9b313309a7 100644 --- a/shell/browser/ui/x/x_window_utils.h +++ b/shell/browser/ui/x/x_window_utils.h @@ -9,7 +9,7 @@ #include "ui/gfx/x/x11.h" -namespace atom { +namespace electron { ::Atom GetAtom(const char* name); @@ -26,6 +26,6 @@ bool ShouldUseGlobalMenuBar(); // Bring the given window to the front and give it the focus. void MoveWindowToForeground(::Window xwindow); -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UI_X_X_WINDOW_UTILS_H_ diff --git a/shell/browser/unresponsive_suppressor.cc b/shell/browser/unresponsive_suppressor.cc index a37f205b44..289b71d5c2 100644 --- a/shell/browser/unresponsive_suppressor.cc +++ b/shell/browser/unresponsive_suppressor.cc @@ -4,7 +4,7 @@ #include "shell/browser/unresponsive_suppressor.h" -namespace atom { +namespace electron { namespace { @@ -24,4 +24,4 @@ UnresponsiveSuppressor::~UnresponsiveSuppressor() { g_suppress_level--; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/unresponsive_suppressor.h b/shell/browser/unresponsive_suppressor.h index b0b3689c70..4d653832b1 100644 --- a/shell/browser/unresponsive_suppressor.h +++ b/shell/browser/unresponsive_suppressor.h @@ -7,7 +7,7 @@ #include "base/macros.h" -namespace atom { +namespace electron { bool IsUnresponsiveEventSuppressed(); @@ -20,6 +20,6 @@ class UnresponsiveSuppressor { DISALLOW_COPY_AND_ASSIGN(UnresponsiveSuppressor); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_UNRESPONSIVE_SUPPRESSOR_H_ diff --git a/shell/browser/web_contents_permission_helper.cc b/shell/browser/web_contents_permission_helper.cc index 26efbb5413..7ad26be8d3 100644 --- a/shell/browser/web_contents_permission_helper.cc +++ b/shell/browser/web_contents_permission_helper.cc @@ -29,7 +29,7 @@ std::string MediaStreamTypeToString(blink::MediaStreamType type) { } // namespace -namespace atom { +namespace electron { namespace { @@ -157,4 +157,4 @@ bool WebContentsPermissionHelper::CheckMediaAccessPermission( WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPermissionHelper) -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_contents_permission_helper.h b/shell/browser/web_contents_permission_helper.h index 28afb686d4..96c156f72c 100644 --- a/shell/browser/web_contents_permission_helper.h +++ b/shell/browser/web_contents_permission_helper.h @@ -10,7 +10,7 @@ #include "content/public/browser/web_contents_user_data.h" #include "third_party/blink/public/common/mediastream/media_stream_request.h" -namespace atom { +namespace electron { // Applies the permission requested for WebContents. class WebContentsPermissionHelper @@ -58,6 +58,6 @@ class WebContentsPermissionHelper DISALLOW_COPY_AND_ASSIGN(WebContentsPermissionHelper); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_CONTENTS_PERMISSION_HELPER_H_ diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index b2f0c8bf76..bfeed8f3a0 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -95,7 +95,7 @@ bool GetAsAutoplayPolicy(const base::Value* val, } // namespace -namespace atom { +namespace electron { // static std::vector WebContentsPreferences::instances_; @@ -476,4 +476,4 @@ void WebContentsPreferences::OverrideWebkitPrefs( WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsPreferences) -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index 4ee84661bb..b21cad0687 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -23,7 +23,7 @@ namespace mate { class Dictionary; } -namespace atom { +namespace electron { // Stores and applies the preferences of WebContents. class WebContentsPreferences @@ -93,6 +93,6 @@ class WebContentsPreferences DISALLOW_COPY_AND_ASSIGN(WebContentsPreferences); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_CONTENTS_PREFERENCES_H_ diff --git a/shell/browser/web_contents_zoom_controller.cc b/shell/browser/web_contents_zoom_controller.cc index beebdb5e03..437eb0736a 100644 --- a/shell/browser/web_contents_zoom_controller.cc +++ b/shell/browser/web_contents_zoom_controller.cc @@ -15,7 +15,7 @@ #include "content/public/common/page_zoom.h" #include "net/base/url_util.h" -namespace atom { +namespace electron { WebContentsZoomController::WebContentsZoomController( content::WebContents* web_contents) @@ -280,4 +280,4 @@ void WebContentsZoomController::SetZoomFactorOnNavigationIfNeeded( WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsZoomController) -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_contents_zoom_controller.h b/shell/browser/web_contents_zoom_controller.h index 48e0a9adfd..88b96f23a1 100644 --- a/shell/browser/web_contents_zoom_controller.h +++ b/shell/browser/web_contents_zoom_controller.h @@ -13,7 +13,7 @@ #include "content/public/browser/web_contents_observer.h" #include "content/public/browser/web_contents_user_data.h" -namespace atom { +namespace electron { // Manages the zoom changes of WebContents. class WebContentsZoomController @@ -117,6 +117,6 @@ class WebContentsZoomController DISALLOW_COPY_AND_ASSIGN(WebContentsZoomController); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_CONTENTS_ZOOM_CONTROLLER_H_ diff --git a/shell/browser/web_dialog_helper.cc b/shell/browser/web_dialog_helper.cc index 00912823aa..783eec2a16 100644 --- a/shell/browser/web_dialog_helper.cc +++ b/shell/browser/web_dialog_helper.cc @@ -36,7 +36,7 @@ namespace { class FileSelectHelper : public base::RefCounted, public content::WebContentsObserver, - public atom::DirectoryListerHelperDelegate { + public electron::DirectoryListerHelperDelegate { public: FileSelectHelper(content::RenderFrameHost* render_frame_host, std::unique_ptr listener, @@ -51,7 +51,7 @@ class FileSelectHelper : public base::RefCounted, void ShowOpenDialog(const file_dialog::DialogSettings& settings) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); auto callback = base::BindOnce(&FileSelectHelper::OnOpenDialogDone, this); ignore_result(promise.Then(std::move(callback))); @@ -62,7 +62,7 @@ class FileSelectHelper : public base::RefCounted, void ShowSaveDialog(const file_dialog::DialogSettings& settings) { v8::Isolate* isolate = v8::Isolate::GetCurrent(); v8::Local context = isolate->GetCurrentContext(); - atom::util::Promise promise(isolate); + electron::util::Promise promise(isolate); v8::Local handle = promise.GetHandle(); file_dialog::ShowSaveDialog(settings, std::move(promise)); @@ -87,7 +87,7 @@ class FileSelectHelper : public base::RefCounted, void EnumerateDirectory(base::FilePath base_dir) { auto* lister = new net::DirectoryLister( base_dir, net::DirectoryLister::NO_SORT_RECURSIVE, - new atom::DirectoryListerHelper(base_dir, this)); + new electron::DirectoryListerHelper(base_dir, this)); lister->Start(); // It is difficult for callers to know how long to keep a reference to // this instance. We AddRef() here to keep the instance alive after we @@ -131,7 +131,7 @@ class FileSelectHelper : public base::RefCounted, } if (render_frame_host_ && !paths.empty()) { - auto* browser_context = static_cast( + auto* browser_context = static_cast( render_frame_host_->GetProcess()->GetBrowserContext()); browser_context->prefs()->SetFilePath(prefs::kSelectFileLastDirectory, paths[0].DirName()); @@ -257,7 +257,7 @@ file_dialog::Filters GetFileTypesFromAcceptType( } // namespace -namespace atom { +namespace electron { DirectoryListerHelper::DirectoryListerHelper( base::FilePath base, @@ -320,7 +320,7 @@ void WebDialogHelper::RunFileChooser( NOTREACHED(); } - auto* browser_context = static_cast( + auto* browser_context = static_cast( render_frame_host->GetProcess()->GetBrowserContext()); settings.default_path = browser_context->prefs() ->GetFilePath(prefs::kSelectFileLastDirectory) @@ -349,4 +349,4 @@ void WebDialogHelper::EnumerateDirectory( FileChooserParams::Mode::kUploadFolder); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_dialog_helper.h b/shell/browser/web_dialog_helper.h index e69aa9e36e..fa1ed8d0e6 100644 --- a/shell/browser/web_dialog_helper.h +++ b/shell/browser/web_dialog_helper.h @@ -22,7 +22,7 @@ class RenderFrameHost; class WebContents; } // namespace content -namespace atom { +namespace electron { class DirectoryListerHelperDelegate { public: @@ -73,6 +73,6 @@ class WebDialogHelper { DISALLOW_COPY_AND_ASSIGN(WebDialogHelper); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_DIALOG_HELPER_H_ diff --git a/shell/browser/web_view_guest_delegate.cc b/shell/browser/web_view_guest_delegate.cc index 8f60f563e9..6e927d3836 100644 --- a/shell/browser/web_view_guest_delegate.cc +++ b/shell/browser/web_view_guest_delegate.cc @@ -16,7 +16,7 @@ #include "shell/browser/api/atom_api_web_contents.h" #include "shell/common/native_mate_converters/gurl_converter.h" -namespace atom { +namespace electron { WebViewGuestDelegate::WebViewGuestDelegate(content::WebContents* embedder, api::WebContents* api_web_contents) @@ -120,4 +120,4 @@ content::WebContents* WebViewGuestDelegate::CreateNewGuestWindow( return guest_contents_impl; } -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_view_guest_delegate.h b/shell/browser/web_view_guest_delegate.h index df77024c60..fd3abd9b86 100644 --- a/shell/browser/web_view_guest_delegate.h +++ b/shell/browser/web_view_guest_delegate.h @@ -8,7 +8,7 @@ #include "content/public/browser/browser_plugin_guest_delegate.h" #include "shell/browser/web_contents_zoom_controller.h" -namespace atom { +namespace electron { namespace api { class WebContents; @@ -55,6 +55,6 @@ class WebViewGuestDelegate : public content::BrowserPluginGuestDelegate, DISALLOW_COPY_AND_ASSIGN(WebViewGuestDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_VIEW_GUEST_DELEGATE_H_ diff --git a/shell/browser/web_view_manager.cc b/shell/browser/web_view_manager.cc index fb5edcfa20..ad37d84e2b 100644 --- a/shell/browser/web_view_manager.cc +++ b/shell/browser/web_view_manager.cc @@ -9,7 +9,7 @@ #include "content/public/browser/web_contents.h" #include "shell/browser/atom_browser_context.h" -namespace atom { +namespace electron { WebViewManager::WebViewManager() {} @@ -83,4 +83,4 @@ WebViewManager* WebViewManager::GetWebViewManager( } } -} // namespace atom +} // namespace electron diff --git a/shell/browser/web_view_manager.h b/shell/browser/web_view_manager.h index 904bae1b58..f4a8f8e5fc 100644 --- a/shell/browser/web_view_manager.h +++ b/shell/browser/web_view_manager.h @@ -9,7 +9,7 @@ #include "content/public/browser/browser_plugin_guest_manager.h" -namespace atom { +namespace electron { class WebViewManager : public content::BrowserPluginGuestManager { public: @@ -65,6 +65,6 @@ class WebViewManager : public content::BrowserPluginGuestManager { DISALLOW_COPY_AND_ASSIGN(WebViewManager); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WEB_VIEW_MANAGER_H_ diff --git a/shell/browser/win/scoped_hstring.cc b/shell/browser/win/scoped_hstring.cc index 024c5626a9..e174e0cd7e 100644 --- a/shell/browser/win/scoped_hstring.cc +++ b/shell/browser/win/scoped_hstring.cc @@ -6,7 +6,7 @@ #include -namespace atom { +namespace electron { ScopedHString::ScopedHString(const wchar_t* source) : str_(nullptr) { Reset(source); @@ -39,4 +39,4 @@ void ScopedHString::Reset(const std::wstring& source) { WindowsCreateString(source.c_str(), source.length(), &str_); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/win/scoped_hstring.h b/shell/browser/win/scoped_hstring.h index 169c7e50b9..6474154037 100644 --- a/shell/browser/win/scoped_hstring.h +++ b/shell/browser/win/scoped_hstring.h @@ -12,7 +12,7 @@ #include "base/macros.h" -namespace atom { +namespace electron { class ScopedHString { public: @@ -40,6 +40,6 @@ class ScopedHString { DISALLOW_COPY_AND_ASSIGN(ScopedHString); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WIN_SCOPED_HSTRING_H_ diff --git a/shell/browser/window_list.cc b/shell/browser/window_list.cc index d3490a69c0..494114edd9 100644 --- a/shell/browser/window_list.cc +++ b/shell/browser/window_list.cc @@ -10,7 +10,7 @@ #include "shell/browser/native_window.h" #include "shell/browser/window_list_observer.h" -namespace atom { +namespace electron { // static base::LazyInstance>::Leaky @@ -100,4 +100,4 @@ WindowList::WindowList() {} WindowList::~WindowList() {} -} // namespace atom +} // namespace electron diff --git a/shell/browser/window_list.h b/shell/browser/window_list.h index f7f8ca91e1..79c1521e73 100644 --- a/shell/browser/window_list.h +++ b/shell/browser/window_list.h @@ -11,7 +11,7 @@ #include "base/macros.h" #include "base/observer_list.h" -namespace atom { +namespace electron { class NativeWindow; class WindowListObserver; @@ -59,6 +59,6 @@ class WindowList { DISALLOW_COPY_AND_ASSIGN(WindowList); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WINDOW_LIST_H_ diff --git a/shell/browser/window_list_observer.h b/shell/browser/window_list_observer.h index 8c4c8ec8d3..7d0cfd9f9e 100644 --- a/shell/browser/window_list_observer.h +++ b/shell/browser/window_list_observer.h @@ -7,7 +7,7 @@ #include "base/observer_list_types.h" -namespace atom { +namespace electron { class NativeWindow; @@ -29,6 +29,6 @@ class WindowListObserver : public base::CheckedObserver { ~WindowListObserver() override {} }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_WINDOW_LIST_OBSERVER_H_ diff --git a/shell/browser/zoom_level_delegate.cc b/shell/browser/zoom_level_delegate.cc index 7cdffac2c1..da59463fd7 100644 --- a/shell/browser/zoom_level_delegate.cc +++ b/shell/browser/zoom_level_delegate.cc @@ -19,7 +19,7 @@ #include "content/public/browser/browser_thread.h" #include "content/public/common/page_zoom.h" -namespace atom { +namespace electron { namespace { @@ -165,4 +165,4 @@ void ZoomLevelDelegate::InitHostZoomMap(content::HostZoomMap* host_zoom_map) { &ZoomLevelDelegate::OnZoomLevelChanged, base::Unretained(this))); } -} // namespace atom +} // namespace electron diff --git a/shell/browser/zoom_level_delegate.h b/shell/browser/zoom_level_delegate.h index c3bb7147c9..621b22cad9 100644 --- a/shell/browser/zoom_level_delegate.h +++ b/shell/browser/zoom_level_delegate.h @@ -20,7 +20,7 @@ class DictionaryValue; class PrefRegistrySimple; -namespace atom { +namespace electron { // A class to manage per-partition default and per-host zoom levels. // It implements an interface between the content/ zoom @@ -59,6 +59,6 @@ class ZoomLevelDelegate : public content::ZoomLevelDelegate { DISALLOW_COPY_AND_ASSIGN(ZoomLevelDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_BROWSER_ZOOM_LEVEL_DELEGATE_H_ diff --git a/shell/common/api/api.mojom b/shell/common/api/api.mojom index b37f8e75da..126ac0fe6e 100644 --- a/shell/common/api/api.mojom +++ b/shell/common/api/api.mojom @@ -1,4 +1,4 @@ -module atom.mojom; +module electron.mojom; import "mojo/public/mojom/base/values.mojom"; import "mojo/public/mojom/base/string16.mojom"; diff --git a/shell/common/api/atom_api_clipboard.cc b/shell/common/api/atom_api_clipboard.cc index 2d746ff000..6a49793852 100644 --- a/shell/common/api/atom_api_clipboard.cc +++ b/shell/common/api/atom_api_clipboard.cc @@ -14,7 +14,7 @@ #include "ui/base/clipboard/clipboard_format_type.h" #include "ui/base/clipboard/scoped_clipboard_writer.h" -namespace atom { +namespace electron { namespace api { @@ -194,7 +194,7 @@ void Clipboard::Clear(mate::Arguments* args) { } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -203,25 +203,26 @@ void Initialize(v8::Local exports, v8::Local context, void* priv) { mate::Dictionary dict(context->GetIsolate(), exports); - dict.SetMethod("availableFormats", &atom::api::Clipboard::AvailableFormats); - dict.SetMethod("has", &atom::api::Clipboard::Has); - dict.SetMethod("read", &atom::api::Clipboard::Read); - dict.SetMethod("write", &atom::api::Clipboard::Write); - dict.SetMethod("readText", &atom::api::Clipboard::ReadText); - dict.SetMethod("writeText", &atom::api::Clipboard::WriteText); - dict.SetMethod("readRTF", &atom::api::Clipboard::ReadRTF); - dict.SetMethod("writeRTF", &atom::api::Clipboard::WriteRTF); - dict.SetMethod("readHTML", &atom::api::Clipboard::ReadHTML); - dict.SetMethod("writeHTML", &atom::api::Clipboard::WriteHTML); - dict.SetMethod("readBookmark", &atom::api::Clipboard::ReadBookmark); - dict.SetMethod("writeBookmark", &atom::api::Clipboard::WriteBookmark); - dict.SetMethod("readImage", &atom::api::Clipboard::ReadImage); - dict.SetMethod("writeImage", &atom::api::Clipboard::WriteImage); - dict.SetMethod("readFindText", &atom::api::Clipboard::ReadFindText); - dict.SetMethod("writeFindText", &atom::api::Clipboard::WriteFindText); - dict.SetMethod("readBuffer", &atom::api::Clipboard::ReadBuffer); - dict.SetMethod("writeBuffer", &atom::api::Clipboard::WriteBuffer); - dict.SetMethod("clear", &atom::api::Clipboard::Clear); + dict.SetMethod("availableFormats", + &electron::api::Clipboard::AvailableFormats); + dict.SetMethod("has", &electron::api::Clipboard::Has); + dict.SetMethod("read", &electron::api::Clipboard::Read); + dict.SetMethod("write", &electron::api::Clipboard::Write); + dict.SetMethod("readText", &electron::api::Clipboard::ReadText); + dict.SetMethod("writeText", &electron::api::Clipboard::WriteText); + dict.SetMethod("readRTF", &electron::api::Clipboard::ReadRTF); + dict.SetMethod("writeRTF", &electron::api::Clipboard::WriteRTF); + dict.SetMethod("readHTML", &electron::api::Clipboard::ReadHTML); + dict.SetMethod("writeHTML", &electron::api::Clipboard::WriteHTML); + dict.SetMethod("readBookmark", &electron::api::Clipboard::ReadBookmark); + dict.SetMethod("writeBookmark", &electron::api::Clipboard::WriteBookmark); + dict.SetMethod("readImage", &electron::api::Clipboard::ReadImage); + dict.SetMethod("writeImage", &electron::api::Clipboard::WriteImage); + dict.SetMethod("readFindText", &electron::api::Clipboard::ReadFindText); + dict.SetMethod("writeFindText", &electron::api::Clipboard::WriteFindText); + dict.SetMethod("readBuffer", &electron::api::Clipboard::ReadBuffer); + dict.SetMethod("writeBuffer", &electron::api::Clipboard::WriteBuffer); + dict.SetMethod("clear", &electron::api::Clipboard::Clear); } } // namespace diff --git a/shell/common/api/atom_api_clipboard.h b/shell/common/api/atom_api_clipboard.h index 56c5316dba..f5d4f2fd80 100644 --- a/shell/common/api/atom_api_clipboard.h +++ b/shell/common/api/atom_api_clipboard.h @@ -13,7 +13,7 @@ #include "ui/base/clipboard/clipboard.h" #include "ui/gfx/image/image.h" -namespace atom { +namespace electron { namespace api { @@ -59,6 +59,6 @@ class Clipboard { } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_ATOM_API_CLIPBOARD_H_ diff --git a/shell/common/api/atom_api_clipboard_mac.mm b/shell/common/api/atom_api_clipboard_mac.mm index f683d7dcc6..9e1e957cb9 100644 --- a/shell/common/api/atom_api_clipboard_mac.mm +++ b/shell/common/api/atom_api_clipboard_mac.mm @@ -6,7 +6,7 @@ #include "shell/common/api/atom_api_clipboard.h" #include "ui/base/cocoa/find_pasteboard.h" -namespace atom { +namespace electron { namespace api { @@ -21,4 +21,4 @@ base::string16 Clipboard::ReadFindText() { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/common/api/atom_api_key_weak_map.h b/shell/common/api/atom_api_key_weak_map.h index 88815c4d10..ec7c157a98 100644 --- a/shell/common/api/atom_api_key_weak_map.h +++ b/shell/common/api/atom_api_key_weak_map.h @@ -10,7 +10,7 @@ #include "native_mate/wrappable.h" #include "shell/common/key_weak_map.h" -namespace atom { +namespace electron { namespace api { @@ -51,13 +51,13 @@ class KeyWeakMap : public mate::Wrappable> { void Remove(const K& key) { key_weak_map_.Remove(key); } - atom::KeyWeakMap key_weak_map_; + electron::KeyWeakMap key_weak_map_; DISALLOW_COPY_AND_ASSIGN(KeyWeakMap); }; } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_ATOM_API_KEY_WEAK_MAP_H_ diff --git a/shell/common/api/atom_api_native_image.cc b/shell/common/api/atom_api_native_image.cc index 2ad381dcb4..84e7fabebf 100644 --- a/shell/common/api/atom_api_native_image.cc +++ b/shell/common/api/atom_api_native_image.cc @@ -39,7 +39,7 @@ #include "ui/gfx/icon_util.h" #endif -namespace atom { +namespace electron { namespace api { @@ -650,24 +650,24 @@ void NativeImage::BuildPrototype(v8::Isolate* isolate, } // namespace api -} // namespace atom +} // namespace electron namespace mate { -v8::Local Converter>::ToV8( +v8::Local Converter>::ToV8( v8::Isolate* isolate, - const mate::Handle& val) { + const mate::Handle& val) { return val.ToV8(); } -bool Converter>::FromV8( +bool Converter>::FromV8( v8::Isolate* isolate, v8::Local val, - mate::Handle* out) { + mate::Handle* out) { // Try converting from file path. base::FilePath path; if (ConvertFromV8(isolate, val, &path)) { - *out = atom::api::NativeImage::CreateFromPath(isolate, path); + *out = electron::api::NativeImage::CreateFromPath(isolate, path); // Should throw when failed to initialize from path. return !(*out)->image().IsEmpty(); } @@ -677,7 +677,8 @@ bool Converter>::FromV8( if (!wrapper) return false; - *out = CreateHandle(isolate, static_cast(wrapper)); + *out = + CreateHandle(isolate, static_cast(wrapper)); return true; } @@ -685,7 +686,7 @@ bool Converter>::FromV8( namespace { -using atom::api::NativeImage; +using electron::api::NativeImage; void Initialize(v8::Local exports, v8::Local unused, diff --git a/shell/common/api/atom_api_native_image.h b/shell/common/api/atom_api_native_image.h index 42b2a472f3..5915c74e10 100644 --- a/shell/common/api/atom_api_native_image.h +++ b/shell/common/api/atom_api_native_image.h @@ -34,7 +34,7 @@ namespace mate { class Arguments; } -namespace atom { +namespace electron { namespace api { @@ -113,19 +113,19 @@ class NativeImage : public mate::Wrappable { } // namespace api -} // namespace atom +} // namespace electron namespace mate { // A custom converter that allows converting path to NativeImage. template <> -struct Converter> { +struct Converter> { static v8::Local ToV8( v8::Isolate* isolate, - const mate::Handle& val); + const mate::Handle& val); static bool FromV8(v8::Isolate* isolate, v8::Local val, - mate::Handle* out); + mate::Handle* out); }; } // namespace mate diff --git a/shell/common/api/atom_api_native_image_mac.mm b/shell/common/api/atom_api_native_image_mac.mm index 3b54176509..b0ac6cc580 100644 --- a/shell/common/api/atom_api_native_image_mac.mm +++ b/shell/common/api/atom_api_native_image_mac.mm @@ -15,7 +15,7 @@ #include "ui/gfx/image/image_skia.h" #include "ui/gfx/image/image_skia_operations.h" -namespace atom { +namespace electron { namespace api { @@ -73,4 +73,4 @@ bool NativeImage::IsTemplateImage() { } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/common/api/atom_api_shell.cc b/shell/common/api/atom_api_shell.cc index b4fe0ed352..6a226a888d 100644 --- a/shell/common/api/atom_api_shell.cc +++ b/shell/common/api/atom_api_shell.cc @@ -44,7 +44,7 @@ struct Converter { namespace { -void OnOpenExternalFinished(atom::util::Promise promise, +void OnOpenExternalFinished(electron::util::Promise promise, const std::string& error) { if (error.empty()) promise.Resolve(); @@ -53,7 +53,7 @@ void OnOpenExternalFinished(atom::util::Promise promise, } v8::Local OpenExternal(const GURL& url, mate::Arguments* args) { - atom::util::Promise promise(args->isolate()); + electron::util::Promise promise(args->isolate()); v8::Local handle = promise.GetHandle(); platform_util::OpenExternalOptions options; diff --git a/shell/common/api/atom_api_v8_util.cc b/shell/common/api/atom_api_v8_util.cc index 4ef1be8eee..6cfd18287f 100644 --- a/shell/common/api/atom_api_v8_util.cc +++ b/shell/common/api/atom_api_v8_util.cc @@ -117,13 +117,15 @@ void Initialize(v8::Local exports, dict.SetMethod("deleteHiddenValue", &DeleteHiddenValue); dict.SetMethod("getObjectHash", &GetObjectHash); dict.SetMethod("takeHeapSnapshot", &TakeHeapSnapshot); - dict.SetMethod("setRemoteCallbackFreer", &atom::RemoteCallbackFreer::BindTo); - dict.SetMethod("setRemoteObjectFreer", &atom::RemoteObjectFreer::BindTo); - dict.SetMethod("addRemoteObjectRef", &atom::RemoteObjectFreer::AddRef); - dict.SetMethod("createIDWeakMap", &atom::api::KeyWeakMap::Create); + dict.SetMethod("setRemoteCallbackFreer", + &electron::RemoteCallbackFreer::BindTo); + dict.SetMethod("setRemoteObjectFreer", &electron::RemoteObjectFreer::BindTo); + dict.SetMethod("addRemoteObjectRef", &electron::RemoteObjectFreer::AddRef); + dict.SetMethod("createIDWeakMap", + &electron::api::KeyWeakMap::Create); dict.SetMethod( "createDoubleIDWeakMap", - &atom::api::KeyWeakMap>::Create); + &electron::api::KeyWeakMap>::Create); dict.SetMethod("requestGarbageCollectionForTesting", &RequestGarbageCollectionForTesting); dict.SetMethod("isSameOrigin", &IsSameOrigin); diff --git a/shell/common/api/electron_bindings.cc b/shell/common/api/electron_bindings.cc index 1a06321963..1f2ae47c36 100644 --- a/shell/common/api/electron_bindings.cc +++ b/shell/common/api/electron_bindings.cc @@ -31,7 +31,7 @@ #include "shell/common/promise_util.h" #include "third_party/blink/renderer/platform/heap/process_heap.h" // nogncheck -namespace atom { +namespace electron { namespace { @@ -358,7 +358,7 @@ bool ElectronBindings::TakeHeapSnapshot(v8::Isolate* isolate, base::File file(file_path, base::File::FLAG_CREATE_ALWAYS | base::File::FLAG_WRITE); - return atom::TakeHeapSnapshot(isolate, &file); + return electron::TakeHeapSnapshot(isolate, &file); } -} // namespace atom +} // namespace electron diff --git a/shell/common/api/electron_bindings.h b/shell/common/api/electron_bindings.h index 37b9683b6d..f6af18b109 100644 --- a/shell/common/api/electron_bindings.h +++ b/shell/common/api/electron_bindings.h @@ -30,7 +30,7 @@ namespace node { class Environment; } -namespace atom { +namespace electron { class ElectronBindings { public: @@ -82,6 +82,6 @@ class ElectronBindings { DISALLOW_COPY_AND_ASSIGN(ElectronBindings); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_ELECTRON_BINDINGS_H_ diff --git a/shell/common/api/object_life_monitor.cc b/shell/common/api/object_life_monitor.cc index 5f6d77e221..a1e93e14c8 100644 --- a/shell/common/api/object_life_monitor.cc +++ b/shell/common/api/object_life_monitor.cc @@ -8,7 +8,7 @@ #include "base/bind.h" #include "base/message_loop/message_loop.h" -namespace atom { +namespace electron { ObjectLifeMonitor::ObjectLifeMonitor(v8::Isolate* isolate, v8::Local target) @@ -38,4 +38,4 @@ void ObjectLifeMonitor::Free( delete data.GetParameter(); } -} // namespace atom +} // namespace electron diff --git a/shell/common/api/object_life_monitor.h b/shell/common/api/object_life_monitor.h index 5e0225c8aa..0b11d1cb9d 100644 --- a/shell/common/api/object_life_monitor.h +++ b/shell/common/api/object_life_monitor.h @@ -9,7 +9,7 @@ #include "base/memory/weak_ptr.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { class ObjectLifeMonitor { protected: @@ -29,6 +29,6 @@ class ObjectLifeMonitor { DISALLOW_COPY_AND_ASSIGN(ObjectLifeMonitor); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_OBJECT_LIFE_MONITOR_H_ diff --git a/shell/common/api/remote_callback_freer.cc b/shell/common/api/remote_callback_freer.cc index b47169314c..e1057c04e9 100644 --- a/shell/common/api/remote_callback_freer.cc +++ b/shell/common/api/remote_callback_freer.cc @@ -11,7 +11,7 @@ #include "electron/shell/common/api/api.mojom.h" #include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" -namespace atom { +namespace electron { // static void RemoteCallbackFreer::BindTo(v8::Isolate* isolate, @@ -56,4 +56,4 @@ void RemoteCallbackFreer::RenderViewDeleted(content::RenderViewHost*) { delete this; } -} // namespace atom +} // namespace electron diff --git a/shell/common/api/remote_callback_freer.h b/shell/common/api/remote_callback_freer.h index 4a05e41a45..aa4278c24e 100644 --- a/shell/common/api/remote_callback_freer.h +++ b/shell/common/api/remote_callback_freer.h @@ -10,7 +10,7 @@ #include "content/public/browser/web_contents_observer.h" #include "shell/common/api/object_life_monitor.h" -namespace atom { +namespace electron { class RemoteCallbackFreer : public ObjectLifeMonitor, public content::WebContentsObserver { @@ -41,6 +41,6 @@ class RemoteCallbackFreer : public ObjectLifeMonitor, DISALLOW_COPY_AND_ASSIGN(RemoteCallbackFreer); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_REMOTE_CALLBACK_FREER_H_ diff --git a/shell/common/api/remote_object_freer.cc b/shell/common/api/remote_object_freer.cc index a74e9249c9..cf17de62e0 100644 --- a/shell/common/api/remote_object_freer.cc +++ b/shell/common/api/remote_object_freer.cc @@ -13,7 +13,7 @@ using blink::WebLocalFrame; -namespace atom { +namespace electron { namespace { @@ -82,4 +82,4 @@ void RemoteObjectFreer::RunDestructor() { electron_ptr->Message(true, channel, args.Clone()); } -} // namespace atom +} // namespace electron diff --git a/shell/common/api/remote_object_freer.h b/shell/common/api/remote_object_freer.h index 6f2e409315..6eaab698d7 100644 --- a/shell/common/api/remote_object_freer.h +++ b/shell/common/api/remote_object_freer.h @@ -10,7 +10,7 @@ #include "shell/common/api/object_life_monitor.h" -namespace atom { +namespace electron { class RemoteObjectFreer : public ObjectLifeMonitor { public: @@ -40,6 +40,6 @@ class RemoteObjectFreer : public ObjectLifeMonitor { DISALLOW_COPY_AND_ASSIGN(RemoteObjectFreer); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_API_REMOTE_OBJECT_FREER_H_ diff --git a/shell/common/application_info.cc b/shell/common/application_info.cc index 71b724355f..8fc44ff634 100644 --- a/shell/common/application_info.cc +++ b/shell/common/application_info.cc @@ -11,7 +11,7 @@ #include "electron/electron_version.h" #include "shell/browser/browser.h" -namespace atom { +namespace electron { namespace { @@ -53,4 +53,4 @@ std::string GetApplicationUserAgent() { return content::BuildUserAgentFromProduct(user_agent); } -} // namespace atom +} // namespace electron diff --git a/shell/common/application_info.h b/shell/common/application_info.h index 3959913895..cee9156702 100644 --- a/shell/common/application_info.h +++ b/shell/common/application_info.h @@ -12,7 +12,7 @@ #include -namespace atom { +namespace electron { void OverrideApplicationName(const std::string& name); std::string GetOverriddenApplicationName(); @@ -32,6 +32,6 @@ void SetAppUserModelID(const base::string16& name); bool IsRunningInDesktopBridge(); #endif -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_APPLICATION_INFO_H_ diff --git a/shell/common/application_info_linux.cc b/shell/common/application_info_linux.cc index d0a5bfde54..dfcccfcf63 100644 --- a/shell/common/application_info_linux.cc +++ b/shell/common/application_info_linux.cc @@ -30,7 +30,7 @@ GDesktopAppInfo* get_desktop_app_info() { } // namespace -namespace atom { +namespace electron { std::string GetApplicationName() { // attempt #1: the string set in app.setName() @@ -76,4 +76,4 @@ std::string GetApplicationVersion() { return ret; } -} // namespace atom +} // namespace electron diff --git a/shell/common/application_info_mac.mm b/shell/common/application_info_mac.mm index be08595dcf..bbf5e47178 100644 --- a/shell/common/application_info_mac.mm +++ b/shell/common/application_info_mac.mm @@ -10,7 +10,7 @@ #import "base/strings/sys_string_conversions.h" #import "shell/common/mac/main_application_bundle.h" -namespace atom { +namespace electron { namespace { @@ -33,4 +33,4 @@ std::string GetApplicationVersion() { return ApplicationInfoDictionaryValue(@"CFBundleShortVersionString"); } -} // namespace atom +} // namespace electron diff --git a/shell/common/application_info_win.cc b/shell/common/application_info_win.cc index bb902b031f..ad74ba0a7a 100644 --- a/shell/common/application_info_win.cc +++ b/shell/common/application_info_win.cc @@ -18,7 +18,7 @@ #include "base/strings/utf_string_conversions.h" #include "shell/browser/win/scoped_hstring.h" -namespace atom { +namespace electron { namespace { @@ -110,4 +110,4 @@ bool IsRunningInDesktopBridge() { return result; } -} // namespace atom +} // namespace electron diff --git a/shell/common/atom_command_line.cc b/shell/common/atom_command_line.cc index a46291d1f0..e29e211478 100644 --- a/shell/common/atom_command_line.cc +++ b/shell/common/atom_command_line.cc @@ -7,7 +7,7 @@ #include "base/command_line.h" #include "uv.h" // NOLINT(build/include) -namespace atom { +namespace electron { // static base::CommandLine::StringVector AtomCommandLine::argv_; @@ -33,4 +33,4 @@ void AtomCommandLine::InitializeFromCommandLine() { } #endif -} // namespace atom +} // namespace electron diff --git a/shell/common/atom_command_line.h b/shell/common/atom_command_line.h index d0a0c5abd1..c84f887735 100644 --- a/shell/common/atom_command_line.h +++ b/shell/common/atom_command_line.h @@ -12,7 +12,7 @@ #include "base/macros.h" #include "build/build_config.h" -namespace atom { +namespace electron { // Singleton to remember the original "argc" and "argv". class AtomCommandLine { @@ -33,6 +33,6 @@ class AtomCommandLine { DISALLOW_IMPLICIT_CONSTRUCTORS(AtomCommandLine); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_ATOM_COMMAND_LINE_H_ diff --git a/shell/common/atom_constants.cc b/shell/common/atom_constants.cc index 6f7374a99f..01426ae054 100644 --- a/shell/common/atom_constants.cc +++ b/shell/common/atom_constants.cc @@ -4,7 +4,7 @@ #include "shell/common/atom_constants.h" -namespace atom { +namespace electron { const char kBrowserForward[] = "browser-forward"; const char kBrowserBackward[] = "browser-backward"; @@ -44,4 +44,4 @@ const char kPdfViewerUIOrigin[] = "chrome://pdf-viewer/"; const char kPdfViewerUIHost[] = "pdf-viewer"; #endif // BUILDFLAG(ENABLE_PDF_VIEWER) -} // namespace atom +} // namespace electron diff --git a/shell/common/atom_constants.h b/shell/common/atom_constants.h index a9cd85e650..79a7416885 100644 --- a/shell/common/atom_constants.h +++ b/shell/common/atom_constants.h @@ -8,7 +8,7 @@ #include "build/build_config.h" #include "electron/buildflags/buildflags.h" -namespace atom { +namespace electron { // The app-command in NativeWindow. extern const char kBrowserForward[]; @@ -47,6 +47,6 @@ extern const char kPdfViewerUIOrigin[]; extern const char kPdfViewerUIHost[]; #endif // BUILDFLAG(ENABLE_PDF_VIEWER) -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_ATOM_CONSTANTS_H_ diff --git a/shell/common/color_util.cc b/shell/common/color_util.cc index 2c65a331fc..69b5e35938 100644 --- a/shell/common/color_util.cc +++ b/shell/common/color_util.cc @@ -10,7 +10,7 @@ #include "base/strings/string_util.h" #include "base/strings/stringprintf.h" -namespace atom { +namespace electron { SkColor ParseHexColor(const std::string& color_string) { // Check the string for incorrect formatting. @@ -51,4 +51,4 @@ std::string ToRGBHex(SkColor color) { SkColorGetG(color), SkColorGetB(color)); } -} // namespace atom +} // namespace electron diff --git a/shell/common/color_util.h b/shell/common/color_util.h index e198b1cace..625089fe1e 100644 --- a/shell/common/color_util.h +++ b/shell/common/color_util.h @@ -9,7 +9,7 @@ #include "third_party/skia/include/core/SkColor.h" -namespace atom { +namespace electron { // Parse hex color like "#FFF" or "#EFEFEF" SkColor ParseHexColor(const std::string& name); @@ -17,6 +17,6 @@ SkColor ParseHexColor(const std::string& name); // Convert color to RGB hex value like "#ABCDEF" std::string ToRGBHex(SkColor color); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_COLOR_UTIL_H_ diff --git a/shell/common/crash_reporter/crash_reporter.cc b/shell/common/crash_reporter/crash_reporter.cc index 8442682595..fab444af1f 100644 --- a/shell/common/crash_reporter/crash_reporter.cc +++ b/shell/common/crash_reporter/crash_reporter.cc @@ -26,7 +26,7 @@ const char kCrashesDirectoryKey[] = "crashes-directory"; CrashReporter::CrashReporter() { #if BUILDFLAG(ENABLE_RUN_AS_NODE) - bool run_as_node = base::Environment::Create()->HasVar(atom::kRunAsNode); + bool run_as_node = base::Environment::Create()->HasVar(electron::kRunAsNode); #else bool run_as_node = false; #endif diff --git a/shell/common/crash_reporter/crash_reporter_win.cc b/shell/common/crash_reporter/crash_reporter_win.cc index 18e428b90e..045926683a 100644 --- a/shell/common/crash_reporter/crash_reporter_win.cc +++ b/shell/common/crash_reporter/crash_reporter_win.cc @@ -76,7 +76,7 @@ void CrashReporterWin::Init(const std::string& product_name, } else { std::unique_ptr env(base::Environment::Create()); std::string pipe_name_utf8; - if (env->GetVar(atom::kCrashpadPipeName, &pipe_name_utf8)) { + if (env->GetVar(electron::kCrashpadPipeName, &pipe_name_utf8)) { base::string16 pipe_name = base::UTF8ToUTF16(pipe_name_utf8); if (!crashpad_client_.SetHandlerIPCPipe(pipe_name)) LOG(ERROR) << "Failed to set handler IPC pipe name: " << pipe_name; @@ -112,16 +112,16 @@ void CrashReporterWin::UpdatePipeName() { std::string pipe_name = base::UTF16ToUTF8(crashpad_client_.GetHandlerIPCPipe()); std::unique_ptr env(base::Environment::Create()); - env->SetVar(atom::kCrashpadPipeName, pipe_name); + env->SetVar(electron::kCrashpadPipeName, pipe_name); // Notify all WebContents of the pipe name. - const auto& pages = atom::InspectableWebContentsImpl::GetAll(); + const auto& pages = electron::InspectableWebContentsImpl::GetAll(); for (auto* page : pages) { auto* frame_host = page->GetWebContents()->GetMainFrame(); if (!frame_host) continue; - atom::mojom::ElectronRendererAssociatedPtr electron_ptr; + electron::mojom::ElectronRendererAssociatedPtr electron_ptr; frame_host->GetRemoteAssociatedInterfaces()->GetInterface( mojo::MakeRequest(&electron_ptr)); electron_ptr->UpdateCrashpadPipeName(pipe_name); diff --git a/shell/common/deprecate_util.cc b/shell/common/deprecate_util.cc index ecb3892694..70307fbf8d 100644 --- a/shell/common/deprecate_util.cc +++ b/shell/common/deprecate_util.cc @@ -9,7 +9,7 @@ #include "native_mate/dictionary.h" #include "shell/common/native_mate_converters/callback.h" -namespace atom { +namespace electron { void EmitDeprecationWarning(node::Environment* env, const std::string& warning_msg, @@ -24,4 +24,4 @@ void EmitDeprecationWarning(node::Environment* env, emit_warning.Run(warning_msg, warning_type, ""); } -} // namespace atom +} // namespace electron diff --git a/shell/common/deprecate_util.h b/shell/common/deprecate_util.h index 184d2849e1..27a933495a 100644 --- a/shell/common/deprecate_util.h +++ b/shell/common/deprecate_util.h @@ -9,12 +9,12 @@ #include "shell/common/node_includes.h" -namespace atom { +namespace electron { void EmitDeprecationWarning(node::Environment* env, const std::string& warning_msg, const std::string& warning_type); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_DEPRECATE_UTIL_H_ diff --git a/shell/common/heap_snapshot.cc b/shell/common/heap_snapshot.cc index 6e6538b9df..a0148eea9b 100644 --- a/shell/common/heap_snapshot.cc +++ b/shell/common/heap_snapshot.cc @@ -32,7 +32,7 @@ class HeapSnapshotOutputStream : public v8::OutputStream { } // namespace -namespace atom { +namespace electron { bool TakeHeapSnapshot(v8::Isolate* isolate, base::File* file) { DCHECK(isolate); @@ -53,4 +53,4 @@ bool TakeHeapSnapshot(v8::Isolate* isolate, base::File* file) { return stream.IsComplete(); } -} // namespace atom +} // namespace electron diff --git a/shell/common/heap_snapshot.h b/shell/common/heap_snapshot.h index a54466d61d..81712ae3a4 100644 --- a/shell/common/heap_snapshot.h +++ b/shell/common/heap_snapshot.h @@ -8,10 +8,10 @@ #include "base/files/file.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { bool TakeHeapSnapshot(v8::Isolate* isolate, base::File* file); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_HEAP_SNAPSHOT_H_ diff --git a/shell/common/key_weak_map.h b/shell/common/key_weak_map.h index c384a000dd..d6aa394fb9 100644 --- a/shell/common/key_weak_map.h +++ b/shell/common/key_weak_map.h @@ -12,7 +12,7 @@ #include "base/macros.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { // Like ES6's WeakMap, but the key is Integer and the value is Weak Pointer. template @@ -82,6 +82,6 @@ class KeyWeakMap { DISALLOW_COPY_AND_ASSIGN(KeyWeakMap); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_KEY_WEAK_MAP_H_ diff --git a/shell/common/keyboard_util.cc b/shell/common/keyboard_util.cc index c82435b528..b520be3e4a 100644 --- a/shell/common/keyboard_util.cc +++ b/shell/common/keyboard_util.cc @@ -10,7 +10,7 @@ #include "third_party/blink/public/platform/web_input_event.h" #include "ui/events/event_constants.h" -namespace atom { +namespace electron { namespace { @@ -355,4 +355,4 @@ int WebEventModifiersToEventFlags(int modifiers) { return flags; } -} // namespace atom +} // namespace electron diff --git a/shell/common/keyboard_util.h b/shell/common/keyboard_util.h index 42948faf5d..b918d21e86 100644 --- a/shell/common/keyboard_util.h +++ b/shell/common/keyboard_util.h @@ -10,7 +10,7 @@ #include "base/strings/string16.h" #include "ui/events/keycodes/keyboard_codes.h" -namespace atom { +namespace electron { // Return key code of the char, and also determine whether the SHIFT key is // pressed. @@ -23,6 +23,6 @@ ui::KeyboardCode KeyboardCodeFromStr(const std::string& str, bool* shifted); // Ported from ui/events/blink/blink_event_util.h int WebEventModifiersToEventFlags(int modifiers); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_KEYBOARD_UTIL_H_ diff --git a/shell/common/mac/main_application_bundle.h b/shell/common/mac/main_application_bundle.h index 40afb7c1cb..a54f712d19 100644 --- a/shell/common/mac/main_application_bundle.h +++ b/shell/common/mac/main_application_bundle.h @@ -12,7 +12,7 @@ namespace base { class FilePath; } -namespace atom { +namespace electron { // The "main" application bundle is the outermost bundle for this logical // application. E.g., if you have MyApp.app and @@ -21,6 +21,6 @@ namespace atom { NSBundle* MainApplicationBundle(); base::FilePath MainApplicationBundlePath(); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_MAC_MAIN_APPLICATION_BUNDLE_H_ diff --git a/shell/common/mac/main_application_bundle.mm b/shell/common/mac/main_application_bundle.mm index 19e701402f..b015b01e10 100644 --- a/shell/common/mac/main_application_bundle.mm +++ b/shell/common/mac/main_application_bundle.mm @@ -11,7 +11,7 @@ #include "base/path_service.h" #include "base/strings/string_util.h" -namespace atom { +namespace electron { namespace { @@ -53,4 +53,4 @@ NSBundle* MainApplicationBundle() { MainApplicationBundlePath())]; } -} // namespace atom +} // namespace electron diff --git a/shell/common/mouse_util.cc b/shell/common/mouse_util.cc index 7e4d0214fb..73c6224a6f 100644 --- a/shell/common/mouse_util.cc +++ b/shell/common/mouse_util.cc @@ -7,7 +7,7 @@ using Cursor = blink::WebCursorInfo::Type; -namespace atom { +namespace electron { std::string CursorTypeToString(const content::CursorInfo& info) { switch (info.type) { @@ -104,4 +104,4 @@ std::string CursorTypeToString(const content::CursorInfo& info) { } } -} // namespace atom +} // namespace electron diff --git a/shell/common/mouse_util.h b/shell/common/mouse_util.h index fe9acd379a..7cc25fbc68 100644 --- a/shell/common/mouse_util.h +++ b/shell/common/mouse_util.h @@ -24,11 +24,11 @@ code; \ } break; -namespace atom { +namespace electron { // Returns the cursor's type as a string. std::string CursorTypeToString(const content::CursorInfo& info); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_MOUSE_UTIL_H_ diff --git a/shell/common/native_mate_converters/blink_converter.cc b/shell/common/native_mate_converters/blink_converter.cc index 9724219b81..bd1feb2660 100644 --- a/shell/common/native_mate_converters/blink_converter.cc +++ b/shell/common/native_mate_converters/blink_converter.cc @@ -180,7 +180,7 @@ bool Converter::FromV8(v8::Isolate* isolate, return false; bool shifted = false; - ui::KeyboardCode keyCode = atom::KeyboardCodeFromStr(str, &shifted); + ui::KeyboardCode keyCode = electron::KeyboardCodeFromStr(str, &shifted); out->windows_key_code = keyCode; if (shifted) out->SetModifiers(out->GetModifiers() | blink::WebInputEvent::kShiftKey); @@ -190,7 +190,7 @@ bool Converter::FromV8(v8::Isolate* isolate, ui::DomKey domKey; ui::KeyboardCode dummy_code; - int flags = atom::WebEventModifiersToEventFlags(out->GetModifiers()); + int flags = electron::WebEventModifiersToEventFlags(out->GetModifiers()); if (ui::DomCodeToUsLayoutDomKey(domCode, flags, &domKey, &dummy_code)) out->dom_key = static_cast(domKey); diff --git a/shell/common/native_mate_converters/content_converter.cc b/shell/common/native_mate_converters/content_converter.cc index 96b0a4af08..2db61481cd 100644 --- a/shell/common/native_mate_converters/content_converter.cc +++ b/shell/common/native_mate_converters/content_converter.cc @@ -149,7 +149,7 @@ bool Converter::FromV8( v8::Local Converter::ToV8( v8::Isolate* isolate, const content::PermissionType& val) { - using PermissionType = atom::WebContentsPermissionHelper::PermissionType; + using PermissionType = electron::WebContentsPermissionHelper::PermissionType; switch (val) { case content::PermissionType::MIDI_SYSEX: return StringToV8(isolate, "midiSysex"); @@ -206,14 +206,14 @@ v8::Local Converter::ToV8( content::WebContents* val) { if (!val) return v8::Null(isolate); - return atom::api::WebContents::FromOrCreate(isolate, val).ToV8(); + return electron::api::WebContents::FromOrCreate(isolate, val).ToV8(); } // static bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, content::WebContents** out) { - atom::api::WebContents* web_contents = nullptr; + electron::api::WebContents* web_contents = nullptr; if (!ConvertFromV8(isolate, val, &web_contents) || !web_contents) return false; diff --git a/shell/common/native_mate_converters/file_dialog_converter.cc b/shell/common/native_mate_converters/file_dialog_converter.cc index b4c65b237b..fc809623d9 100644 --- a/shell/common/native_mate_converters/file_dialog_converter.cc +++ b/shell/common/native_mate_converters/file_dialog_converter.cc @@ -60,7 +60,8 @@ v8::Local Converter::ToV8( const file_dialog::DialogSettings& in) { mate::Dictionary dict = mate::Dictionary::CreateEmpty(isolate); - dict.Set("window", atom::api::BrowserWindow::From(isolate, in.parent_window)); + dict.Set("window", + electron::api::BrowserWindow::From(isolate, in.parent_window)); dict.Set("title", in.title); dict.Set("message", in.message); dict.Set("buttonLabel", in.button_label); diff --git a/shell/common/native_mate_converters/image_converter.cc b/shell/common/native_mate_converters/image_converter.cc index 514fc68e5e..68443ad8ca 100644 --- a/shell/common/native_mate_converters/image_converter.cc +++ b/shell/common/native_mate_converters/image_converter.cc @@ -27,7 +27,7 @@ bool Converter::FromV8(v8::Isolate* isolate, if (val->IsNull()) return true; - Handle native_image; + Handle native_image; if (!ConvertFromV8(isolate, val, &native_image)) return false; @@ -37,7 +37,7 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8(v8::Isolate* isolate, const gfx::Image& val) { - return ConvertToV8(isolate, atom::api::NativeImage::Create(isolate, val)); + return ConvertToV8(isolate, electron::api::NativeImage::Create(isolate, val)); } } // namespace mate diff --git a/shell/common/native_mate_converters/message_box_converter.cc b/shell/common/native_mate_converters/message_box_converter.cc index 1e0781ba57..70b4fb59b7 100644 --- a/shell/common/native_mate_converters/message_box_converter.cc +++ b/shell/common/native_mate_converters/message_box_converter.cc @@ -11,17 +11,17 @@ namespace mate { -bool Converter::FromV8( +bool Converter::FromV8( v8::Isolate* isolate, v8::Local val, - atom::MessageBoxSettings* out) { + electron::MessageBoxSettings* out) { mate::Dictionary dict; int type = 0; if (!ConvertFromV8(isolate, val, &dict)) return false; dict.Get("window", &out->parent_window); dict.Get("type", &type); - out->type = static_cast(type); + out->type = static_cast(type); dict.Get("buttons", &out->buttons); dict.Get("defaultId", &out->default_id); dict.Get("cancelId", &out->cancel_id); diff --git a/shell/common/native_mate_converters/message_box_converter.h b/shell/common/native_mate_converters/message_box_converter.h index 8caac1c2eb..8e9189fac2 100644 --- a/shell/common/native_mate_converters/message_box_converter.h +++ b/shell/common/native_mate_converters/message_box_converter.h @@ -11,10 +11,10 @@ namespace mate { template <> -struct Converter { +struct Converter { static bool FromV8(v8::Isolate* isolate, v8::Local val, - atom::MessageBoxSettings* out); + electron::MessageBoxSettings* out); }; } // namespace mate diff --git a/shell/common/native_mate_converters/net_converter.cc b/shell/common/native_mate_converters/net_converter.cc index b758b8fb55..27f292f8a1 100644 --- a/shell/common/native_mate_converters/net_converter.cc +++ b/shell/common/native_mate_converters/net_converter.cc @@ -270,7 +270,7 @@ v8::Local Converter::ToV8( } // namespace mate -namespace atom { +namespace electron { void FillRequestDetails(base::DictionaryValue* details, const net::URLRequest* request) { @@ -321,4 +321,4 @@ void GetUploadData(base::ListValue* upload_data_list, } } -} // namespace atom +} // namespace electron diff --git a/shell/common/native_mate_converters/net_converter.h b/shell/common/native_mate_converters/net_converter.h index b6f1166740..319c5fca81 100644 --- a/shell/common/native_mate_converters/net_converter.h +++ b/shell/common/native_mate_converters/net_converter.h @@ -67,7 +67,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { void FillRequestDetails(base::DictionaryValue* details, const net::URLRequest* request); @@ -75,6 +75,6 @@ void FillRequestDetails(base::DictionaryValue* details, void GetUploadData(base::ListValue* upload_data_list, const net::URLRequest* request); -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NATIVE_MATE_CONVERTERS_NET_CONVERTER_H_ diff --git a/shell/common/native_mate_converters/v8_value_converter.cc b/shell/common/native_mate_converters/v8_value_converter.cc index 682305eb68..d241c6fba2 100644 --- a/shell/common/native_mate_converters/v8_value_converter.cc +++ b/shell/common/native_mate_converters/v8_value_converter.cc @@ -17,7 +17,7 @@ #include "shell/common/node_bindings.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace { @@ -514,4 +514,4 @@ std::unique_ptr V8ValueConverter::FromV8Object( return std::move(result); } -} // namespace atom +} // namespace electron diff --git a/shell/common/native_mate_converters/v8_value_converter.h b/shell/common/native_mate_converters/v8_value_converter.h index f084d250dd..2d6caf15a5 100644 --- a/shell/common/native_mate_converters/v8_value_converter.h +++ b/shell/common/native_mate_converters/v8_value_converter.h @@ -17,7 +17,7 @@ class ListValue; class Value; } // namespace base -namespace atom { +namespace electron { class V8ValueConverter { public: @@ -72,6 +72,6 @@ class V8ValueConverter { DISALLOW_COPY_AND_ASSIGN(V8ValueConverter); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NATIVE_MATE_CONVERTERS_V8_VALUE_CONVERTER_H_ diff --git a/shell/common/native_mate_converters/value_converter.cc b/shell/common/native_mate_converters/value_converter.cc index 58be22da5e..d99b5f28fe 100644 --- a/shell/common/native_mate_converters/value_converter.cc +++ b/shell/common/native_mate_converters/value_converter.cc @@ -14,7 +14,7 @@ namespace mate { bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, base::DictionaryValue* out) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; std::unique_ptr value( converter.FromV8Value(val, isolate->GetCurrentContext())); if (value && value->is_dict()) { @@ -28,14 +28,14 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8( v8::Isolate* isolate, const base::DictionaryValue& val) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; return converter.ToV8Value(&val, isolate->GetCurrentContext()); } bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, base::Value* out) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; std::unique_ptr value( converter.FromV8Value(val, isolate->GetCurrentContext())); if (value) { @@ -48,14 +48,14 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8(v8::Isolate* isolate, const base::Value& val) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; return converter.ToV8Value(&val, isolate->GetCurrentContext()); } bool Converter::FromV8(v8::Isolate* isolate, v8::Local val, base::ListValue* out) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; std::unique_ptr value( converter.FromV8Value(val, isolate->GetCurrentContext())); if (value->is_list()) { @@ -69,7 +69,7 @@ bool Converter::FromV8(v8::Isolate* isolate, v8::Local Converter::ToV8( v8::Isolate* isolate, const base::ListValue& val) { - atom::V8ValueConverter converter; + electron::V8ValueConverter converter; return converter.ToV8Value(&val, isolate->GetCurrentContext()); } diff --git a/shell/common/node_bindings.cc b/shell/common/node_bindings.cc index 974d27fcef..68d54efdc8 100644 --- a/shell/common/node_bindings.cc +++ b/shell/common/node_bindings.cc @@ -120,7 +120,7 @@ bool g_is_initialized = false; } // namespace -namespace atom { +namespace electron { namespace { @@ -446,4 +446,4 @@ void NodeBindings::EmbedThreadRunner(void* arg) { } } -} // namespace atom +} // namespace electron diff --git a/shell/common/node_bindings.h b/shell/common/node_bindings.h index 4ae6a07af8..6ac18fc9f0 100644 --- a/shell/common/node_bindings.h +++ b/shell/common/node_bindings.h @@ -21,7 +21,7 @@ class Environment; class MultiIsolatePlatform; } // namespace node -namespace atom { +namespace electron { class NodeBindings { public: @@ -112,6 +112,6 @@ class NodeBindings { DISALLOW_COPY_AND_ASSIGN(NodeBindings); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NODE_BINDINGS_H_ diff --git a/shell/common/node_bindings_linux.cc b/shell/common/node_bindings_linux.cc index 43509ae18b..1d4f7b5ff2 100644 --- a/shell/common/node_bindings_linux.cc +++ b/shell/common/node_bindings_linux.cc @@ -6,7 +6,7 @@ #include -namespace atom { +namespace electron { NodeBindingsLinux::NodeBindingsLinux(BrowserEnvironment browser_env) : NodeBindings(browser_env), epoll_(epoll_create(1)) { @@ -52,4 +52,4 @@ NodeBindings* NodeBindings::Create(BrowserEnvironment browser_env) { return new NodeBindingsLinux(browser_env); } -} // namespace atom +} // namespace electron diff --git a/shell/common/node_bindings_linux.h b/shell/common/node_bindings_linux.h index a251858567..e4951b0852 100644 --- a/shell/common/node_bindings_linux.h +++ b/shell/common/node_bindings_linux.h @@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" -namespace atom { +namespace electron { class NodeBindingsLinux : public NodeBindings { public: @@ -29,6 +29,6 @@ class NodeBindingsLinux : public NodeBindings { DISALLOW_COPY_AND_ASSIGN(NodeBindingsLinux); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NODE_BINDINGS_LINUX_H_ diff --git a/shell/common/node_bindings_mac.cc b/shell/common/node_bindings_mac.cc index 6534336258..b77e2016ca 100644 --- a/shell/common/node_bindings_mac.cc +++ b/shell/common/node_bindings_mac.cc @@ -12,7 +12,7 @@ #include "shell/common/node_includes.h" -namespace atom { +namespace electron { NodeBindingsMac::NodeBindingsMac(BrowserEnvironment browser_env) : NodeBindings(browser_env) {} @@ -62,4 +62,4 @@ NodeBindings* NodeBindings::Create(BrowserEnvironment browser_env) { return new NodeBindingsMac(browser_env); } -} // namespace atom +} // namespace electron diff --git a/shell/common/node_bindings_mac.h b/shell/common/node_bindings_mac.h index f3752be4cf..ffaafe4222 100644 --- a/shell/common/node_bindings_mac.h +++ b/shell/common/node_bindings_mac.h @@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" -namespace atom { +namespace electron { class NodeBindingsMac : public NodeBindings { public: @@ -26,6 +26,6 @@ class NodeBindingsMac : public NodeBindings { DISALLOW_COPY_AND_ASSIGN(NodeBindingsMac); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NODE_BINDINGS_MAC_H_ diff --git a/shell/common/node_bindings_win.cc b/shell/common/node_bindings_win.cc index 5685a19627..c3deea628e 100644 --- a/shell/common/node_bindings_win.cc +++ b/shell/common/node_bindings_win.cc @@ -9,7 +9,7 @@ #include "base/logging.h" #include "base/system/sys_info.h" -namespace atom { +namespace electron { NodeBindingsWin::NodeBindingsWin(BrowserEnvironment browser_env) : NodeBindings(browser_env) { @@ -50,4 +50,4 @@ NodeBindings* NodeBindings::Create(BrowserEnvironment browser_env) { return new NodeBindingsWin(browser_env); } -} // namespace atom +} // namespace electron diff --git a/shell/common/node_bindings_win.h b/shell/common/node_bindings_win.h index 2063d294d6..0b45da1781 100644 --- a/shell/common/node_bindings_win.h +++ b/shell/common/node_bindings_win.h @@ -8,7 +8,7 @@ #include "base/compiler_specific.h" #include "shell/common/node_bindings.h" -namespace atom { +namespace electron { class NodeBindingsWin : public NodeBindings { public: @@ -21,6 +21,6 @@ class NodeBindingsWin : public NodeBindings { DISALLOW_COPY_AND_ASSIGN(NodeBindingsWin); }; -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_NODE_BINDINGS_WIN_H_ diff --git a/shell/common/options_switches.cc b/shell/common/options_switches.cc index 08abf03256..7362ce381f 100644 --- a/shell/common/options_switches.cc +++ b/shell/common/options_switches.cc @@ -4,7 +4,7 @@ #include "shell/common/options_switches.h" -namespace atom { +namespace electron { namespace options { @@ -270,4 +270,4 @@ const char kEnableAuthNegotiatePort[] = "enable-auth-negotiate-port"; } // namespace switches -} // namespace atom +} // namespace electron diff --git a/shell/common/options_switches.h b/shell/common/options_switches.h index f4ba767a41..b16a24b8cf 100644 --- a/shell/common/options_switches.h +++ b/shell/common/options_switches.h @@ -5,7 +5,7 @@ #ifndef SHELL_COMMON_OPTIONS_SWITCHES_H_ #define SHELL_COMMON_OPTIONS_SWITCHES_H_ -namespace atom { +namespace electron { namespace options { @@ -131,6 +131,6 @@ extern const char kEnableAuthNegotiatePort[]; } // namespace switches -} // namespace atom +} // namespace electron #endif // SHELL_COMMON_OPTIONS_SWITCHES_H_ diff --git a/shell/common/promise_util.cc b/shell/common/promise_util.cc index 0e5afae671..da87f6c0b4 100644 --- a/shell/common/promise_util.cc +++ b/shell/common/promise_util.cc @@ -7,7 +7,7 @@ #include "shell/common/api/locker.h" #include "shell/common/promise_util.h" -namespace atom { +namespace electron { namespace util { @@ -60,13 +60,13 @@ Promise CopyablePromise::GetPromise() const { } // namespace util -} // namespace atom +} // namespace electron namespace mate { -v8::Local mate::Converter::ToV8( +v8::Local mate::Converter::ToV8( v8::Isolate*, - const atom::util::Promise& val) { + const electron::util::Promise& val) { return val.GetHandle(); } diff --git a/shell/common/promise_util.h b/shell/common/promise_util.h index d92ca98550..ec43ab02e2 100644 --- a/shell/common/promise_util.h +++ b/shell/common/promise_util.h @@ -16,7 +16,7 @@ #include "shell/common/native_mate_converters/callback.h" #include "shell/common/native_mate_converters/once_callback.h" -namespace atom { +namespace electron { namespace util { @@ -246,14 +246,14 @@ class CopyablePromise { } // namespace util -} // namespace atom +} // namespace electron namespace mate { template <> -struct Converter { +struct Converter { static v8::Local ToV8(v8::Isolate* isolate, - const atom::util::Promise& val); + const electron::util::Promise& val); // TODO(MarshallOfSound): Implement FromV8 to allow promise chaining // in native land // static bool FromV8(v8::Isolate* isolate, diff --git a/shell/renderer/api/atom_api_renderer_ipc.cc b/shell/renderer/api/atom_api_renderer_ipc.cc index 10414a5767..f6cf478071 100644 --- a/shell/renderer/api/atom_api_renderer_ipc.cc +++ b/shell/renderer/api/atom_api_renderer_ipc.cc @@ -44,10 +44,11 @@ class IPCRenderer : public mate::Wrappable { // Bind the interface on the background runner. All accesses will be via // the thread-safe pointer. This is to support our "fake-sync" // MessageSync() hack; see the comment in IPCRenderer::SendSync. - atom::mojom::ElectronBrowserPtrInfo info; + electron::mojom::ElectronBrowserPtrInfo info; render_frame->GetRemoteInterfaces()->GetInterface(mojo::MakeRequest(&info)); - electron_browser_ptr_ = atom::mojom::ThreadSafeElectronBrowserPtr::Create( - std::move(info), task_runner_); + electron_browser_ptr_ = + electron::mojom::ThreadSafeElectronBrowserPtr::Create(std::move(info), + task_runner_); } static void BuildPrototype(v8::Isolate* isolate, @@ -74,12 +75,12 @@ class IPCRenderer : public mate::Wrappable { v8::Local Invoke(mate::Arguments* args, const std::string& channel, const base::Value& arguments) { - atom::util::Promise p(args->isolate()); + electron::util::Promise p(args->isolate()); auto handle = p.GetHandle(); electron_browser_ptr_->get()->Invoke( channel, arguments.Clone(), - base::BindOnce([](atom::util::Promise p, + base::BindOnce([](electron::util::Promise p, base::Value result) { p.Resolve(result); }, std::move(p))); @@ -186,7 +187,7 @@ class IPCRenderer : public mate::Wrappable { } scoped_refptr task_runner_; - scoped_refptr + scoped_refptr electron_browser_ptr_; }; diff --git a/shell/renderer/api/atom_api_spell_check_client.cc b/shell/renderer/api/atom_api_spell_check_client.cc index 389c5ad868..8b288f8a76 100644 --- a/shell/renderer/api/atom_api_spell_check_client.cc +++ b/shell/renderer/api/atom_api_spell_check_client.cc @@ -22,7 +22,7 @@ #include "third_party/blink/public/web/web_text_checking_result.h" #include "third_party/icu/source/common/unicode/uscript.h" -namespace atom { +namespace electron { namespace api { @@ -272,4 +272,4 @@ SpellCheckClient::SpellCheckScope::~SpellCheckScope() = default; } // namespace api -} // namespace atom +} // namespace electron diff --git a/shell/renderer/api/atom_api_spell_check_client.h b/shell/renderer/api/atom_api_spell_check_client.h index 70468c0b11..38b8492a4b 100644 --- a/shell/renderer/api/atom_api_spell_check_client.h +++ b/shell/renderer/api/atom_api_spell_check_client.h @@ -23,7 +23,7 @@ struct WebTextCheckingResult; class WebTextCheckingCompletion; } // namespace blink -namespace atom { +namespace electron { namespace api { @@ -109,6 +109,6 @@ class SpellCheckClient : public blink::WebSpellCheckPanelHostClient, } // namespace api -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_API_ATOM_API_SPELL_CHECK_CLIENT_H_ diff --git a/shell/renderer/api/atom_api_web_frame.cc b/shell/renderer/api/atom_api_web_frame.cc index 139f9c6461..13829d332e 100644 --- a/shell/renderer/api/atom_api_web_frame.cc +++ b/shell/renderer/api/atom_api_web_frame.cc @@ -63,7 +63,7 @@ struct Converter { } // namespace mate -namespace atom { +namespace electron { namespace api { @@ -94,7 +94,7 @@ class RenderFrameStatus : public content::RenderFrameObserver { class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { public: - explicit ScriptExecutionCallback(atom::util::Promise promise) + explicit ScriptExecutionCallback(electron::util::Promise promise) : promise_(std::move(promise)) {} ~ScriptExecutionCallback() override {} @@ -118,7 +118,7 @@ class ScriptExecutionCallback : public blink::WebScriptExecutionCallback { } private: - atom::util::Promise promise_; + electron::util::Promise promise_; DISALLOW_COPY_AND_ASSIGN(ScriptExecutionCallback); }; @@ -532,7 +532,7 @@ int GetRoutingId(v8::Local window) { } // namespace api -} // namespace atom +} // namespace electron namespace { @@ -540,7 +540,7 @@ void Initialize(v8::Local exports, v8::Local unused, v8::Local context, void* priv) { - using namespace atom::api; // NOLINT(build/namespaces) + using namespace electron::api; // NOLINT(build/namespaces) v8::Isolate* isolate = context->GetIsolate(); mate::Dictionary dict(isolate, exports); diff --git a/shell/renderer/atom_autofill_agent.cc b/shell/renderer/atom_autofill_agent.cc index 3dddab3c14..e111ea68df 100644 --- a/shell/renderer/atom_autofill_agent.cc +++ b/shell/renderer/atom_autofill_agent.cc @@ -19,7 +19,7 @@ #include "ui/events/keycodes/keyboard_codes.h" #include "ui/gfx/geometry/rect_f.h" -namespace atom { +namespace electron { namespace { const size_t kMaxDataLength = 1024; @@ -227,4 +227,4 @@ const mojom::ElectronBrowserPtr& AutofillAgent::GetElectronBrowser() { return browser_ptr_; } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/atom_autofill_agent.h b/shell/renderer/atom_autofill_agent.h index 905459de1a..e172cbaba6 100644 --- a/shell/renderer/atom_autofill_agent.h +++ b/shell/renderer/atom_autofill_agent.h @@ -17,7 +17,7 @@ #include "third_party/blink/public/web/web_form_control_element.h" #include "third_party/blink/public/web/web_input_element.h" -namespace atom { +namespace electron { class AutofillAgent : public content::RenderFrameObserver, public blink::WebAutofillClient, @@ -85,6 +85,6 @@ class AutofillAgent : public content::RenderFrameObserver, DISALLOW_COPY_AND_ASSIGN(AutofillAgent); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_ATOM_AUTOFILL_AGENT_H_ diff --git a/shell/renderer/atom_render_frame_observer.cc b/shell/renderer/atom_render_frame_observer.cc index da47fecb9f..926ad47725 100644 --- a/shell/renderer/atom_render_frame_observer.cc +++ b/shell/renderer/atom_render_frame_observer.cc @@ -32,7 +32,7 @@ #include "third_party/blink/public/web/web_script_source.h" #include "ui/base/resource/resource_bundle.h" -namespace atom { +namespace electron { namespace { @@ -156,4 +156,4 @@ bool AtomRenderFrameObserver::ShouldNotifyClient(int world_id) { return IsMainWorld(world_id); } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/atom_render_frame_observer.h b/shell/renderer/atom_render_frame_observer.h index 89b0ca154e..6118496501 100644 --- a/shell/renderer/atom_render_frame_observer.h +++ b/shell/renderer/atom_render_frame_observer.h @@ -18,7 +18,7 @@ namespace base { class ListValue; } -namespace atom { +namespace electron { enum World { MAIN_WORLD = 0, @@ -66,6 +66,6 @@ class AtomRenderFrameObserver : public content::RenderFrameObserver { DISALLOW_COPY_AND_ASSIGN(AtomRenderFrameObserver); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_ATOM_RENDER_FRAME_OBSERVER_H_ diff --git a/shell/renderer/atom_renderer_client.cc b/shell/renderer/atom_renderer_client.cc index d54e037d3e..ce59027d3e 100644 --- a/shell/renderer/atom_renderer_client.cc +++ b/shell/renderer/atom_renderer_client.cc @@ -22,7 +22,7 @@ #include "third_party/blink/public/web/web_local_frame.h" #include "third_party/electron_node/src/node_native_module.h" -namespace atom { +namespace electron { namespace { @@ -245,4 +245,4 @@ node::Environment* AtomRendererClient::GetEnvironment( return env; } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/atom_renderer_client.h b/shell/renderer/atom_renderer_client.h index ca2fe517be..c23710bd3a 100644 --- a/shell/renderer/atom_renderer_client.h +++ b/shell/renderer/atom_renderer_client.h @@ -16,7 +16,7 @@ namespace node { class Environment; } // namespace node -namespace atom { +namespace electron { class ElectronBindings; class NodeBindings; @@ -26,7 +26,7 @@ class AtomRendererClient : public RendererClientBase { AtomRendererClient(); ~AtomRendererClient() override; - // atom::RendererClientBase: + // electron::RendererClientBase: void DidCreateScriptContext(v8::Handle context, content::RenderFrame* render_frame) override; void WillReleaseScriptContext(v8::Handle context, @@ -73,6 +73,6 @@ class AtomRendererClient : public RendererClientBase { DISALLOW_COPY_AND_ASSIGN(AtomRendererClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_ATOM_RENDERER_CLIENT_H_ diff --git a/shell/renderer/atom_sandboxed_renderer_client.cc b/shell/renderer/atom_sandboxed_renderer_client.cc index 064099f23b..304eb3db73 100644 --- a/shell/renderer/atom_sandboxed_renderer_client.cc +++ b/shell/renderer/atom_sandboxed_renderer_client.cc @@ -25,7 +25,7 @@ #include "third_party/electron_node/src/node_binding.h" #include "third_party/electron_node/src/node_native_module.h" -namespace atom { +namespace electron { namespace { @@ -296,4 +296,4 @@ void AtomSandboxedRendererClient::WillReleaseScriptContext( InvokeHiddenCallback(context, kLifecycleKey, "onExit"); } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/atom_sandboxed_renderer_client.h b/shell/renderer/atom_sandboxed_renderer_client.h index e098ac25d1..4a84ae5121 100644 --- a/shell/renderer/atom_sandboxed_renderer_client.h +++ b/shell/renderer/atom_sandboxed_renderer_client.h @@ -12,7 +12,7 @@ #include "base/process/process_metrics.h" #include "shell/renderer/renderer_client_base.h" -namespace atom { +namespace electron { class AtomSandboxedRendererClient : public RendererClientBase { public: @@ -22,7 +22,7 @@ class AtomSandboxedRendererClient : public RendererClientBase { void InitializeBindings(v8::Local binding, v8::Local context, bool is_main_frame); - // atom::RendererClientBase: + // electron::RendererClientBase: void DidCreateScriptContext(v8::Handle context, content::RenderFrame* render_frame) override; void WillReleaseScriptContext(v8::Handle context, @@ -49,6 +49,6 @@ class AtomSandboxedRendererClient : public RendererClientBase { DISALLOW_COPY_AND_ASSIGN(AtomSandboxedRendererClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_ATOM_SANDBOXED_RENDERER_CLIENT_H_ diff --git a/shell/renderer/content_settings_observer.cc b/shell/renderer/content_settings_observer.cc index 0460a7fdd4..23adde4240 100644 --- a/shell/renderer/content_settings_observer.cc +++ b/shell/renderer/content_settings_observer.cc @@ -9,7 +9,7 @@ #include "third_party/blink/public/platform/web_security_origin.h" #include "third_party/blink/public/web/web_local_frame.h" -namespace atom { +namespace electron { ContentSettingsObserver::ContentSettingsObserver( content::RenderFrame* render_frame) @@ -57,4 +57,4 @@ void ContentSettingsObserver::OnDestruct() { delete this; } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/content_settings_observer.h b/shell/renderer/content_settings_observer.h index 8efcf10ab9..78011bb4ff 100644 --- a/shell/renderer/content_settings_observer.h +++ b/shell/renderer/content_settings_observer.h @@ -9,7 +9,7 @@ #include "content/public/renderer/render_frame_observer.h" #include "third_party/blink/public/platform/web_content_settings_client.h" -namespace atom { +namespace electron { class ContentSettingsObserver : public content::RenderFrameObserver, public blink::WebContentSettingsClient { @@ -29,6 +29,6 @@ class ContentSettingsObserver : public content::RenderFrameObserver, DISALLOW_COPY_AND_ASSIGN(ContentSettingsObserver); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_CONTENT_SETTINGS_OBSERVER_H_ diff --git a/shell/renderer/electron_api_service_impl.cc b/shell/renderer/electron_api_service_impl.cc index 602f2041af..599b6ae041 100644 --- a/shell/renderer/electron_api_service_impl.cc +++ b/shell/renderer/electron_api_service_impl.cc @@ -24,7 +24,7 @@ #include "third_party/blink/public/web/blink.h" #include "third_party/blink/public/web/web_local_frame.h" -namespace atom { +namespace electron { namespace { @@ -171,9 +171,10 @@ void ElectronApiServiceImpl::TakeHeapSnapshot( } base::File base_file(platform_file); - bool success = atom::TakeHeapSnapshot(blink::MainThreadIsolate(), &base_file); + bool success = + electron::TakeHeapSnapshot(blink::MainThreadIsolate(), &base_file); std::move(callback).Run(success); } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/electron_api_service_impl.h b/shell/renderer/electron_api_service_impl.h index 85fda68cb3..eb14479af3 100644 --- a/shell/renderer/electron_api_service_impl.h +++ b/shell/renderer/electron_api_service_impl.h @@ -12,7 +12,7 @@ #include "electron/shell/common/api/api.mojom.h" #include "mojo/public/cpp/bindings/associated_binding.h" -namespace atom { +namespace electron { class RendererClientBase; @@ -50,6 +50,6 @@ class ElectronApiServiceImpl : public mojom::ElectronRenderer, DISALLOW_COPY_AND_ASSIGN(ElectronApiServiceImpl); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_ELECTRON_API_SERVICE_IMPL_H_ diff --git a/shell/renderer/guest_view_container.cc b/shell/renderer/guest_view_container.cc index 7ce8d0d8eb..20e050abf6 100644 --- a/shell/renderer/guest_view_container.cc +++ b/shell/renderer/guest_view_container.cc @@ -12,7 +12,7 @@ #include "base/threading/thread_task_runner_handle.h" #include "ui/gfx/geometry/size.h" -namespace atom { +namespace electron { namespace { @@ -61,4 +61,4 @@ base::WeakPtr GuestViewContainer::GetWeakPtr() { return weak_ptr_factory_.GetWeakPtr(); } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/guest_view_container.h b/shell/renderer/guest_view_container.h index 22fed88295..488054ca1d 100644 --- a/shell/renderer/guest_view_container.h +++ b/shell/renderer/guest_view_container.h @@ -13,7 +13,7 @@ namespace gfx { class Size; } -namespace atom { +namespace electron { class GuestViewContainer : public content::BrowserPluginDelegate { public: @@ -41,6 +41,6 @@ class GuestViewContainer : public content::BrowserPluginDelegate { DISALLOW_COPY_AND_ASSIGN(GuestViewContainer); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_GUEST_VIEW_CONTAINER_H_ diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.cc b/shell/renderer/printing/print_render_frame_helper_delegate.cc index 4625fe2451..a8be272506 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.cc +++ b/shell/renderer/printing/print_render_frame_helper_delegate.cc @@ -8,7 +8,7 @@ #include "third_party/blink/public/web/web_element.h" #include "third_party/blink/public/web/web_local_frame.h" -namespace atom { +namespace electron { PrintRenderFrameHelperDelegate::PrintRenderFrameHelperDelegate() = default; @@ -34,4 +34,4 @@ bool PrintRenderFrameHelperDelegate::OverridePrint( return false; } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/printing/print_render_frame_helper_delegate.h b/shell/renderer/printing/print_render_frame_helper_delegate.h index 2a7b60ad16..31d554501e 100644 --- a/shell/renderer/printing/print_render_frame_helper_delegate.h +++ b/shell/renderer/printing/print_render_frame_helper_delegate.h @@ -8,7 +8,7 @@ #include "base/macros.h" #include "components/printing/renderer/print_render_frame_helper.h" -namespace atom { +namespace electron { class PrintRenderFrameHelperDelegate : public printing::PrintRenderFrameHelper::Delegate { @@ -26,6 +26,6 @@ class PrintRenderFrameHelperDelegate DISALLOW_COPY_AND_ASSIGN(PrintRenderFrameHelperDelegate); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_PRINTING_PRINT_RENDER_FRAME_HELPER_DELEGATE_H_ diff --git a/shell/renderer/renderer_client_base.cc b/shell/renderer/renderer_client_base.cc index ea596dbb4e..40746e6593 100644 --- a/shell/renderer/renderer_client_base.cc +++ b/shell/renderer/renderer_client_base.cc @@ -62,7 +62,7 @@ #include "shell/renderer/printing/print_render_frame_helper_delegate.h" #endif // BUILDFLAG(ENABLE_PRINTING) -namespace atom { +namespace electron { namespace { @@ -209,7 +209,8 @@ void RendererClientBase::RenderFrameCreated( new ContentSettingsObserver(render_frame); #if BUILDFLAG(ENABLE_PRINTING) new printing::PrintRenderFrameHelper( - render_frame, std::make_unique()); + render_frame, + std::make_unique()); #endif // TODO(nornagon): it might be possible for an IPC message sent to this @@ -319,4 +320,4 @@ v8::Local RendererClientBase::RunScript( return script->Run(context).ToLocalChecked(); } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/renderer_client_base.h b/shell/renderer/renderer_client_base.h index 25d6b4bb4c..970d3db01c 100644 --- a/shell/renderer/renderer_client_base.h +++ b/shell/renderer/renderer_client_base.h @@ -18,7 +18,7 @@ #include "chrome/renderer/media/chrome_key_systems_provider.h" // nogncheck #endif -namespace atom { +namespace electron { class RendererClientBase : public content::ContentRendererClient { public: @@ -73,6 +73,6 @@ class RendererClientBase : public content::ContentRendererClient { int64_t next_context_id_ = 0; }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_RENDERER_CLIENT_BASE_H_ diff --git a/shell/renderer/web_worker_observer.cc b/shell/renderer/web_worker_observer.cc index 81bcab2686..7cf3d0d8ae 100644 --- a/shell/renderer/web_worker_observer.cc +++ b/shell/renderer/web_worker_observer.cc @@ -12,7 +12,7 @@ #include "shell/common/node_bindings.h" #include "shell/common/node_includes.h" -namespace atom { +namespace electron { namespace { @@ -71,4 +71,4 @@ void WebWorkerObserver::ContextWillDestroy(v8::Local context) { delete this; } -} // namespace atom +} // namespace electron diff --git a/shell/renderer/web_worker_observer.h b/shell/renderer/web_worker_observer.h index 67dc3c1396..4054efce51 100644 --- a/shell/renderer/web_worker_observer.h +++ b/shell/renderer/web_worker_observer.h @@ -10,7 +10,7 @@ #include "base/macros.h" #include "v8/include/v8.h" -namespace atom { +namespace electron { class ElectronBindings; class NodeBindings; @@ -34,6 +34,6 @@ class WebWorkerObserver { DISALLOW_COPY_AND_ASSIGN(WebWorkerObserver); }; -} // namespace atom +} // namespace electron #endif // SHELL_RENDERER_WEB_WORKER_OBSERVER_H_ diff --git a/shell/utility/atom_content_utility_client.cc b/shell/utility/atom_content_utility_client.cc index 1175e5780e..36c1ba9043 100644 --- a/shell/utility/atom_content_utility_client.cc +++ b/shell/utility/atom_content_utility_client.cc @@ -30,7 +30,7 @@ #endif // BUILDFLAG(ENABLE_PRINTING) -namespace atom { +namespace electron { namespace { @@ -156,4 +156,4 @@ AtomContentUtilityClient::MaybeCreateMainThreadService( return nullptr; } -} // namespace atom +} // namespace electron diff --git a/shell/utility/atom_content_utility_client.h b/shell/utility/atom_content_utility_client.h index aaf8d2daf7..33810b6cbe 100644 --- a/shell/utility/atom_content_utility_client.h +++ b/shell/utility/atom_content_utility_client.h @@ -17,7 +17,7 @@ #include "chrome/utility/printing_handler.h" #endif -namespace atom { +namespace electron { class AtomContentUtilityClient : public content::ContentUtilityClient { public: @@ -43,6 +43,6 @@ class AtomContentUtilityClient : public content::ContentUtilityClient { DISALLOW_COPY_AND_ASSIGN(AtomContentUtilityClient); }; -} // namespace atom +} // namespace electron #endif // SHELL_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_