Chromium Code Reviews| 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 CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
| 6 #define CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
| 7 | |
| 8 #include <vector> | |
| 9 | |
| 10 #include "base/macros.h" | |
| 11 #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.
| |
| 12 #include "mojo/public/cpp/bindings/binding.h" | |
| 13 #include "mojo/public/cpp/bindings/interface_request.h" | |
| 14 #include "third_party/WebKit/public/platform/modules/webauth/authenticator.mojom .h" | |
| 15 | |
| 16 namespace service_manager { | |
| 17 struct BindSourceInfo; | |
| 18 } | |
| 19 | |
| 20 namespace content { | |
| 21 | |
| 22 class RenderFrameHost; | |
| 23 | |
| 24 // Implementation of the public Authenticator interface. | |
| 25 class AuthenticatorImpl : public webauth::mojom::Authenticator { | |
| 26 public: | |
| 27 static void Create(RenderFrameHost* render_frame_host, | |
| 28 const service_manager::BindSourceInfo& source_info, | |
| 29 webauth::mojom::AuthenticatorRequest request); | |
| 30 ~AuthenticatorImpl() override; | |
| 31 | |
| 32 void set_connection_error_handler(const base::Closure& error_handler) { | |
| 33 connection_error_handler_ = error_handler; | |
| 34 } | |
| 35 | |
| 36 private: | |
| 37 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.
| |
| 38 | |
| 39 // mojom:Authenticator | |
| 40 void MakeCredential( | |
| 41 webauth::mojom::RelyingPartyAccountPtr account, | |
| 42 std::vector<webauth::mojom::ScopedCredentialParametersPtr> parameters, | |
| 43 const std::vector<uint8_t>& challenge, | |
| 44 webauth::mojom::ScopedCredentialOptionsPtr options, | |
| 45 MakeCredentialCallback callback) override; | |
| 46 | |
| 47 base::Closure connection_error_handler_; | |
| 48 base::CancelableClosure timeout_callback_; | |
| 49 url::Origin caller_origin_; | |
| 50 DISALLOW_COPY_AND_ASSIGN(AuthenticatorImpl); | |
| 51 }; | |
| 52 | |
| 53 } // namespace content | |
| 54 | |
| 55 #endif // CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
| OLD | NEW |