Chromium Code Reviews| Index: public/platform/WebCredentialManager.h |
| diff --git a/public/platform/WebCredentialManager.h b/public/platform/WebCredentialManager.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ef53db9b8f7a504adaf11cb3118950b4ef1d0f93 |
| --- /dev/null |
| +++ b/public/platform/WebCredentialManager.h |
| @@ -0,0 +1,34 @@ |
| +// Copyright 2014 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 WebCredentialManager_h |
| +#define WebCredentialManager_h |
| + |
| +#include "public/platform/WebCallbacks.h" |
| +#include "public/platform/WebCredentialManagerError.h" |
| +#include "public/platform/WebString.h" |
| +#include "public/platform/WebVector.h" |
| + |
| +namespace blink { |
| + |
| +// WebCredentialManager provides an interface for asking Blink's embedder to |
| +// respond to `navigator.credentials.*` calls. |
| +class WebCredentialManager { |
| +public: |
| + typedef WebCallbacks<WebCredential, WebCredentialManagerError> RequestCallbacks; |
| + typedef WebCallbacks<void, WebCredentialManagerError> NotificationCallbacks; |
| + |
| + WebCredentialManager(); |
| + virtual ~WebCredentialManager(); |
| + |
| + // Ownership of the callback is transferred to the callee for each of the following methods. |
| + void dispatchFailedSignIn(const WebCredential&, NotificationCallbacks*) { } |
|
tkent
2014/08/11 08:43:50
Should this be virtual?
Mike West
2014/08/11 09:13:41
Yes. They all should, thanks!
|
| + void dispatchSignedIn(const WebCredential&, NotificationCallbacks*) { } |
| + void dispatchSignedOut(NotificationCallbacks*) { } |
| + void dispatchRequest(bool zeroClickOnly, const WebVector<WebString>& federations, RequestCallbacks*) { } |
| +}; |
| + |
| +} // namespace blink |
| + |
| +#endif // WebCredentialManager_h |