OnionSoup: Migrate IPC message handler to Mojo in Android's RendererDateTimePicker
As a first step to moving content/renderer/renderer_date_time_picker to Blink,
this CL migrates IPC message handler to Mojo in RendererDateTimePicker first.
Major changes are as below,
- Introduce date_time_picker.mojom with DateTimePicker interface.
- Introduce DateTimeDialogValue struct in date_time_picker.mojom.
- Move DateTimeSuggestion struct to date_time_picker.mojom.
- Remove all IPC messages regarding DateTimePicker
(content::DateTimeSuggestion and ViewHostMsg_DateTimeDialogValue_Params)
The following CL will move the date_time_picker Mojo to Blink.
Bug: 950157
Change-Id: If3c2f7fd2c0e71cd485c0372efbcff0348ffca9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1564361
Reviewed-by: Dmitry Gozman <[email protected]>
Reviewed-by: Kinuko Yasuda <[email protected]>
Reviewed-by: Kentaro Hara <[email protected]>
Commit-Queue: Gyuyoung Kim <[email protected]>
Cr-Commit-Position: refs/heads/master@{#653861}
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index d43b70a..12e572a5 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -864,9 +864,6 @@
IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
OnRequestPpapiBrokerPermission)
#endif
-#if defined(OS_ANDROID)
- IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog, OnOpenDateTimeDialog)
-#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
@@ -2105,7 +2102,7 @@
manifest_manager_host_.reset(new ManifestManagerHost(this));
#if defined(OS_ANDROID)
- date_time_chooser_.reset(new DateTimeChooserAndroid());
+ date_time_chooser_.reset(new DateTimeChooserAndroid(this));
#endif
// BrowserPluginGuest::Init needs to be called after this WebContents has
@@ -4834,16 +4831,6 @@
page_importance_signals_ = signals;
}
-#if defined(OS_ANDROID)
-void WebContentsImpl::OnOpenDateTimeDialog(
- RenderViewHostImpl* source,
- const ViewHostMsg_DateTimeDialogValue_Params& value) {
- date_time_chooser_->ShowDialog(
- GetTopLevelNativeWindow(), source, value.dialog_type, value.dialog_value,
- value.minimum, value.maximum, value.step, value.suggestions);
-}
-#endif
-
void WebContentsImpl::OnDomOperationResponse(RenderFrameHostImpl* source,
const std::string& json_string) {
// TODO(nick, lukasza): The notification below should probably be updated to