2012-03-22 23:08:05 +01:00
|
|
|
// Copyright (c) 2012 The Chromium Embedded Framework Authors. All rights
|
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that can
|
|
|
|
// be found in the LICENSE file.
|
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_COOKIE_IMPL_H_
|
|
|
|
#define CEF_LIBCEF_COOKIE_IMPL_H_
|
|
|
|
|
|
|
|
#include "include/cef_cookie.h"
|
2013-02-28 22:54:02 +01:00
|
|
|
#include "base/files/file_path.h"
|
2012-04-05 00:32:24 +02:00
|
|
|
#include "net/cookies/cookie_monster.h"
|
2012-03-22 23:08:05 +01:00
|
|
|
|
|
|
|
// Implementation of the CefCookieManager interface.
|
|
|
|
class CefCookieManagerImpl : public CefCookieManager {
|
|
|
|
public:
|
2012-03-29 18:51:31 +02:00
|
|
|
CefCookieManagerImpl(bool is_global);
|
2012-03-22 23:08:05 +01:00
|
|
|
|
|
|
|
~CefCookieManagerImpl();
|
|
|
|
|
|
|
|
// CefCookieManager methods.
|
2012-04-03 21:24:37 +02:00
|
|
|
virtual void SetSupportedSchemes(const std::vector<CefString>& schemes)
|
|
|
|
OVERRIDE;
|
2012-03-22 23:08:05 +01:00
|
|
|
virtual bool VisitAllCookies(CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
|
|
|
virtual bool VisitUrlCookies(const CefString& url, bool includeHttpOnly,
|
|
|
|
CefRefPtr<CefCookieVisitor> visitor) OVERRIDE;
|
|
|
|
virtual bool SetCookie(const CefString& url,
|
|
|
|
const CefCookie& cookie) OVERRIDE;
|
|
|
|
virtual bool DeleteCookies(const CefString& url,
|
|
|
|
const CefString& cookie_name) OVERRIDE;
|
|
|
|
virtual bool SetStoragePath(const CefString& path) OVERRIDE;
|
|
|
|
|
|
|
|
net::CookieMonster* cookie_monster() { return cookie_monster_; }
|
|
|
|
|
|
|
|
private:
|
|
|
|
scoped_refptr<net::CookieMonster> cookie_monster_;
|
|
|
|
bool is_global_;
|
2013-02-26 00:44:37 +01:00
|
|
|
base::FilePath storage_path_;
|
2012-03-22 23:08:05 +01:00
|
|
|
|
|
|
|
IMPLEMENT_REFCOUNTING(CefCookieManagerImpl);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_COOKIE_IMPL_H_
|