summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 10:37:02 +0000
committerpfeldman@chromium.org <pfeldman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-10-30 10:37:02 +0000
commitc567b48d1af4239266f99c7c79611f07723b2704 (patch)
treec5eb4a5ffa1c6df71d405e64f582de85195bef0c /webkit
parent6f32e7e3660ebdf9a13a8c96d83f1a52d0d9341c (diff)
downloadchromium_src-c567b48d1af4239266f99c7c79611f07723b2704.zip
chromium_src-c567b48d1af4239266f99c7c79611f07723b2704.tar.gz
chromium_src-c567b48d1af4239266f99c7c79611f07723b2704.tar.bz2
DevTools: Implementation for the API introduced upstream. To be landed once API is rolled.
Review URL: http://codereview.chromium.org/342037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/api/src/ChromiumBridge.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/webkit/api/src/ChromiumBridge.cpp b/webkit/api/src/ChromiumBridge.cpp
index ab8393c..946e252 100644
--- a/webkit/api/src/ChromiumBridge.cpp
+++ b/webkit/api/src/ChromiumBridge.cpp
@@ -34,6 +34,7 @@
#include <googleurl/src/url_util.h>
#include "WebClipboard.h"
+#include "WebCookie.h"
#include "WebData.h"
#include "WebImage.h"
#include "WebKit.h"
@@ -42,6 +43,7 @@
#include "WebPluginContainerImpl.h"
#include "WebPluginListBuilderImpl.h"
#include "WebString.h"
+#include "WebVector.h"
#include "WebURL.h"
#include "Worker.h"
#include "WorkerContextProxy.h"
@@ -62,6 +64,7 @@
#endif
#include "BitmapImage.h"
+#include "Cookie.h"
#include "GraphicsContext.h"
#include "KURL.h"
#include "NotImplemented.h"
@@ -148,6 +151,33 @@ String ChromiumBridge::cookies(const KURL& url,
return webKitClient()->cookies(url, firstPartyForCookies);
}
+bool ChromiumBridge::rawCookies(const KURL& url, const KURL& firstPartyForCookies, Vector<Cookie>* rawCookies)
+{
+ rawCookies->clear();
+ WebVector<WebCookie> webCookies;
+ if (!webKitClient()->rawCookies(url, firstPartyForCookies, &webCookies))
+ return false;
+
+ for (unsigned i = 0; i < webCookies.size(); ++i) {
+ const WebCookie& webCookie = webCookies[i];
+ Cookie cookie(webCookie.name,
+ webCookie.value,
+ webCookie.domain,
+ webCookie.path,
+ webCookie.expires,
+ webCookie.httpOnly,
+ webCookie.secure,
+ webCookie.session);
+ rawCookies->append(cookie);
+ }
+ return true;
+}
+
+void ChromiumBridge::deleteCookie(const KURL& url, const String& cookieName)
+{
+ webKitClient()->deleteCookie(url, cookieName);
+}
+
// DNS ------------------------------------------------------------------------
void ChromiumBridge::prefetchDNS(const String& hostname)