OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef COMPONENTS_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
6 #define COMPONENTS_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
7 | |
8 #include <vector> | |
9 | |
10 #include "base/macros.h" | |
11 #include "content/public/browser/web_contents.h" | |
12 #include "mojo/public/cpp/bindings/binding.h" | |
13 #include "mojo/public/cpp/bindings/interface_request.h" | |
14 #include "public/platform/modules/webauth/authenticator.mojom.h" | |
jam
2017/06/27 13:52:17
nit: preface include with third_party/WebKit
| |
15 | |
16 namespace content { | |
17 class RenderFrameHost; | |
18 } | |
19 | |
20 namespace webauth { | |
21 | |
22 // Implementation of the public Authenticator interface. | |
23 class AuthenticatorImpl : public mojom::Authenticator { | |
24 public: | |
25 static void Create(content::RenderFrameHost* render_frame_host, | |
26 mojom::AuthenticatorRequest request); | |
27 ~AuthenticatorImpl() override; | |
28 | |
29 void set_connection_error_handler(const base::Closure& error_handler) { | |
30 connection_error_handler_ = error_handler; | |
31 } | |
32 | |
33 private: | |
34 AuthenticatorImpl(content::RenderFrameHost* render_frame_host); | |
35 | |
36 // mojom:Authenticator | |
37 void MakeCredential( | |
38 mojom::RelyingPartyAccountPtr account, | |
39 std::vector<mojom::ScopedCredentialParametersPtr> parameters, | |
40 const std::vector<uint8_t>& challenge, | |
41 mojom::ScopedCredentialOptionsPtr options, | |
42 MakeCredentialCallback callback) override; | |
43 | |
44 base::Closure connection_error_handler_; | |
45 base::CancelableClosure timeout_callback_; | |
46 url::Origin caller_origin_; | |
47 DISALLOW_COPY_AND_ASSIGN(AuthenticatorImpl); | |
48 }; | |
49 | |
50 } // namespace webauth | |
51 | |
52 #endif // COMPONENTS_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
OLD | NEW |