summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_webcookiejar_impl.h
blob: 0b1ed355eb263b140e42692c8471d1ab571afaa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2010 The Chromium 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 CHROME_RENDERER_RENDERER_WEBCOOKIEJAR_IMPL_H_
#define CHROME_RENDERER_RENDERER_WEBCOOKIEJAR_IMPL_H_

#include "ipc/ipc_message.h"
// TODO(darin): WebCookieJar.h is missing a WebString.h include!
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h"

namespace IPC {
class SyncMessage;
}

class RendererWebCookieJarImpl : public WebKit::WebCookieJar {
 public:
  explicit RendererWebCookieJarImpl(IPC::Message::Sender* sender)
      : sender_(sender) {
  }

 private:
  // WebKit::WebCookieJar methods:
  virtual void setCookie(
      const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies,
      const WebKit::WebString& value);
  virtual WebKit::WebString cookies(
      const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies);
  virtual WebKit::WebString cookieRequestHeaderFieldValue(
      const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies);
  virtual void rawCookies(
      const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies,
      WebKit::WebVector<WebKit::WebCookie>& cookies);
  virtual void deleteCookie(
      const WebKit::WebURL& url, const WebKit::WebString& cookie_name);
  virtual bool cookiesEnabled(
      const WebKit::WebURL& url, const WebKit::WebURL& first_party_for_cookies);

  IPC::Message::Sender* sender_;
};

#endif  // CHROME_RENDERER_RENDERER_WEBCOOKIEJAR_IMPL_H_