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/cancelable_callback.h" | |
| 11 #include "base/macros.h" | |
| 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 #include "url/origin.h" | |
| 16 | |
| 17 namespace service_manager { | |
| 18 struct BindSourceInfo; | |
| 19 } | |
| 20 | |
| 21 namespace content { | |
| 22 | |
| 23 class RenderFrameHost; | |
| 24 | |
| 25 // Implementation of the public Authenticator interface. | |
| 26 class AuthenticatorImpl : public webauth::mojom::Authenticator { | |
|
jochen (gone - plz use gerrit)
2017/06/30 08:15:10
this should be class CONTENT_EXPORT AuthenticatorI
| |
| 27 public: | |
| 28 static void Create(RenderFrameHost* render_frame_host, | |
| 29 const service_manager::BindSourceInfo& source_info, | |
| 30 webauth::mojom::AuthenticatorRequest request); | |
| 31 ~AuthenticatorImpl() override; | |
| 32 | |
| 33 void set_connection_error_handler(const base::Closure& error_handler) { | |
| 34 connection_error_handler_ = error_handler; | |
| 35 } | |
| 36 | |
| 37 private: | |
| 38 explicit AuthenticatorImpl(RenderFrameHost* render_frame_host); | |
| 39 | |
| 40 // mojom:Authenticator | |
| 41 void MakeCredential( | |
| 42 webauth::mojom::RelyingPartyAccountPtr account, | |
| 43 std::vector<webauth::mojom::ScopedCredentialParametersPtr> parameters, | |
| 44 const std::vector<uint8_t>& challenge, | |
| 45 webauth::mojom::ScopedCredentialOptionsPtr options, | |
| 46 MakeCredentialCallback callback) override; | |
| 47 | |
| 48 base::Closure connection_error_handler_; | |
| 49 base::CancelableClosure timeout_callback_; | |
| 50 url::Origin caller_origin_; | |
| 51 DISALLOW_COPY_AND_ASSIGN(AuthenticatorImpl); | |
| 52 }; | |
| 53 | |
| 54 } // namespace content | |
| 55 | |
| 56 #endif // CONTENT_BROWSER_WEBAUTH_AUTHENTICATOR_IMPL_H_ | |
| OLD | NEW |