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

Side by Side Diff: third_party/WebKit/Source/modules/credentialmanager/Credential.h

Issue 1828213002: CREDENTIAL: Implement the 'PasswordCredential(HTMLFormElement)' constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: EXPORT2 Created 4 years, 8 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 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 "modules/ModulesExport.h"
9 #include "platform/credentialmanager/PlatformCredential.h" 10 #include "platform/credentialmanager/PlatformCredential.h"
10 #include "platform/heap/Handle.h" 11 #include "platform/heap/Handle.h"
11 #include "platform/weborigin/KURL.h" 12 #include "platform/weborigin/KURL.h"
12 13
13 namespace blink { 14 namespace blink {
14 15
15 class ExceptionState; 16 class ExceptionState;
16 17
17 class Credential : public GarbageCollectedFinalized<Credential>, public ScriptWr appable { 18 class MODULES_EXPORT Credential : public GarbageCollectedFinalized<Credential>, public ScriptWrappable {
18 DEFINE_WRAPPERTYPEINFO(); 19 DEFINE_WRAPPERTYPEINFO();
19 public: 20 public:
20 virtual ~Credential(); 21 virtual ~Credential();
21 22
22 // Credential.idl 23 // Credential.idl
23 const String& id() const { return m_platformCredential->id(); } 24 const String& id() const { return m_platformCredential->id(); }
24 const String& name() const { return m_platformCredential->name(); } 25 const String& name() const { return m_platformCredential->name(); }
25 const KURL& iconURL() const { return m_platformCredential->iconURL(); } 26 const KURL& iconURL() const { return m_platformCredential->iconURL(); }
26 const String& type() const { return m_platformCredential->type(); } 27 const String& type() const { return m_platformCredential->type(); }
27 28
28 DECLARE_VIRTUAL_TRACE(); 29 DECLARE_VIRTUAL_TRACE();
29 30
30 PlatformCredential* getPlatformCredential() const { return m_platformCredent ial; } 31 PlatformCredential* getPlatformCredential() const { return m_platformCredent ial; }
31 32
32 protected: 33 protected:
33 Credential(PlatformCredential*); 34 Credential(PlatformCredential*);
34 Credential(const String& id, const String& name, const KURL& icon); 35 Credential(const String& id, const String& name, const KURL& icon);
35 36
36 // Parses a string as a KURL. Throws an exception via |exceptionState| if an invalid URL is produced. 37 // Parses a string as a KURL. Throws an exception via |exceptionState| if an invalid URL is produced.
37 static KURL parseStringAsURL(const String&, ExceptionState&); 38 static KURL parseStringAsURL(const String&, ExceptionState&);
38 39
39 Member<PlatformCredential> m_platformCredential; 40 Member<PlatformCredential> m_platformCredential;
40 }; 41 };
41 42
42 } // namespace blink 43 } // namespace blink
43 44
44 #endif // Credential_h 45 #endif // Credential_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698