Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(491)

Side by Side Diff: Source/modules/credentialmanager/CredentialManagerClient.cpp

Issue 488993003: Credential Manager: Migrate to WebView client-based approach. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: feedback. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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 #include "config.h"
6 #include "modules/credentialmanager/CredentialManagerClient.h"
7
8 #include "core/page/Page.h"
9
10 namespace blink {
11
12 CredentialManagerClient::CredentialManagerClient(WebCredentialManagerClient* cli ent)
13 : m_client(client)
14 {
15 }
16
17 CredentialManagerClient::~CredentialManagerClient()
18 {
19 }
20
21 // static
22 const char* CredentialManagerClient::supplementName()
23 {
24 return "CredentialManagerClient";
25 }
26
27 // static
28 CredentialManagerClient* CredentialManagerClient::from(Page* page)
29 {
30 return static_cast<CredentialManagerClient*>(WillBeHeapSupplement<Page>::fro m(page, supplementName()));
31 }
32
33 void provideCredentialManagerClientTo(Page& page, CredentialManagerClient* clien t)
34 {
35 CredentialManagerClient::provideTo(page, CredentialManagerClient::supplement Name(), adoptPtrWillBeNoop(client));
36 }
37
38 void CredentialManagerClient::dispatchFailedSignIn(const WebCredential& credenti al, WebCredentialManagerClient::NotificationCallbacks* callbacks)
39 {
40 if (!m_client)
41 return;
42 m_client->dispatchFailedSignIn(credential, callbacks);
43 }
44
45 void CredentialManagerClient::dispatchSignedIn(const WebCredential& credential, WebCredentialManagerClient::NotificationCallbacks* callbacks)
46 {
47 if (!m_client)
48 return;
49 m_client->dispatchSignedIn(credential, callbacks);
50 }
51
52 void CredentialManagerClient::dispatchSignedOut(WebCredentialManagerClient::Noti ficationCallbacks* callbacks)
53 {
54 if (!m_client)
55 return;
56 m_client->dispatchSignedOut(callbacks);
57 }
58
59 void CredentialManagerClient::dispatchRequest(bool zeroClickOnly, const WebVecto r<WebURL>& federations, WebCredentialManagerClient::RequestCallbacks* callbacks)
60 {
61 if (!m_client)
62 return;
63 m_client->dispatchRequest(zeroClickOnly, federations, callbacks);
64 }
65
66 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/credentialmanager/CredentialManagerClient.h ('k') | Source/modules/credentialmanager/CredentialsContainer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698