OLD | NEW |
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/renderer/credential_manager_client
.h" | 5 #include "components/password_manager/content/renderer/credential_manager_client
.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <utility> | 10 #include <utility> |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 ConnectToMojoCMIfNeeded(); | 224 ConnectToMojoCMIfNeeded(); |
225 | 225 |
226 CredentialInfo info; | 226 CredentialInfo info; |
227 WebCredentialToCredentialInfo(credential, &info); | 227 WebCredentialToCredentialInfo(credential, &info); |
228 mojo_cm_service_->Store( | 228 mojo_cm_service_->Store( |
229 info, | 229 info, |
230 base::Bind(&RespondToNotificationCallback, | 230 base::Bind(&RespondToNotificationCallback, |
231 base::Owned(new NotificationCallbacksWrapper(callbacks)))); | 231 base::Owned(new NotificationCallbacksWrapper(callbacks)))); |
232 } | 232 } |
233 | 233 |
234 void CredentialManagerClient::DispatchRequireUserMediation( | 234 void CredentialManagerClient::DispatchPreventSilentAccess( |
235 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) { | 235 blink::WebCredentialManagerClient::NotificationCallbacks* callbacks) { |
236 DCHECK(callbacks); | 236 DCHECK(callbacks); |
237 ConnectToMojoCMIfNeeded(); | 237 ConnectToMojoCMIfNeeded(); |
238 | 238 |
239 mojo_cm_service_->RequireUserMediation( | 239 mojo_cm_service_->PreventSilentAccess( |
240 base::Bind(&RespondToNotificationCallback, | 240 base::Bind(&RespondToNotificationCallback, |
241 base::Owned(new NotificationCallbacksWrapper(callbacks)))); | 241 base::Owned(new NotificationCallbacksWrapper(callbacks)))); |
242 } | 242 } |
243 | 243 |
244 void CredentialManagerClient::DispatchGet( | 244 void CredentialManagerClient::DispatchGet( |
245 blink::WebCredentialMediationRequirement mediation, | 245 blink::WebCredentialMediationRequirement mediation, |
246 bool include_passwords, | 246 bool include_passwords, |
247 const blink::WebVector<blink::WebURL>& federations, | 247 const blink::WebVector<blink::WebURL>& federations, |
248 RequestCallbacks* callbacks) { | 248 RequestCallbacks* callbacks) { |
249 DCHECK(callbacks); | 249 DCHECK(callbacks); |
(...skipping 16 matching lines...) Expand all Loading... |
266 | 266 |
267 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame(); | 267 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame(); |
268 main_frame->GetRemoteInterfaces()->GetInterface(&mojo_cm_service_); | 268 main_frame->GetRemoteInterfaces()->GetInterface(&mojo_cm_service_); |
269 } | 269 } |
270 | 270 |
271 void CredentialManagerClient::OnDestruct() { | 271 void CredentialManagerClient::OnDestruct() { |
272 delete this; | 272 delete this; |
273 } | 273 } |
274 | 274 |
275 } // namespace password_manager | 275 } // namespace password_manager |
OLD | NEW |