summaryrefslogtreecommitdiffstats
path: root/webkit/glue
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 16:07:21 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-29 16:07:21 +0000
commit971713ef6b3cb00c871a3420b890c0feeb80d605 (patch)
tree0df6925f83f162737a2b7813a5e19e7a6b8f228a /webkit/glue
parent2add77b802f0f5cab795a0a4d9ecb48003447d51 (diff)
downloadchromium_src-971713ef6b3cb00c871a3420b890c0feeb80d605.zip
chromium_src-971713ef6b3cb00c871a3420b890c0feeb80d605.tar.gz
chromium_src-971713ef6b3cb00c871a3420b890c0feeb80d605.tar.bz2
DevTools: Implement raw cookies access for inspector.
Review URL: http://codereview.chromium.org/294025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30457 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue')
-rw-r--r--webkit/glue/webcookie.h66
-rw-r--r--webkit/glue/webkitclient_impl.cc18
-rw-r--r--webkit/glue/webkitclient_impl.h5
3 files changed, 89 insertions, 0 deletions
diff --git a/webkit/glue/webcookie.h b/webkit/glue/webcookie.h
new file mode 100644
index 0000000..4966c442
--- /dev/null
+++ b/webkit/glue/webcookie.h
@@ -0,0 +1,66 @@
+// Copyright (c) 2006-2008 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.
+//
+// A struct for managing data being dropped on a webview. This represents a
+// union of all the types of data that can be dropped in a platform neutral
+// way.
+
+#ifndef WEBKIT_GLUE_WEBCOOKIE_H_
+#define WEBKIT_GLUE_WEBCOOKIE_H_
+
+#include <string>
+
+namespace webkit_glue {
+
+struct WebCookie {
+
+ WebCookie(const std::string& name, const std::string& value,
+ const std::string& domain, const std::string& path, double expires,
+ bool http_only, bool secure, bool session)
+ : name(name),
+ value(value),
+ domain(domain),
+ path(path),
+ expires(expires),
+ http_only(http_only),
+ secure(secure),
+ session(session) {
+ }
+
+ // For default constructions.
+ WebCookie() :
+ expires(0),
+ http_only(false),
+ secure(false),
+ session(false) {
+ }
+
+ // Cookie name.
+ std::string name;
+
+ // Cookie value.
+ std::string value;
+
+ // Cookie domain.
+ std::string domain;
+
+ // Cookie path.
+ std::string path;
+
+ // Cookie expires param if any.
+ double expires;
+
+ // Cookie HTTPOnly param.
+ bool http_only;
+
+ // Cookie secure param.
+ bool secure;
+
+ // Session cookie flag.
+ bool session;
+};
+
+} // namespace webkit_glue
+
+#endif // WEBKIT_GLUE_WEBCOOKIE_H_
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 2d2e27f..e3fd73f 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -22,12 +22,15 @@
#include "grit/webkit_resources.h"
#include "grit/webkit_strings.h"
#include "net/base/net_util.h"
+#include "webkit/api/public/WebCookie.h"
#include "webkit/api/public/WebCursorInfo.h"
#include "webkit/api/public/WebData.h"
#include "webkit/api/public/WebFrameClient.h"
#include "webkit/api/public/WebPluginListBuilder.h"
#include "webkit/api/public/WebScreenInfo.h"
#include "webkit/api/public/WebString.h"
+#include "webkit/api/public/WebVector.h"
+#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebViewClient.h"
#include "webkit/api/src/ChromeClientImpl.h"
#include "webkit/glue/glue_util.h"
@@ -42,6 +45,7 @@
using WebKit::ChromeClientImpl;
using WebKit::WebApplicationCacheHost;
using WebKit::WebApplicationCacheHostClient;
+using WebKit::WebCookie;
using WebKit::WebCursorInfo;
using WebKit::WebData;
using WebKit::WebLocalizedString;
@@ -50,7 +54,9 @@ using WebKit::WebStorageNamespace;
using WebKit::WebString;
using WebKit::WebSocketStreamHandle;
using WebKit::WebThemeEngine;
+using WebKit::WebURL;
using WebKit::WebURLLoader;
+using WebKit::WebVector;
using WebKit::WebWidgetClient;
namespace {
@@ -153,6 +159,18 @@ WebThemeEngine* WebKitClientImpl::themeEngine() {
#endif
}
+bool WebKitClientImpl::rawCookies(const WebURL& url,
+ const WebURL& policy_url,
+ WebVector<WebCookie>* raw_cookies) {
+ NOTREACHED();
+ return false;
+}
+
+void WebKitClientImpl::deleteCookie(const WebURL& url,
+ const WebString& cookie_name) {
+ NOTREACHED();
+}
+
WebURLLoader* WebKitClientImpl::createURLLoader() {
return new WebURLLoaderImpl();
}
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index e6f5c42..284d6d3 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -22,6 +22,11 @@ class WebKitClientImpl : public WebKit::WebKitClient {
// WebKitClient methods (partial implementation):
virtual WebKit::WebThemeEngine* themeEngine();
+ virtual bool rawCookies(const WebKit::WebURL& url,
+ const WebKit::WebURL& policy_url,
+ WebKit::WebVector<WebKit::WebCookie>*);
+ virtual void deleteCookie(const WebKit::WebURL& url,
+ const WebKit::WebString& cookie_name);
virtual WebKit::WebURLLoader* createURLLoader();
virtual WebKit::WebSocketStreamHandle* createSocketStreamHandle();
virtual void getPluginList(bool refresh, WebKit::WebPluginListBuilder*);