OLD | NEW |
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 PlatformCredential_h | 5 #ifndef PlatformCredential_h |
6 #define PlatformCredential_h | 6 #define PlatformCredential_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "platform/weborigin/KURL.h" | 9 #include "platform/weborigin/KURL.h" |
10 #include "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
11 | 11 |
12 namespace blink { | 12 namespace blink { |
13 | 13 |
14 class PLATFORM_EXPORT PlatformCredential : public GarbageCollectedFinalized<Plat
formCredential> { | 14 class PLATFORM_EXPORT PlatformCredential : public GarbageCollectedFinalized<Plat
formCredential> { |
15 WTF_MAKE_NONCOPYABLE(PlatformCredential); | 15 WTF_MAKE_NONCOPYABLE(PlatformCredential); |
16 public: | 16 public: |
17 static PlatformCredential* create(const String& id, const String& name, cons
t KURL& avatarURL); | 17 static PlatformCredential* create(const String& id, const String& name, cons
t KURL& iconURL); |
18 virtual ~PlatformCredential(); | 18 virtual ~PlatformCredential(); |
19 | 19 |
20 const String& id() const { return m_id; } | 20 const String& id() const { return m_id; } |
21 const String& name() const { return m_name; } | 21 const String& name() const { return m_name; } |
22 const KURL& avatarURL() const { return m_avatarURL; } | 22 const KURL& iconURL() const { return m_iconURL; } |
23 const String& type() const { return m_type; } | 23 const String& type() const { return m_type; } |
24 | 24 |
25 virtual bool isPassword() { return false; } | 25 virtual bool isPassword() { return false; } |
26 virtual bool isFederated() { return false; } | 26 virtual bool isFederated() { return false; } |
27 | 27 |
28 DEFINE_INLINE_VIRTUAL_TRACE() { } | 28 DEFINE_INLINE_VIRTUAL_TRACE() { } |
29 | 29 |
30 protected: | 30 protected: |
31 PlatformCredential(const String& id, const String& name, const KURL& avatarU
RL); | 31 PlatformCredential(const String& id, const String& name, const KURL& iconURL
); |
32 | 32 |
33 void setType(const String& type) { m_type = type; } | 33 void setType(const String& type) { m_type = type; } |
34 | 34 |
35 private: | 35 private: |
36 String m_id; | 36 String m_id; |
37 String m_name; | 37 String m_name; |
38 KURL m_avatarURL; | 38 KURL m_iconURL; |
39 String m_type; | 39 String m_type; |
40 }; | 40 }; |
41 | 41 |
42 } // namespace blink | 42 } // namespace blink |
43 | 43 |
44 #endif // PlatformCredential_h | 44 #endif // PlatformCredential_h |
OLD | NEW |