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 Credential_h | 5 #ifndef Credential_h |
6 #define Credential_h | 6 #define Credential_h |
7 | 7 |
8 #include "bindings/core/v8/ScriptWrappable.h" | 8 #include "bindings/core/v8/ScriptWrappable.h" |
9 #include "bindings/core/v8/SerializedScriptValue.h" | 9 #include "bindings/core/v8/SerializedScriptValue.h" |
10 #include "platform/credentialmanager/PlatformCredential.h" | |
10 #include "platform/heap/Handle.h" | 11 #include "platform/heap/Handle.h" |
11 | 12 |
12 namespace blink { | 13 namespace blink { |
13 | 14 |
15 class WebCredential; | |
16 | |
14 class Credential : public GarbageCollectedFinalized<Credential>, public ScriptWr appable { | 17 class Credential : public GarbageCollectedFinalized<Credential>, public ScriptWr appable { |
sof
2014/08/10 05:54:57
This base class no longer needs to be finalized (w
Mike West
2014/08/10 11:39:52
In the future, I don't expect Credential to change
sof
2014/08/10 13:14:15
Assuming FormData isn't turned into a GCed object
| |
15 public: | 18 public: |
16 static Credential* create(const String& id, const String& name, const String & avatarURL); | 19 static Credential* create(const String& id, const String& name, const String & avatarURL); |
17 virtual ~Credential(); | 20 virtual ~Credential(); |
18 | 21 |
19 // Credential.idl | 22 // Credential.idl |
20 const String& id() const { return m_id; } | 23 const String& id() const { return m_private->id(); } |
21 const String& name() const { return m_name; } | 24 const String& name() const { return m_private->name(); } |
22 const String& avatarURL() const { return m_avatarURL; } | 25 const String& avatarURL() const { return m_private->avatarURL(); } |
23 | 26 |
24 virtual void trace(Visitor*) { }; | 27 virtual void trace(Visitor*); |
25 | 28 |
26 protected: | 29 protected: |
30 Credential(PlatformCredential*); | |
sof
2014/08/10 05:54:57
Perhaps you want an implicit conversion, but if no
Mike West
2014/08/11 07:56:49
Done.
| |
27 Credential(const String& id, const String& name, const String& avatarURL); | 31 Credential(const String& id, const String& name, const String& avatarURL); |
28 | 32 |
29 private: | 33 Member<PlatformCredential> m_private; |
sof
2014/08/10 05:54:57
Possible to come up with a better name?
Mike West
2014/08/11 07:56:49
Done.
| |
30 String m_id; | |
31 String m_name; | |
32 String m_avatarURL; | |
33 }; | 34 }; |
34 | 35 |
35 } // namespace blink | 36 } // namespace blink |
36 | 37 |
37 #endif // Credential_h | 38 #endif // Credential_h |
OLD | NEW |