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

Unified Diff: Source/web/ChromeClientImpl.cpp

Issue 707723002: Refactor Autofill for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: more stuff Created 6 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/FrameLoaderClientImpl.cpp » ('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 7f830af351ba6b6c08bf57d22878c32c0668bd65..33157fde8eb8a0dd99ced2fd85f369d14c6815d8 100644
--- a/Source/web/ChromeClientImpl.cpp
+++ b/Source/web/ChromeClientImpl.cpp
@@ -801,10 +801,11 @@ void ChromeClientImpl::annotatedRegionsChanged()
client->draggableRegionsChanged();
}
-void ChromeClientImpl::didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements)
+void ChromeClientImpl::didAssociateFormControls(const WillBeHeapVector<RefPtrWillBeMember<Element> >& elements, LocalFrame* frame)
{
- if (m_webView->autofillClient())
- m_webView->autofillClient()->didAssociateFormControls(elements);
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(frame);
+ if (webframe->autofillClient())
+ webframe->autofillClient()->didAssociateFormControls(elements);
}
void ChromeClientImpl::didCancelCompositionOnSelectionChange()
@@ -833,28 +834,30 @@ void ChromeClientImpl::showImeIfNeeded()
void ChromeClientImpl::handleKeyboardEventOnTextField(HTMLInputElement& inputElement, KeyboardEvent& event)
{
- if (!m_webView->autofillClient())
- return;
- m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inputElement), WebKeyboardEventBuilder(event));
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(inputElement.document().frame());
+ if (webframe->autofillClient())
+ webframe->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inputElement), WebKeyboardEventBuilder(event));
}
void ChromeClientImpl::didChangeValueInTextField(HTMLFormControlElement& element)
{
- if (!m_webView->autofillClient())
- return;
- m_webView->autofillClient()->textFieldDidChange(WebFormControlElement(&element));
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(element.document().frame());
+ if (webframe->autofillClient())
+ webframe->autofillClient()->textFieldDidChange(WebFormControlElement(&element));
}
void ChromeClientImpl::didEndEditingOnTextField(HTMLInputElement& inputElement)
{
- if (m_webView->autofillClient())
- m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inputElement));
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(inputElement.document().frame());
+ if (webframe->autofillClient())
+ webframe->autofillClient()->textFieldDidEndEditing(WebInputElement(&inputElement));
}
void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input)
{
- if (m_webView->autofillClient())
- m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&input));
+ WebLocalFrameImpl* webframe = WebLocalFrameImpl::fromFrame(input.document().frame());
+ if (webframe->autofillClient())
+ webframe->autofillClient()->openTextDataListChooser(WebInputElement(&input));
}
} // namespace blink
« no previous file with comments | « Source/web/ChromeClientImpl.h ('k') | Source/web/FrameLoaderClientImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698