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

Side by Side Diff: components/password_manager/content/browser/content_password_manager_driver.cc

Issue 2915763003: [Password Manager] Show omnibox icon and anchored prompt once user start typing password (Closed)
Patch Set: Rebase Created 3 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/password_manager/content/browser/content_password_manager_d river.h" 5 #include "components/password_manager/content/browser/content_password_manager_d river.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "components/autofill/content/browser/content_autofill_driver.h" 9 #include "components/autofill/content/browser/content_autofill_driver.h"
10 #include "components/autofill/core/common/form_data.h" 10 #include "components/autofill/core/common/form_data.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 void ContentPasswordManagerDriver::ClearPreviewedForm() { 130 void ContentPasswordManagerDriver::ClearPreviewedForm() {
131 GetAutofillAgent()->ClearPreviewedForm(); 131 GetAutofillAgent()->ClearPreviewedForm();
132 } 132 }
133 133
134 void ContentPasswordManagerDriver::ForceSavePassword() { 134 void ContentPasswordManagerDriver::ForceSavePassword() {
135 GetPasswordAutofillAgent()->FindFocusedPasswordForm( 135 GetPasswordAutofillAgent()->FindFocusedPasswordForm(
136 base::Bind(&ContentPasswordManagerDriver::OnFocusedPasswordFormFound, 136 base::Bind(&ContentPasswordManagerDriver::OnFocusedPasswordFormFound,
137 weak_factory_.GetWeakPtr())); 137 weak_factory_.GetWeakPtr()));
138 } 138 }
139 139
140 void ContentPasswordManagerDriver::ShowManualFallbackForSaving(
141 const autofill::PasswordForm& password_form) {
142 if (!CheckChildProcessSecurityPolicy(
143 password_form.origin,
144 BadMessageReason::CPMD_BAD_ORIGIN_SHOW_FALLBACK_FOR_SAVING))
145 return;
146 GetPasswordManager()->ShowManualFallbackForSaving(this, password_form);
147 }
148
149 void ContentPasswordManagerDriver::HideManualFallbackForSaving() {
150 GetPasswordManager()->HideManualFallbackForSaving();
151 }
152
140 void ContentPasswordManagerDriver::GeneratePassword() { 153 void ContentPasswordManagerDriver::GeneratePassword() {
141 GetPasswordGenerationAgent()->UserTriggeredGeneratePassword(); 154 GetPasswordGenerationAgent()->UserTriggeredGeneratePassword();
142 } 155 }
143 156
144 void ContentPasswordManagerDriver::SendLoggingAvailability() { 157 void ContentPasswordManagerDriver::SendLoggingAvailability() {
145 GetPasswordAutofillAgent()->SetLoggingState( 158 GetPasswordAutofillAgent()->SetLoggingState(
146 client_->GetLogManager()->IsLoggingActive()); 159 client_->GetLogManager()->IsLoggingActive());
147 } 160 }
148 161
149 void ContentPasswordManagerDriver::AllowToRunFormClassifier() { 162 void ContentPasswordManagerDriver::AllowToRunFormClassifier() {
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 const gfx::RectF& bounds_in_frame_coordinates) { 373 const gfx::RectF& bounds_in_frame_coordinates) {
361 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView(); 374 content::RenderWidgetHostView* rwhv = render_frame_host_->GetView();
362 if (!rwhv) 375 if (!rwhv)
363 return bounds_in_frame_coordinates; 376 return bounds_in_frame_coordinates;
364 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF( 377 return gfx::RectF(rwhv->TransformPointToRootCoordSpaceF(
365 bounds_in_frame_coordinates.origin()), 378 bounds_in_frame_coordinates.origin()),
366 bounds_in_frame_coordinates.size()); 379 bounds_in_frame_coordinates.size());
367 } 380 }
368 381
369 } // namespace password_manager 382 } // namespace password_manager
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698