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

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 72543005: Get rid of explict editor dependency from text field (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 2013-11-18T17:22:32 Created 7 years, 1 month 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
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/EditorClientImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/ChromeClientImpl.cpp
diff --git a/Source/web/ChromeClientImpl.cpp b/Source/web/ChromeClientImpl.cpp
index a03e3f65976a1e919dd823ac73997b3cf6509b7d..60d582b6a3943e708a42baf25de8ba9ea2fc990b 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -51,6 +51,7 @@
#include "WebFrameImpl.h"
#include "WebInputElement.h"
#include "WebInputEvent.h"
+#include "WebInputEventConversion.h"
#include "WebKit.h"
#include "WebNode.h"
#include "WebPasswordGeneratorClient.h"
@@ -995,6 +996,32 @@ void ChromeClientImpl::willSetInputMethodState()
m_webView->client()->resetInputMethod();
}
+void ChromeClientImpl::handleKeyboardEventOnTextField(HTMLInputElement& inputElement, KeyboardEvent& event)
+{
+ if (!m_webView->autofillClient())
+ return;
+ m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inputElement), WebKeyboardEventBuilder(event));
+}
+
+void ChromeClientImpl::didChangeValueInTextField(HTMLInputElement& inputElement)
+{
+ if (!m_webView->autofillClient())
+ return;
+ m_webView->autofillClient()->textFieldDidChange(WebInputElement(&inputElement));
+}
+
+void ChromeClientImpl::didEndEditingOnTextField(HTMLInputElement& inputElement)
+{
+ if (m_webView->autofillClient())
+ m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inputElement));
+
+ // Notification that focus was lost. Be careful with this, it's also sent
+ // when the page is being closed.
+
+ // Hide any showing popup.
+ m_webView->hideAutofillPopup();
+}
+
#if ENABLE(NAVIGATOR_CONTENT_UTILS)
PassOwnPtr<NavigatorContentUtilsClientImpl> NavigatorContentUtilsClientImpl::create(WebViewImpl* webView)
{
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/EditorClientImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698