Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 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 WebCredentialManager_h | |
| 6 #define WebCredentialManager_h | |
| 7 | |
| 8 #include "public/platform/WebCallbacks.h" | |
| 9 #include "public/platform/WebCredentialManagerError.h" | |
| 10 #include "public/platform/WebString.h" | |
| 11 #include "public/platform/WebVector.h" | |
| 12 | |
| 13 namespace blink { | |
| 14 | |
| 15 // WebCredentialManager provides an interface for asking Blink's embedder to | |
| 16 // respond to `navigator.credentials.*` calls. | |
| 17 class WebCredentialManager { | |
| 18 public: | |
| 19 typedef WebCallbacks<WebCredential, WebCredentialManagerError> RequestCallba cks; | |
| 20 typedef WebCallbacks<void, WebCredentialManagerError> NotificationCallbacks; | |
| 21 | |
| 22 WebCredentialManager(); | |
| 23 virtual ~WebCredentialManager(); | |
| 24 | |
| 25 // Ownership of the callback is transferred to the callee for each of the fo llowing methods. | |
| 26 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!
| |
| 27 void dispatchSignedIn(const WebCredential&, NotificationCallbacks*) { } | |
| 28 void dispatchSignedOut(NotificationCallbacks*) { } | |
| 29 void dispatchRequest(bool zeroClickOnly, const WebVector<WebString>& federat ions, RequestCallbacks*) { } | |
| 30 }; | |
| 31 | |
| 32 } // namespace blink | |
| 33 | |
| 34 #endif // WebCredentialManager_h | |
| OLD | NEW |