Chromium Code Reviews| Index: content/browser/webauth/authenticator_impl.h |
| diff --git a/content/browser/webauth/authenticator_impl.h b/content/browser/webauth/authenticator_impl.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f81678a7029ebba1d3656836d3588bdaccbd4f49 |
| --- /dev/null |
| +++ b/content/browser/webauth/authenticator_impl.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ |
| +#define CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ |
| + |
| +#include <vector> |
| + |
| +#include "base/macros.h" |
| +#include "content/public/browser/web_contents.h" |
|
jochen (gone - plz use gerrit)
2017/06/28 07:38:30
not needed
kpaulhamus
2017/06/28 08:48:16
Done.
|
| +#include "mojo/public/cpp/bindings/binding.h" |
| +#include "mojo/public/cpp/bindings/interface_request.h" |
| +#include "third_party/WebKit/public/platform/modules/webauth/authenticator.mojom.h" |
| + |
| +namespace service_manager { |
| +struct BindSourceInfo; |
| +} |
| + |
| +namespace content { |
| + |
| +class RenderFrameHost; |
| + |
| +// Implementation of the public Authenticator interface. |
| +class AuthenticatorImpl : public webauth::mojom::Authenticator { |
| + public: |
| + static void Create(RenderFrameHost* render_frame_host, |
| + const service_manager::BindSourceInfo& source_info, |
| + webauth::mojom::AuthenticatorRequest request); |
| + ~AuthenticatorImpl() override; |
| + |
| + void set_connection_error_handler(const base::Closure& error_handler) { |
| + connection_error_handler_ = error_handler; |
| + } |
| + |
| + private: |
| + AuthenticatorImpl(RenderFrameHost* render_frame_host); |
|
jochen (gone - plz use gerrit)
2017/06/28 07:38:30
nit explicit
kpaulhamus
2017/06/28 08:48:15
Done.
|
| + |
| + // mojom:Authenticator |
| + void MakeCredential( |
| + webauth::mojom::RelyingPartyAccountPtr account, |
| + std::vector<webauth::mojom::ScopedCredentialParametersPtr> parameters, |
| + const std::vector<uint8_t>& challenge, |
| + webauth::mojom::ScopedCredentialOptionsPtr options, |
| + MakeCredentialCallback callback) override; |
| + |
| + base::Closure connection_error_handler_; |
| + base::CancelableClosure timeout_callback_; |
| + url::Origin caller_origin_; |
| + DISALLOW_COPY_AND_ASSIGN(AuthenticatorImpl); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ |