Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: content/browser/web_contents/web_contents_impl.cc

Issue 11783088: Split Date/Time picker values from IME processing since date/time related form values have been com… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/web_contents/web_contents_impl.cc
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 02600f35c018bf938b1a7eacbf4bf6e28ca18602..78ccb4e36411e511d2e01de2d8bb57f0f6298233 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -85,6 +85,10 @@
#include "webkit/glue/web_intent_service_data.h"
#include "webkit/glue/webpreferences.h"
+#if defined(OS_ANDROID)
+#include "content/browser/android/date_time_chooser_android.h"
+#endif
+
#if defined(OS_MACOSX)
#include "base/mac/foundation_util.h"
#include "ui/surface/io_surface_support_mac.h"
@@ -725,10 +729,6 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
IPC_MESSAGE_HANDLER(ViewHostMsg_RegisterProtocolHandler,
OnRegisterProtocolHandler)
IPC_MESSAGE_HANDLER(ViewHostMsg_Find_Reply, OnFindReply)
-#if defined(OS_ANDROID)
- IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
- OnFindMatchRectsReply)
-#endif
IPC_MESSAGE_HANDLER(ViewHostMsg_CrashedPlugin, OnCrashedPlugin)
IPC_MESSAGE_HANDLER(ViewHostMsg_AppCacheAccessed, OnAppCacheAccessed)
IPC_MESSAGE_HANDLER(ViewHostMsg_OpenColorChooser, OnOpenColorChooser)
@@ -743,6 +743,12 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
OnBrowserPluginCreateGuest)
IPC_MESSAGE_HANDLER(IconHostMsg_DidDownloadFavicon, OnDidDownloadFavicon)
IPC_MESSAGE_HANDLER(IconHostMsg_UpdateFaviconURL, OnUpdateFaviconURL)
+#if defined(OS_ANDROID)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_FindMatchRects_Reply,
+ OnFindMatchRectsReply)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_OpenDateTimeDialog,
+ OnOpenDateTimeDialog)
+#endif
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP_EX()
message_source_ = NULL;
@@ -1184,6 +1190,10 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
java_bridge_dispatcher_host_manager_.reset(
new JavaBridgeDispatcherHostManager(this));
#endif
+
+#if defined(OS_ANDROID)
+ date_time_chooser_.reset(new DateTimeChooserAndroid());
+#endif
}
void WebContentsImpl::OnWebContentsDestroyed(WebContents* web_contents) {
@@ -2271,6 +2281,13 @@ void WebContentsImpl::OnFindMatchRectsReply(
if (delegate_)
delegate_->FindMatchRectsReply(this, version, rects, active_rect);
}
+
+void WebContentsImpl::OnOpenDateTimeDialog(int type, const std::string& value) {
+ if (date_time_chooser_ != NULL)
bulach 2013/01/17 10:32:21 I think this can't ever be NULL at this point, rig
Miguel Garcia 2013/01/17 12:17:40 Done.
+ date_time_chooser_->ShowDialog(
+ GetContentNativeView(), GetRenderViewHost(), type, value);
+}
+
#endif
void WebContentsImpl::OnCrashedPlugin(const FilePath& plugin_path,

Powered by Google App Engine
This is Rietveld 408576698