Chromium Code Reviews| 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 LocalCredential_h | 5 #ifndef LocalCredential_h |
| 6 #define LocalCredential_h | 6 #define LocalCredential_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 "core/html/DOMFormData.h" | |
| 10 #include "modules/credentialmanager/Credential.h" | 11 #include "modules/credentialmanager/Credential.h" |
| 11 #include "platform/heap/Handle.h" | 12 #include "platform/heap/Handle.h" |
| 12 #include "platform/weborigin/KURL.h" | 13 #include "platform/weborigin/KURL.h" |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 | 16 |
| 17 class DOMFormData; | |
| 16 class WebLocalCredential; | 18 class WebLocalCredential; |
| 17 | 19 |
| 18 class LocalCredential final : public Credential { | 20 class LocalCredential final : public Credential { |
| 19 DEFINE_WRAPPERTYPEINFO(); | 21 DEFINE_WRAPPERTYPEINFO(); |
| 20 public: | 22 public: |
| 21 static LocalCredential* create(const String& id, const String& password, Exc eptionState& exceptionState) | 23 static LocalCredential* create(const String& id, const String& password, Exc eptionState& exceptionState) |
| 22 { | 24 { |
| 23 return create(id, password, emptyString(), emptyString(), exceptionState ); | 25 return create(id, password, emptyString(), emptyString(), exceptionState ); |
| 24 } | 26 } |
| 25 | 27 |
| 26 static LocalCredential* create(const String& id, const String& password, con st String& name, ExceptionState& exceptionState) | 28 static LocalCredential* create(const String& id, const String& password, con st String& name, ExceptionState& exceptionState) |
| 27 { | 29 { |
| 28 return create(id, password, name, emptyString(), exceptionState); | 30 return create(id, password, name, emptyString(), exceptionState); |
| 29 } | 31 } |
| 30 | 32 |
| 31 static LocalCredential* create(const String& id, const String& password, con st String& name, const String& avatar, ExceptionState&); | 33 static LocalCredential* create(const String& id, const String& password, con st String& name, const String& avatar, ExceptionState&); |
| 32 static LocalCredential* create(WebLocalCredential*); | 34 static LocalCredential* create(WebLocalCredential*); |
| 33 | 35 |
| 34 // LocalCredential.idl | 36 // LocalCredential.idl |
| 35 const String& password() const; | 37 const String& password() const; |
| 38 DOMFormData* formData() const { return m_formData.get(); }; | |
| 39 | |
| 40 virtual void trace(Visitor*) override; | |
| 36 | 41 |
| 37 private: | 42 private: |
| 38 LocalCredential(WebLocalCredential*); | 43 LocalCredential(WebLocalCredential*); |
| 39 LocalCredential(const String& id, const String& password, const String& name , const KURL& avatar); | 44 LocalCredential(const String& id, const String& password, const String& name , const KURL& avatar); |
| 45 | |
| 46 RefPtrWillBeRawPtr<DOMFormData> m_formData; | |
|
haraken
2014/10/20 08:16:03
This should be RefPtrWillBeMember<DOMFormData>.
Mike West
2014/10/20 09:47:38
Done.
| |
| 40 }; | 47 }; |
| 41 | 48 |
| 42 } // namespace blink | 49 } // namespace blink |
| 43 | 50 |
| 44 #endif // Credential_h | 51 #endif // LocalCredential_h |
| OLD | NEW |