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

Side by Side Diff: public/platform/WebCredential.h

Issue 640263002: Credential Manager: Pass the correct credential type to the embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Feedback. Created 6 years, 2 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WebCredential_h 5 #ifndef WebCredential_h
6 #define WebCredential_h 6 #define WebCredential_h
7 7
8 #include "public/platform/WebCommon.h" 8 #include "public/platform/WebCommon.h"
9 #include "public/platform/WebPrivatePtr.h" 9 #include "public/platform/WebPrivatePtr.h"
10 #include "public/platform/WebString.h" 10 #include "public/platform/WebString.h"
11 #include "public/platform/WebURL.h" 11 #include "public/platform/WebURL.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 class PlatformCredential; 15 class PlatformCredential;
16 16
17 class WebCredential { 17 class WebCredential {
18 public: 18 public:
19 BLINK_PLATFORM_EXPORT WebCredential(const WebString& id, const WebString& na me, const WebURL& avatarURL); 19 BLINK_PLATFORM_EXPORT WebCredential(const WebString& id, const WebString& na me, const WebURL& avatarURL);
20 BLINK_PLATFORM_EXPORT WebCredential(const WebCredential&);
20 virtual ~WebCredential() { reset(); } 21 virtual ~WebCredential() { reset(); }
21 22
22 BLINK_PLATFORM_EXPORT void assign(const WebCredential&); 23 BLINK_PLATFORM_EXPORT void assign(const WebCredential&);
23 BLINK_PLATFORM_EXPORT void reset(); 24 BLINK_PLATFORM_EXPORT void reset();
24 25
25 BLINK_PLATFORM_EXPORT WebString id() const; 26 BLINK_PLATFORM_EXPORT WebString id() const;
26 BLINK_PLATFORM_EXPORT WebString name() const; 27 BLINK_PLATFORM_EXPORT WebString name() const;
27 BLINK_PLATFORM_EXPORT WebURL avatarURL() const; 28 BLINK_PLATFORM_EXPORT WebURL avatarURL() const;
28 29
29 BLINK_PLATFORM_EXPORT virtual bool isLocalCredential() const { return false; } 30 BLINK_PLATFORM_EXPORT bool isLocalCredential() const;
30 BLINK_PLATFORM_EXPORT virtual bool isFederatedCredential() const { return fa lse; } 31 BLINK_PLATFORM_EXPORT bool isFederatedCredential() const;
31 32
32 #if INSIDE_BLINK 33 #if INSIDE_BLINK
33 BLINK_PLATFORM_EXPORT WebCredential(PlatformCredential*); 34 BLINK_PLATFORM_EXPORT static WebCredential create(PlatformCredential*);
34 BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*); 35 BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*);
35 BLINK_PLATFORM_EXPORT PlatformCredential* platformCredential() const { retur n m_platformCredential.get(); } 36 BLINK_PLATFORM_EXPORT PlatformCredential* platformCredential() const { retur n m_platformCredential.get(); }
36 #endif 37 #endif
37 38
38 protected: 39 protected:
40 #if INSIDE_BLINK
41 BLINK_PLATFORM_EXPORT WebCredential(PlatformCredential*);
42 #endif
43
39 WebPrivatePtr<PlatformCredential> m_platformCredential; 44 WebPrivatePtr<PlatformCredential> m_platformCredential;
40 }; 45 };
41 46
42 } // namespace blink 47 } // namespace blink
43 48
44 #endif // WebCredential_h 49 #endif // WebCredential_h
OLDNEW
« no previous file with comments | « Source/platform/exported/WebLocalCredential.cpp ('k') | public/platform/WebFederatedCredential.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698