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 3// found in the LICENSE file. 4 5#ifndef WebCredential_h 6#define WebCredential_h 7 8#include "public/platform/WebCommon.h" 9#include "public/platform/WebPrivatePtr.h" 10#include "public/platform/WebString.h" 11#include "public/platform/WebURL.h" 12 13namespace blink { 14 15class PlatformCredential; 16 17class WebCredential { 18public: 19 BLINK_PLATFORM_EXPORT WebCredential(const WebString& id, const WebString& name, const WebURL& avatarURL); 20 ~WebCredential() { reset(); } 21 22 BLINK_PLATFORM_EXPORT void assign(const WebCredential&); 23 BLINK_PLATFORM_EXPORT void reset(); 24 25 BLINK_PLATFORM_EXPORT WebString id() const; 26 BLINK_PLATFORM_EXPORT WebString name() const; 27 BLINK_PLATFORM_EXPORT WebURL avatarURL() const; 28 29#if INSIDE_BLINK 30 BLINK_PLATFORM_EXPORT WebCredential(PlatformCredential*); 31 BLINK_PLATFORM_EXPORT WebCredential& operator=(PlatformCredential*); 32 BLINK_PLATFORM_EXPORT PlatformCredential* platformCredential() const { return m_platformCredential.get(); } 33#endif 34 35protected: 36 WebPrivatePtr<PlatformCredential> m_platformCredential; 37}; 38 39} // namespace blink 40 41#endif // WebCredential_h 42