Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / public / platform / WebCredentialManagerClient.h
blobc4c4c99b78fe2cd020848a627249d7445ccab632
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.
5 #ifndef WebCredentialManagerClient_h
6 #define WebCredentialManagerClient_h
8 #include "public/platform/WebCallbacks.h"
9 #include "public/platform/WebCredentialManagerError.h"
10 #include "public/platform/WebVector.h"
12 namespace blink {
14 class WebCredential;
15 class WebURL;
17 // WebCredentialManagerClient is an interface which allows an embedder to
18 // implement 'navigator.credential.*' calls which are defined in the
19 // 'credentialmanager' module.
20 class WebCredentialManagerClient {
21 public:
22 typedef WebCallbacks<WebCredential*, WebCredentialManagerError*> RequestCallbacks;
23 typedef WebCallbacks<void, WebCredentialManagerError*> NotificationCallbacks;
25 // Ownership of the callback is transferred to the callee for each of
26 // the following methods.
27 virtual void dispatchFailedSignIn(const WebCredential&, NotificationCallbacks*) { }
28 virtual void dispatchStore(const WebCredential&, NotificationCallbacks*) { }
29 virtual void dispatchRequireUserMediation(NotificationCallbacks*) { }
30 virtual void dispatchGet(bool zeroClickOnly, const WebVector<WebURL>& federations, RequestCallbacks*) { }
33 } // namespace blink
35 #endif // WebCredentialManager_h