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 "wtf/text/WTFString.h" | 10 #include "wtf/text/WTFString.h" |
10 | 11 |
11 namespace blink { | 12 namespace blink { |
12 | 13 |
13 class WebPlatformCredential; | 14 class WebPlatformCredential; |
14 | 15 |
15 class PLATFORM_EXPORT PlatformCredential : public GarbageCollectedFinalized<Plat
formCredential> { | 16 class PLATFORM_EXPORT PlatformCredential : public GarbageCollectedFinalized<Plat
formCredential> { |
16 WTF_MAKE_NONCOPYABLE(PlatformCredential); | 17 WTF_MAKE_NONCOPYABLE(PlatformCredential); |
17 public: | 18 public: |
18 static PlatformCredential* create(const String& id, const String& name, cons
t String& avatarURL); | 19 static PlatformCredential* create(const String& id, const String& name, cons
t KURL& avatarURL); |
19 virtual ~PlatformCredential(); | 20 virtual ~PlatformCredential(); |
20 | 21 |
21 const String& id() const { return m_id; } | 22 const String& id() const { return m_id; } |
22 const String& name() const { return m_name; } | 23 const String& name() const { return m_name; } |
23 const String& avatarURL() const { return m_avatarURL; } | 24 const KURL& avatarURL() const { return m_avatarURL; } |
24 | 25 |
25 virtual void trace(Visitor*) { } | 26 virtual void trace(Visitor*) { } |
26 | 27 |
27 protected: | 28 protected: |
28 PlatformCredential(const String& id, const String& name, const String& avata
rURL); | 29 PlatformCredential(const String& id, const String& name, const KURL& avatarU
RL); |
29 | 30 |
30 private: | 31 private: |
31 String m_id; | 32 String m_id; |
32 String m_name; | 33 String m_name; |
33 String m_avatarURL; | 34 KURL m_avatarURL; |
34 }; | 35 }; |
35 | 36 |
36 } // namespace blink | 37 } // namespace blink |
37 | 38 |
38 #endif // PlatformCredential_h | 39 #endif // PlatformCredential_h |
OLD | NEW |