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

Unified Diff: components/autofill/content/renderer/autofill_agent.cc

Issue 854943002: Remove RenderViewObserver::Resized (try 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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: components/autofill/content/renderer/autofill_agent.cc
diff --git a/components/autofill/content/renderer/autofill_agent.cc b/components/autofill/content/renderer/autofill_agent.cc
index 6afbd4ca8dd79d0d60c860e2d41e584424cf114d..2c48d11bd60520134cfd5c5f5539c0ac1f40105e 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -172,6 +172,7 @@ bool AutofillAgent::OnMessageReceived(const IPC::Message& message) {
OnFillPasswordSuggestion)
IPC_MESSAGE_HANDLER(AutofillMsg_PreviewPasswordSuggestion,
OnPreviewPasswordSuggestion)
+ IPC_MESSAGE_HANDLER(AutofillMsg_PopupHidden, OnPopupHidden)
IPC_MESSAGE_HANDLER(AutofillMsg_RequestAutocompleteResult,
OnRequestAutocompleteResult)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -234,10 +235,6 @@ void AutofillAgent::FocusedNodeChanged(const WebNode& node) {
element_ = *element;
}
-void AutofillAgent::Resized() {
- HidePopup();
-}
-
void AutofillAgent::didRequestAutocomplete(
const WebFormElement& form) {
DCHECK_EQ(form.document().frame(), render_frame()->GetWebFrame());
@@ -550,6 +547,11 @@ void AutofillAgent::OnPreviewPasswordSuggestion(
DCHECK(handled);
}
+void AutofillAgent::OnPopupHidden() {
+ if (!element_.isNull())
+ OnClearPreviewedForm();
+}
+
void AutofillAgent::OnRequestAutocompleteResult(
WebFormElement::AutocompleteResult result,
const base::string16& message,
@@ -740,10 +742,6 @@ void AutofillAgent::ProcessForms() {
void AutofillAgent::HidePopup() {
if (!is_popup_possibly_visible_)
return;
-
- if (!element_.isNull())
- OnClearPreviewedForm();
-
is_popup_possibly_visible_ = false;
Send(new AutofillHostMsg_HidePopup(routing_id()));
}
@@ -785,8 +783,4 @@ void AutofillAgent::LegacyAutofillAgent::FocusedNodeChanged(
agent_->FocusedNodeChanged(node);
}
-void AutofillAgent::LegacyAutofillAgent::Resized() {
- agent_->Resized();
-}
-
} // namespace autofill

Powered by Google App Engine
This is Rietveld 408576698