#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"
#include "third_party/WebKit/public/platform/WebURLRequest.h"
#include "third_party/WebKit/public/web/WebDataSource.h"
#include "third_party/WebKit/public/web/WebDocument.h"
+#include "third_party/WebKit/public/web/WebElementCollection.h"
#include "third_party/WebKit/public/web/WebFormControlElement.h"
#include "third_party/WebKit/public/web/WebFormElement.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebInputEvent.h"
#include "third_party/WebKit/public/web/WebNode.h"
-#include "third_party/WebKit/public/web/WebNodeCollection.h"
#include "third_party/WebKit/public/web/WebOptionElement.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "ui/base/l10n/l10n_util.h"
using blink::WebInputElement;
using blink::WebKeyboardEvent;
using blink::WebNode;
-using blink::WebNodeCollection;
+using blink::WebElementCollection;
using blink::WebOptionElement;
using blink::WebString;
bool ignore_current_value,
std::vector<base::string16>* values,
std::vector<base::string16>* labels) {
- WebNodeCollection options = element.dataListOptions();
+ WebElementCollection options = element.dataListOptions();
if (options.isNull())
return;
}
}
-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()),
if (!element.focused())
return;
+ if (password_generation_agent_ &&
+ password_generation_agent_->TextDidChangeInTextField(element)) {
+ return;
+ }
+
if (password_autofill_agent_->TextDidChangeInTextField(element)) {
element_ = element;
return;