| 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> |
| 11 | 11 |
| 12 #include "base/bind.h" | 12 #include "base/bind.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "components/password_manager/content/public/cpp/type_converters.h" | 14 #include "components/password_manager/content/public/cpp/type_converters.h" |
| 15 #include "components/password_manager/core/common/credential_manager_types.h" | 15 #include "components/password_manager/core/common/credential_manager_types.h" |
| 16 #include "content/public/common/service_registry.h" | |
| 17 #include "content/public/renderer/render_frame.h" | 16 #include "content/public/renderer/render_frame.h" |
| 18 #include "content/public/renderer/render_view.h" | 17 #include "content/public/renderer/render_view.h" |
| 18 #include "services/shell/public/cpp/interface_provider.h" |
| 19 #include "third_party/WebKit/public/platform/WebCredential.h" | 19 #include "third_party/WebKit/public/platform/WebCredential.h" |
| 20 #include "third_party/WebKit/public/platform/WebCredentialManagerError.h" | 20 #include "third_party/WebKit/public/platform/WebCredentialManagerError.h" |
| 21 #include "third_party/WebKit/public/platform/WebFederatedCredential.h" | 21 #include "third_party/WebKit/public/platform/WebFederatedCredential.h" |
| 22 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" | 22 #include "third_party/WebKit/public/platform/WebPasswordCredential.h" |
| 23 #include "third_party/WebKit/public/web/WebView.h" | 23 #include "third_party/WebKit/public/web/WebView.h" |
| 24 | 24 |
| 25 namespace password_manager { | 25 namespace password_manager { |
| 26 | 26 |
| 27 namespace { | 27 namespace { |
| 28 | 28 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 zero_click_only, include_passwords, std::move(federation_vector), | 203 zero_click_only, include_passwords, std::move(federation_vector), |
| 204 base::Bind(&RespondToRequestCallback, | 204 base::Bind(&RespondToRequestCallback, |
| 205 base::Owned(new RequestCallbacksWrapper(callbacks)))); | 205 base::Owned(new RequestCallbacksWrapper(callbacks)))); |
| 206 } | 206 } |
| 207 | 207 |
| 208 void CredentialManagerClient::ConnectToMojoCMIfNeeded() { | 208 void CredentialManagerClient::ConnectToMojoCMIfNeeded() { |
| 209 if (mojo_cm_service_) | 209 if (mojo_cm_service_) |
| 210 return; | 210 return; |
| 211 | 211 |
| 212 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame(); | 212 content::RenderFrame* main_frame = render_view()->GetMainRenderFrame(); |
| 213 main_frame->GetServiceRegistry()->ConnectToRemoteService( | 213 main_frame->GetRemoteInterfaces()->GetInterface(&mojo_cm_service_); |
| 214 mojo::GetProxy(&mojo_cm_service_)); | |
| 215 } | 214 } |
| 216 | 215 |
| 217 void CredentialManagerClient::OnDestruct() { | 216 void CredentialManagerClient::OnDestruct() { |
| 218 delete this; | 217 delete this; |
| 219 } | 218 } |
| 220 | 219 |
| 221 } // namespace password_manager | 220 } // namespace password_manager |
| OLD | NEW |