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

Unified Diff: components/password_manager/content/browser/content_password_manager_driver.cc

Issue 1159143002: Add a basic functionality to the force-saving menu item. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added stub methods. Created 5 years, 7 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/password_manager/content/browser/content_password_manager_driver.cc
diff --git a/components/password_manager/content/browser/content_password_manager_driver.cc b/components/password_manager/content/browser/content_password_manager_driver.cc
index 4fca040a428819d8169523c800d1b51251e9d8b0..ffaf3ac58cef509fbd55ecf7b772da1167bec703 100644
--- a/components/password_manager/content/browser/content_password_manager_driver.cc
+++ b/components/password_manager/content/browser/content_password_manager_driver.cc
@@ -106,6 +106,11 @@ void ContentPasswordManagerDriver::ClearPreviewedForm() {
host->Send(new AutofillMsg_ClearPreviewedForm(host->GetRoutingID()));
}
+void ContentPasswordManagerDriver::ForceSavePassword() {
+ content::RenderFrameHost* host = render_frame_host_;
+ host->Send(new AutofillMsg_FindFocusedPasswordForm(host->GetRoutingID()));
+}
+
PasswordGenerationManager*
ContentPasswordManagerDriver::GetPasswordGenerationManager() {
return &password_generation_manager_;
@@ -132,6 +137,8 @@ bool ContentPasswordManagerDriver::HandleMessage(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(AutofillHostMsg_InPageNavigation, OnInPageNavigation)
IPC_MESSAGE_HANDLER(AutofillHostMsg_PasswordNoLongerGenerated,
OnPasswordNoLongerGenerated)
+ IPC_MESSAGE_HANDLER(AutofillHostMsg_FocusedPasswordFormFound,
+ OnFocusedPasswordFormFound)
IPC_MESSAGE_FORWARD(AutofillHostMsg_ShowPasswordSuggestions,
&password_autofill_manager_,
PasswordAutofillManager::OnShowPasswordSuggestions)
@@ -159,6 +166,11 @@ void ContentPasswordManagerDriver::OnPasswordFormSubmitted(
GetPasswordManager()->OnPasswordFormSubmitted(this, password_form);
}
+void ContentPasswordManagerDriver::OnFocusedPasswordFormFound(
+ const autofill::PasswordForm& password_form) {
+ GetPasswordManager()->OnPasswordFormForceSaveRequested(this, password_form);
+}
+
void ContentPasswordManagerDriver::DidNavigateFrame(
const content::LoadCommittedDetails& details,
const content::FrameNavigateParams& params) {

Powered by Google App Engine
This is Rietveld 408576698