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

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

Issue 151503006: Re-land r248110 with ASAN error fixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Punctuation Created 6 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 1b37ce2cee3a8b3ae83fb548c0096aba1ad4cfd9..979976f72c14ee71c8dfd95e7bf5c195d680aedb 100644
--- a/components/autofill/content/renderer/autofill_agent.cc
+++ b/components/autofill/content/renderer/autofill_agent.cc
@@ -15,6 +15,7 @@
#include "components/autofill/content/renderer/form_autofill_util.h"
#include "components/autofill/content/renderer/page_click_tracker.h"
#include "components/autofill/content/renderer/password_autofill_agent.h"
+#include "components/autofill/content/renderer/password_generation_agent.h"
#include "components/autofill/core/common/autofill_constants.h"
#include "components/autofill/core/common/autofill_data_validation.h"
#include "components/autofill/core/common/autofill_switches.h"
@@ -109,20 +110,14 @@ void TrimStringVectorForIPC(std::vector<base::string16>* strings) {
}
}
-gfx::RectF GetScaledBoundingBox(float scale, WebInputElement* element) {
- gfx::Rect bounding_box(element->boundsInViewportSpace());
- return gfx::RectF(bounding_box.x() * scale,
- bounding_box.y() * scale,
- bounding_box.width() * scale,
- bounding_box.height() * scale);
-}
-
} // namespace
AutofillAgent::AutofillAgent(content::RenderView* render_view,
- PasswordAutofillAgent* password_autofill_agent)
+ PasswordAutofillAgent* password_autofill_agent,
+ PasswordGenerationAgent* password_generation_agent)
: content::RenderViewObserver(render_view),
password_autofill_agent_(password_autofill_agent),
+ password_generation_agent_(password_generation_agent),
autofill_query_id_(0),
autofill_action_(AUTOFILL_NONE),
web_view_(render_view->GetWebView()),
@@ -334,6 +329,11 @@ void AutofillAgent::TextFieldDidChangeImpl(const WebInputElement& element) {
if (!element.focused())
return;
+ if (password_generation_agent_ &&
+ password_generation_agent_->TextDidChangeInTextField(element)) {
+ return;
+ }
+
if (password_autofill_agent_->TextDidChangeInTextField(element)) {
element_ = element;
return;
« no previous file with comments | « components/autofill/content/renderer/autofill_agent.h ('k') | components/autofill/content/renderer/form_autofill_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698