diff --git a/atom/app/atom_main_delegate.cc b/atom/app/atom_main_delegate.cc index 9b4ef1a90ee0..7dc9186d2abb 100644 --- a/atom/app/atom_main_delegate.cc +++ b/atom/app/atom_main_delegate.cc @@ -37,14 +37,6 @@ #include "ui/base/resource/resource_bundle.h" #include "ui/base/ui_base_switches.h" -#if BUILDFLAG(IPC_MESSAGE_LOG_ENABLED) -#define IPC_MESSAGE_MACROS_LOG_ENABLED -#include "content/public/common/content_ipc_logging.h" -#define IPC_LOG_TABLE_ADD_ENTRY(msg_id, logger) \ - content::RegisterIPCLogger(msg_id, logger) -#include "atom/common/common_message_generator.h" -#endif - #if defined(OS_MACOSX) #include "atom/app/atom_main_delegate_mac.h" #endif diff --git a/atom/browser/api/atom_api_browser_window.cc b/atom/browser/api/atom_api_browser_window.cc index 5a429e9a1e31..b6fe0b6db6dd 100644 --- a/atom/browser/api/atom_api_browser_window.cc +++ b/atom/browser/api/atom_api_browser_window.cc @@ -10,7 +10,6 @@ #include "atom/browser/unresponsive_suppressor.h" #include "atom/browser/web_contents_preferences.h" #include "atom/browser/window_list.h" -#include "atom/common/api/api_messages.h" #include "atom/common/api/constructor.h" #include "atom/common/color_util.h" #include "atom/common/native_mate_converters/callback.h" diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 92b071193a12..65fd843f508a 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -29,7 +29,6 @@ #include "atom/browser/web_contents_preferences.h" #include "atom/browser/web_contents_zoom_controller.h" #include "atom/browser/web_view_guest_delegate.h" -#include "atom/common/api/api_messages.h" #include "atom/common/api/atom_api_native_image.h" #include "atom/common/api/event_emitter_caller.h" #include "atom/common/color_util.h" @@ -570,9 +569,7 @@ void WebContents::SetContentsBounds(content::WebContents* source, void WebContents::CloseContents(content::WebContents* source) { Emit("close"); -#if defined(TOOLKIT_VIEWS) HideAutofillPopup(); -#endif if (managed_web_contents()) managed_web_contents()->GetView()->SetDelegate(nullptr); for (ExtendedWebContentsObserver& observer : observers_) @@ -1095,7 +1092,6 @@ void WebContents::DevToolsClosed() { Emit("devtools-closed"); } -#if defined(TOOLKIT_VIEWS) void WebContents::ShowAutofillPopup(content::RenderFrameHost* frame_host, const gfx::RectF& bounds, const std::vector& values, @@ -1115,7 +1111,6 @@ void WebContents::ShowAutofillPopup(content::RenderFrameHost* frame_host, CommonWebContentsDelegate::ShowAutofillPopup( frame_host, embedder_frame_host, offscreen, popup_bounds, values, labels); } -#endif bool WebContents::OnMessageReceived(const IPC::Message& message) { bool handled = true; @@ -1128,20 +1123,6 @@ bool WebContents::OnMessageReceived(const IPC::Message& message) { return handled; } -bool WebContents::OnMessageReceived(const IPC::Message& message, - content::RenderFrameHost* frame_host) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP_WITH_PARAM(WebContents, message, frame_host) -#if defined(TOOLKIT_VIEWS) - IPC_MESSAGE_HANDLER(AtomAutofillFrameHostMsg_ShowPopup, ShowAutofillPopup) - IPC_MESSAGE_HANDLER(AtomAutofillFrameHostMsg_HidePopup, HideAutofillPopup) -#endif - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - - return handled; -} - // There are three ways of destroying a webContents: // 1. call webContents.destroy(); // 2. garbage collection; @@ -2031,6 +2012,17 @@ void WebContents::DoGetZoomLevel(DoGetZoomLevelCallback callback) { std::move(callback).Run(GetZoomLevel()); } +void WebContents::ShowAutofillPopup(const gfx::RectF& bounds, + const std::vector& values, + const std::vector& labels) { + content::RenderFrameHost* frame_host = bindings_.dispatch_context(); + ShowAutofillPopup(frame_host, bounds, values, labels); +} + +void WebContents::HideAutofillPopup() { + CommonWebContentsDelegate::HideAutofillPopup(); +} + v8::Local WebContents::GetPreloadPath(v8::Isolate* isolate) const { if (auto* web_preferences = WebContentsPreferences::From(web_contents())) { base::FilePath::StringType preload; diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index c38ca4c2500c..9df39f1f03f3 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -436,8 +436,6 @@ class WebContents : public mate::TrackableObject, void DidFinishNavigation( content::NavigationHandle* navigation_handle) override; bool OnMessageReceived(const IPC::Message& message) override; - bool OnMessageReceived(const IPC::Message& message, - content::RenderFrameHost* frame_host) override; void WebContentsDestroyed() override; void NavigationEntryCommitted( const content::LoadCommittedDetails& load_details) override; @@ -511,6 +509,11 @@ class WebContents : public mate::TrackableObject, void SetTemporaryZoomLevel(double level) override; void DoGetZoomLevel(DoGetZoomLevelCallback callback) override; + void ShowAutofillPopup(const gfx::RectF& bounds, + const std::vector& values, + const std::vector& labels) override; + void HideAutofillPopup() override; + // Called when we receive a CursorChange message from chromium. void OnCursorChange(const content::WebCursor& cursor); diff --git a/atom/browser/api/event.cc b/atom/browser/api/event.cc index c8909a24d226..05dc0d591bc8 100644 --- a/atom/browser/api/event.cc +++ b/atom/browser/api/event.cc @@ -6,7 +6,6 @@ #include -#include "atom/common/api/api_messages.h" #include "atom/common/native_mate_converters/string16_converter.h" #include "atom/common/native_mate_converters/value_converter.h" #include "content/public/browser/render_frame_host.h" diff --git a/atom/browser/common_web_contents_delegate.cc b/atom/browser/common_web_contents_delegate.cc index 4af1d9133342..1163403cc752 100644 --- a/atom/browser/common_web_contents_delegate.cc +++ b/atom/browser/common_web_contents_delegate.cc @@ -214,9 +214,7 @@ void CommonWebContentsDelegate::SetOwnerWindow( NativeWindow* owner_window) { if (owner_window) { owner_window_ = owner_window->GetWeakPtr(); -#if defined(TOOLKIT_VIEWS) autofill_popup_.reset(new AutofillPopup()); -#endif NativeWindowRelay::CreateForWebContents(web_contents, owner_window->GetWeakPtr()); } else { diff --git a/atom/browser/common_web_contents_delegate.h b/atom/browser/common_web_contents_delegate.h index 0cad606f542f..1e194ac9b5af 100644 --- a/atom/browser/common_web_contents_delegate.h +++ b/atom/browser/common_web_contents_delegate.h @@ -105,7 +105,6 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate, const content::NativeWebKeyboardEvent& event) override; // Autofill related events. -#if defined(TOOLKIT_VIEWS) void ShowAutofillPopup(content::RenderFrameHost* frame_host, content::RenderFrameHost* embedder_frame_host, bool offscreen, @@ -113,7 +112,6 @@ class CommonWebContentsDelegate : public content::WebContentsDelegate, const std::vector& values, const std::vector& labels); void HideAutofillPopup(); -#endif // InspectableWebContentsDelegate: void DevToolsSaveToFile(const std::string& url, diff --git a/atom/browser/osr/osr_web_contents_view.cc b/atom/browser/osr/osr_web_contents_view.cc index 5bcfa69543c9..02041eaa3cce 100644 --- a/atom/browser/osr/osr_web_contents_view.cc +++ b/atom/browser/osr/osr_web_contents_view.cc @@ -4,7 +4,6 @@ #include "atom/browser/osr/osr_web_contents_view.h" -#include "atom/common/api/api_messages.h" #include "content/browser/web_contents/web_contents_impl.h" // nogncheck #include "content/public/browser/render_view_host.h" #include "third_party/blink/public/platform/web_screen_info.h" diff --git a/atom/browser/ui/autofill_popup.cc b/atom/browser/ui/autofill_popup.cc index 7cf2e7e94502..20105772eabb 100644 --- a/atom/browser/ui/autofill_popup.cc +++ b/atom/browser/ui/autofill_popup.cc @@ -8,10 +8,11 @@ #include "atom/browser/native_window_views.h" #include "atom/browser/ui/autofill_popup.h" -#include "atom/common/api/api_messages.h" +#include "atom/common/api/api.mojom.h" #include "base/i18n/rtl.h" #include "chrome/browser/ui/autofill/popup_view_common.h" #include "electron/buildflags/buildflags.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h" #include "ui/display/display.h" #include "ui/display/screen.h" #include "ui/gfx/geometry/point.h" @@ -110,8 +111,10 @@ void AutofillPopup::SetItems(const std::vector& values, } void AutofillPopup::AcceptSuggestion(int index) { - frame_host_->Send(new AtomAutofillFrameMsg_AcceptSuggestion( - frame_host_->GetRoutingID(), GetValueAt(index))); + mojom::ElectronAutofillAgentAssociatedPtr autofill_agent; + frame_host_->GetRemoteAssociatedInterfaces()->GetInterface( + mojo::MakeRequest(&autofill_agent)); + autofill_agent->AcceptDataListSuggestion(GetValueAt(index)); } void AutofillPopup::UpdatePopupBounds() { diff --git a/atom/browser/ui/webui/pdf_viewer_ui.cc b/atom/browser/ui/webui/pdf_viewer_ui.cc index 62504317ac82..49efc4e514be 100644 --- a/atom/browser/ui/webui/pdf_viewer_ui.cc +++ b/atom/browser/ui/webui/pdf_viewer_ui.cc @@ -11,7 +11,6 @@ #include "atom/browser/atom_browser_context.h" #include "atom/browser/loader/layered_resource_handler.h" #include "atom/browser/ui/webui/pdf_viewer_handler.h" -#include "atom/common/api/api_messages.h" #include "atom/common/atom_constants.h" #include "base/sequenced_task_runner_helpers.h" #include "base/task/post_task.h" diff --git a/atom/common/api/api.mojom b/atom/common/api/api.mojom index 64de740b43c9..5ea41b68a79d 100644 --- a/atom/common/api/api.mojom +++ b/atom/common/api/api.mojom @@ -1,6 +1,7 @@ module atom.mojom; import "mojo/public/mojom/base/values.mojom"; +import "mojo/public/mojom/base/string16.mojom"; import "ui/gfx/geometry/mojo/geometry.mojom"; interface ElectronRenderer { @@ -14,6 +15,10 @@ interface ElectronRenderer { TakeHeapSnapshot(handle file) => (bool success); }; +interface ElectronAutofillAgent { + AcceptDataListSuggestion(mojo_base.mojom.String16 value); +}; + struct DraggableRegion { bool draggable; gfx.mojom.Rect bounds; @@ -64,4 +69,8 @@ interface ElectronBrowser { [Sync] DoGetZoomLevel() => (double result); + + // TODO: move these into a separate interface + ShowAutofillPopup(gfx.mojom.RectF bounds, array values, array labels); + HideAutofillPopup(); }; diff --git a/atom/common/api/api_messages.h b/atom/common/api/api_messages.h deleted file mode 100644 index 8f5c7c41517c..000000000000 --- a/atom/common/api/api_messages.h +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2013 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -// Multiply-included file, no traditional include guard. - -#include "base/strings/string16.h" -#include "content/public/common/common_param_traits.h" -#include "ipc/ipc_message_macros.h" -#include "ui/gfx/geometry/rect_f.h" -#include "ui/gfx/ipc/gfx_param_traits.h" - -#define IPC_MESSAGE_START ElectronMsgStart - -IPC_MESSAGE_ROUTED3(AtomAutofillFrameHostMsg_ShowPopup, - gfx::RectF /* bounds */, - std::vector /* values */, - std::vector /* labels */) - -IPC_MESSAGE_ROUTED0(AtomAutofillFrameHostMsg_HidePopup) - -IPC_MESSAGE_ROUTED1(AtomAutofillFrameMsg_AcceptSuggestion, - base::string16 /* suggestion */) diff --git a/atom/common/api/remote_object_freer.cc b/atom/common/api/remote_object_freer.cc index 81e84a4d887f..c2f7078013f4 100644 --- a/atom/common/api/remote_object_freer.cc +++ b/atom/common/api/remote_object_freer.cc @@ -4,7 +4,6 @@ #include "atom/common/api/remote_object_freer.h" -#include "atom/common/api/api_messages.h" #include "base/strings/utf_string_conversions.h" #include "base/values.h" #include "content/public/renderer/render_frame.h" diff --git a/atom/common/common_message_generator.cc b/atom/common/common_message_generator.cc deleted file mode 100644 index 4d2dbc1790ec..000000000000 --- a/atom/common/common_message_generator.cc +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2014 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -// Get basic type definitions. -#define IPC_MESSAGE_IMPL -#include "atom/common/common_message_generator.h" - -// Generate constructors. -#include "ipc/struct_constructor_macros.h" - -// lint: must come after struct_constructor_macros. -#include "atom/common/common_message_generator.h" - -// Generate param traits write methods. -#include "ipc/param_traits_write_macros.h" -namespace IPC { -#include "atom/common/common_message_generator.h" -} // namespace IPC - -// Generate param traits read methods. -#include "ipc/param_traits_read_macros.h" -namespace IPC { -#include "atom/common/common_message_generator.h" -} // namespace IPC - -// Generate param traits log methods. -#include "ipc/param_traits_log_macros.h" -namespace IPC { -#include "atom/common/common_message_generator.h" -} // namespace IPC diff --git a/atom/common/common_message_generator.h b/atom/common/common_message_generator.h deleted file mode 100644 index b1b9a0db7e48..000000000000 --- a/atom/common/common_message_generator.h +++ /dev/null @@ -1,7 +0,0 @@ -// Copyright (c) 2014 GitHub, Inc. -// Use of this source code is governed by the MIT license that can be -// found in the LICENSE file. - -// Multiply-included file, no traditional include guard. - -#include "atom/common/api/api_messages.h" diff --git a/atom/renderer/api/atom_api_renderer_ipc.cc b/atom/renderer/api/atom_api_renderer_ipc.cc index 0e7920fac6d6..23374315acf9 100644 --- a/atom/renderer/api/atom_api_renderer_ipc.cc +++ b/atom/renderer/api/atom_api_renderer_ipc.cc @@ -4,7 +4,6 @@ #include -#include "atom/common/api/api_messages.h" #include "atom/common/native_mate_converters/value_converter.h" #include "atom/common/node_bindings.h" #include "atom/common/node_includes.h" diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index 9e7d5cdd2bbe..483b5bfa3a34 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -8,7 +8,6 @@ #include #include "atom/common/api/api.mojom.h" -#include "atom/common/api/api_messages.h" #include "atom/common/api/event_emitter_caller.h" #include "atom/common/native_mate_converters/blink_converter.h" #include "atom/common/native_mate_converters/callback.h" diff --git a/atom/renderer/atom_autofill_agent.cc b/atom/renderer/atom_autofill_agent.cc index 1a90d90bc1d8..73f6134cefd5 100644 --- a/atom/renderer/atom_autofill_agent.cc +++ b/atom/renderer/atom_autofill_agent.cc @@ -4,11 +4,12 @@ #include "atom/renderer/atom_autofill_agent.h" +#include #include -#include "atom/common/api/api_messages.h" #include "content/public/renderer/render_frame.h" #include "content/public/renderer/render_view.h" +#include "services/service_manager/public/cpp/interface_provider.h" #include "third_party/blink/public/platform/web_keyboard_event.h" #include "third_party/blink/public/platform/web_string.h" #include "third_party/blink/public/web/web_document.h" @@ -49,13 +50,23 @@ void TrimStringVectorForIPC(std::vector* strings) { } } // namespace -AutofillAgent::AutofillAgent(content::RenderFrame* frame) - : content::RenderFrameObserver(frame), weak_ptr_factory_(this) { +AutofillAgent::AutofillAgent(content::RenderFrame* frame, + blink::AssociatedInterfaceRegistry* registry) + : content::RenderFrameObserver(frame), + binding_(this), + weak_ptr_factory_(this) { render_frame()->GetWebFrame()->SetAutofillClient(this); + registry->AddInterface( + base::Bind(&AutofillAgent::BindRequest, base::Unretained(this))); } AutofillAgent::~AutofillAgent() = default; +void AutofillAgent::BindRequest( + mojom::ElectronAutofillAgentAssociatedRequest request) { + binding_.Bind(std::move(request)); +} + void AutofillAgent::OnDestruct() { delete this; } @@ -165,24 +176,13 @@ void AutofillAgent::DidCompleteFocusChangeInFrame() { DoFocusChangeComplete(); } -bool AutofillAgent::OnMessageReceived(const IPC::Message& message) { - bool handled = true; - IPC_BEGIN_MESSAGE_MAP(AutofillAgent, message) - IPC_MESSAGE_HANDLER(AtomAutofillFrameMsg_AcceptSuggestion, - OnAcceptSuggestion) - IPC_MESSAGE_UNHANDLED(handled = false) - IPC_END_MESSAGE_MAP() - - return handled; -} - bool AutofillAgent::IsUserGesture() const { return blink::WebUserGestureIndicator::IsProcessingUserGesture( render_frame()->GetWebFrame()); } void AutofillAgent::HidePopup() { - Send(new AtomAutofillFrameHostMsg_HidePopup(render_frame()->GetRoutingID())); + GetElectronBrowser()->HideAutofillPopup(); } void AutofillAgent::ShowPopup(const blink::WebFormControlElement& element, @@ -190,11 +190,10 @@ void AutofillAgent::ShowPopup(const blink::WebFormControlElement& element, const std::vector& labels) { gfx::RectF bounds = render_frame()->GetRenderView()->ElementBoundsInWindow(element); - Send(new AtomAutofillFrameHostMsg_ShowPopup(render_frame()->GetRoutingID(), - bounds, values, labels)); + GetElectronBrowser()->ShowAutofillPopup(bounds, values, labels); } -void AutofillAgent::OnAcceptSuggestion(base::string16 suggestion) { +void AutofillAgent::AcceptDataListSuggestion(const base::string16& suggestion) { auto element = render_frame()->GetWebFrame()->GetDocument().FocusedElement(); if (element.IsFormControlElement()) { ToWebInputElement(&element)->SetAutofillValue( @@ -219,4 +218,13 @@ void AutofillAgent::DoFocusChangeComplete() { focused_node_was_last_clicked_ = false; } +const mojom::ElectronBrowserPtr& AutofillAgent::GetElectronBrowser() { + if (!browser_ptr_) { + render_frame()->GetRemoteInterfaces()->GetInterface( + mojo::MakeRequest(&browser_ptr_)); + } + + return browser_ptr_; +} + } // namespace atom diff --git a/atom/renderer/atom_autofill_agent.h b/atom/renderer/atom_autofill_agent.h index d2f89fe93403..3f03efb79d3d 100644 --- a/atom/renderer/atom_autofill_agent.h +++ b/atom/renderer/atom_autofill_agent.h @@ -7,8 +7,11 @@ #include +#include "atom/common/api/api.mojom.h" #include "base/memory/weak_ptr.h" #include "content/public/renderer/render_frame_observer.h" +#include "mojo/public/cpp/bindings/associated_binding.h" +#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h" #include "third_party/blink/public/web/web_autofill_client.h" #include "third_party/blink/public/web/web_element.h" #include "third_party/blink/public/web/web_form_control_element.h" @@ -17,11 +20,15 @@ namespace atom { class AutofillAgent : public content::RenderFrameObserver, - public blink::WebAutofillClient { + public blink::WebAutofillClient, + public mojom::ElectronAutofillAgent { public: - explicit AutofillAgent(content::RenderFrame* frame); + explicit AutofillAgent(content::RenderFrame* frame, + blink::AssociatedInterfaceRegistry* registry); ~AutofillAgent() override; + void BindRequest(mojom::ElectronAutofillAgentAssociatedRequest request); + // content::RenderFrameObserver: void OnDestruct() override; @@ -38,8 +45,6 @@ class AutofillAgent : public content::RenderFrameObserver, bool requires_caret_at_end; }; - bool OnMessageReceived(const IPC::Message& message) override; - // blink::WebAutofillClient: void TextFieldDidEndEditing(const blink::WebInputElement&) override; void TextFieldDidChange(const blink::WebFormControlElement&) override; @@ -49,6 +54,9 @@ class AutofillAgent : public content::RenderFrameObserver, void OpenTextDataListChooser(const blink::WebInputElement&) override; void DataListOptionsChanged(const blink::WebInputElement&) override; + // mojom::ElectronAutofillAgent + void AcceptDataListSuggestion(const base::string16& suggestion) override; + bool IsUserGesture() const; void HidePopup(); void ShowPopup(const blink::WebFormControlElement&, @@ -56,10 +64,12 @@ class AutofillAgent : public content::RenderFrameObserver, const std::vector&); void ShowSuggestions(const blink::WebFormControlElement& element, const ShowSuggestionsOptions& options); - void OnAcceptSuggestion(base::string16 suggestion); void DoFocusChangeComplete(); + const mojom::ElectronBrowserPtr& GetElectronBrowser(); + mojom::ElectronBrowserPtr browser_ptr_; + // True when the last click was on the focused node. bool focused_node_was_last_clicked_ = false; @@ -68,6 +78,8 @@ class AutofillAgent : public content::RenderFrameObserver, // already focused, or if it caused the focus to change. bool was_focused_before_now_ = false; + mojo::AssociatedBinding binding_; + base::WeakPtrFactory weak_ptr_factory_; DISALLOW_COPY_AND_ASSIGN(AutofillAgent); diff --git a/atom/renderer/atom_render_frame_observer.cc b/atom/renderer/atom_render_frame_observer.cc index d10af97e3178..3f3f52284d8c 100644 --- a/atom/renderer/atom_render_frame_observer.cc +++ b/atom/renderer/atom_render_frame_observer.cc @@ -8,7 +8,6 @@ #include #include -#include "atom/common/api/api_messages.h" #include "atom/common/api/event_emitter_caller.h" #include "atom/common/native_mate_converters/value_converter.h" #include "atom/common/node_includes.h" diff --git a/atom/renderer/atom_sandboxed_renderer_client.cc b/atom/renderer/atom_sandboxed_renderer_client.cc index f91a6d5e2e28..cfef15bb9874 100644 --- a/atom/renderer/atom_sandboxed_renderer_client.cc +++ b/atom/renderer/atom_sandboxed_renderer_client.cc @@ -4,7 +4,6 @@ #include "atom/renderer/atom_sandboxed_renderer_client.h" -#include "atom/common/api/api_messages.h" #include "atom/common/api/electron_bindings.h" #include "atom/common/application_info.h" #include "atom/common/native_mate_converters/string16_converter.h" diff --git a/atom/renderer/renderer_client_base.cc b/atom/renderer/renderer_client_base.cc index e7bf4bded415..a1e878b1d95e 100644 --- a/atom/renderer/renderer_client_base.cc +++ b/atom/renderer/renderer_client_base.cc @@ -200,7 +200,8 @@ void RendererClientBase::RenderThreadStarted() { void RendererClientBase::RenderFrameCreated( content::RenderFrame* render_frame) { #if defined(TOOLKIT_VIEWS) - new AutofillAgent(render_frame); + new AutofillAgent(render_frame, + render_frame->GetAssociatedInterfaceRegistry()); #endif #if BUILDFLAG(ENABLE_PEPPER_FLASH) new PepperHelper(render_frame); diff --git a/filenames.gni b/filenames.gni index fabb6427b752..8800316630c2 100644 --- a/filenames.gni +++ b/filenames.gni @@ -448,7 +448,6 @@ filenames = { "atom/browser/window_list_observer.h", "atom/browser/zoom_level_delegate.cc", "atom/browser/zoom_level_delegate.h", - "atom/common/api/api_messages.h", "atom/common/api/atom_api_asar.cc", "atom/common/api/atom_api_clipboard.cc", "atom/common/api/atom_api_clipboard.h", @@ -492,8 +491,6 @@ filenames = { "atom/common/atom_constants.h", "atom/common/color_util.cc", "atom/common/color_util.h", - "atom/common/common_message_generator.cc", - "atom/common/common_message_generator.h", "atom/common/crash_reporter/crash_reporter.cc", "atom/common/crash_reporter/crash_reporter.h", "atom/common/crash_reporter/crash_reporter_linux.cc", diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 49237c5752a9..a4f987f6e5b0 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -64,7 +64,6 @@ revert_build_swiftshader_for_arm32.patch fix_disable_usage_of_abort_report_np_in_mas_builds.patch fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch fix_disable_usage_of_setapplicationisdaemon_and.patch -ipc_message_start.patch disable_network_services_by_default.patch unsandboxed_ppapi_processes_skip_zygote.patch patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch diff --git a/patches/chromium/ipc_message_start.patch b/patches/chromium/ipc_message_start.patch deleted file mode 100644 index 9349c6a25fcb..000000000000 --- a/patches/chromium/ipc_message_start.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: deepak1556 -Date: Fri, 5 Apr 2019 12:49:24 +0530 -Subject: Define ipc identifier for legacy Electron ipc messages - -Electron ipc messages used to piggy back on ShellMsgStart for ipc -identifier. But its not available after -https://chromium-review.googlesource.com/c/chromium/src/+/1525181. -This patch can be removed once legacy ipc messages are no longer -used. - -diff --git a/ipc/ipc_message_start.h b/ipc/ipc_message_start.h -index 4d83cdf93aef66d3479c9a325e8241592d85359e..a03af8a4b9d370ae849d4fe61c805ecb525fe394 100644 ---- a/ipc/ipc_message_start.h -+++ b/ipc/ipc_message_start.h -@@ -69,6 +69,7 @@ enum IPCMessageStart { - ExtensionWorkerMsgStart, - SubresourceFilterMsgStart, - ChromeAppsMsgStart, -+ ElectronMsgStart, - LastIPCMsgStart // Must come last. - }; - diff --git a/script/lint.js b/script/lint.js index d880abcfe2a1..4de468fa4229 100755 --- a/script/lint.js +++ b/script/lint.js @@ -25,9 +25,6 @@ const BLACKLIST = new Set([ ['atom', 'browser', 'ui', 'cocoa', 'touch_bar_forward_declarations.h'], ['atom', 'browser', 'ui', 'cocoa', 'NSColor+Hex.h'], ['atom', 'browser', 'ui', 'cocoa', 'NSString+ANSI.h'], - ['atom', 'common', 'api', 'api_messages.h'], - ['atom', 'common', 'common_message_generator.cc'], - ['atom', 'common', 'common_message_generator.h'], ['atom', 'common', 'node_includes.h'], ['spec', 'static', 'jquery-2.0.3.min.js'], ['spec', 'ts-smoke', 'electron', 'main.ts'],