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

Unified Diff: chrome/browser/password_manager/password_generation_manager.cc

Issue 156173004: Abstract IPC send out of PasswordGenerationManager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + response to review Created 6 years, 10 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: chrome/browser/password_manager/password_generation_manager.cc
diff --git a/chrome/browser/password_manager/password_generation_manager.cc b/chrome/browser/password_manager/password_generation_manager.cc
index 2d895d3f31cbb27c115b13d5f491da2764dfab94..e6b87daeeb9b3492b7af8e5caa5fd11bbf8b5d57 100644
--- a/chrome/browser/password_manager/password_generation_manager.cc
+++ b/chrome/browser/password_manager/password_generation_manager.cc
@@ -18,7 +18,6 @@
#include "components/autofill/core/browser/password_generator.h"
#include "components/autofill/core/common/form_data.h"
#include "components/autofill/core/common/password_form.h"
-#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/rect.h"
@@ -53,10 +52,8 @@ void PasswordGenerationManager::DetectAccountCreationForms(
}
}
}
- if (!account_creation_forms.empty() && IsGenerationEnabled()) {
- SendAccountCreationFormsToRenderer(web_contents_->GetRenderViewHost(),
- account_creation_forms);
- }
+ if (!account_creation_forms.empty() && IsGenerationEnabled())
+ driver_->AccountCreationFormsFound(account_creation_forms);
}
// In order for password generation to be enabled, we need to make sure:
@@ -76,13 +73,6 @@ bool PasswordGenerationManager::IsGenerationEnabled() const {
return true;
}
-void PasswordGenerationManager::SendAccountCreationFormsToRenderer(
- content::RenderViewHost* host,
- const std::vector<autofill::FormData>& forms) {
- host->Send(new AutofillMsg_AccountCreationFormsDetected(
- host->GetRoutingID(), forms));
-}
-
gfx::RectF PasswordGenerationManager::GetBoundsInScreenSpace(
const gfx::RectF& bounds) {
gfx::Rect client_area;

Powered by Google App Engine
This is Rietveld 408576698