OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 16 matching lines...) Expand all Loading... |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #include "config.h" | 31 #include "config.h" |
32 #include "ChromiumBridge.h" | 32 #include "ChromiumBridge.h" |
33 | 33 |
34 #include <googleurl/src/url_util.h> | 34 #include <googleurl/src/url_util.h> |
35 | 35 |
36 #include "WebClipboard.h" | 36 #include "WebClipboard.h" |
| 37 #include "WebCookie.h" |
37 #include "WebData.h" | 38 #include "WebData.h" |
38 #include "WebImage.h" | 39 #include "WebImage.h" |
39 #include "WebKit.h" | 40 #include "WebKit.h" |
40 #include "WebKitClient.h" | 41 #include "WebKitClient.h" |
41 #include "WebMimeRegistry.h" | 42 #include "WebMimeRegistry.h" |
42 #include "WebPluginContainerImpl.h" | 43 #include "WebPluginContainerImpl.h" |
43 #include "WebPluginListBuilderImpl.h" | 44 #include "WebPluginListBuilderImpl.h" |
44 #include "WebString.h" | 45 #include "WebString.h" |
| 46 #include "WebVector.h" |
45 #include "WebURL.h" | 47 #include "WebURL.h" |
46 #include "Worker.h" | 48 #include "Worker.h" |
47 #include "WorkerContextProxy.h" | 49 #include "WorkerContextProxy.h" |
48 | 50 |
49 #if PLATFORM(WIN_OS) | 51 #if PLATFORM(WIN_OS) |
50 #include "WebRect.h" | 52 #include "WebRect.h" |
51 #include "WebSandboxSupport.h" | 53 #include "WebSandboxSupport.h" |
52 #include "WebThemeEngine.h" | 54 #include "WebThemeEngine.h" |
53 #endif | 55 #endif |
54 | 56 |
55 #if PLATFORM(LINUX) | 57 #if PLATFORM(LINUX) |
56 #include "WebSandboxSupport.h" | 58 #include "WebSandboxSupport.h" |
57 #include "WebFontInfo.h" | 59 #include "WebFontInfo.h" |
58 #endif | 60 #endif |
59 | 61 |
60 #if WEBKIT_USING_SKIA | 62 #if WEBKIT_USING_SKIA |
61 #include "NativeImageSkia.h" | 63 #include "NativeImageSkia.h" |
62 #endif | 64 #endif |
63 | 65 |
64 #include "BitmapImage.h" | 66 #include "BitmapImage.h" |
| 67 #include "Cookie.h" |
65 #include "GraphicsContext.h" | 68 #include "GraphicsContext.h" |
66 #include "KURL.h" | 69 #include "KURL.h" |
67 #include "NotImplemented.h" | 70 #include "NotImplemented.h" |
68 #include "PlatformContextSkia.h" | 71 #include "PlatformContextSkia.h" |
69 #include "PluginData.h" | 72 #include "PluginData.h" |
70 #include <wtf/Assertions.h> | 73 #include <wtf/Assertions.h> |
71 | 74 |
72 // We are part of the WebKit implementation. | 75 // We are part of the WebKit implementation. |
73 using namespace WebKit; | 76 using namespace WebKit; |
74 | 77 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 { | 144 { |
142 webKitClient()->setCookies(url, firstPartyForCookies, cookie); | 145 webKitClient()->setCookies(url, firstPartyForCookies, cookie); |
143 } | 146 } |
144 | 147 |
145 String ChromiumBridge::cookies(const KURL& url, | 148 String ChromiumBridge::cookies(const KURL& url, |
146 const KURL& firstPartyForCookies) | 149 const KURL& firstPartyForCookies) |
147 { | 150 { |
148 return webKitClient()->cookies(url, firstPartyForCookies); | 151 return webKitClient()->cookies(url, firstPartyForCookies); |
149 } | 152 } |
150 | 153 |
| 154 bool ChromiumBridge::rawCookies(const KURL& url, Vector<Cookie>* rawCookies) |
| 155 { |
| 156 rawCookies->clear(); |
| 157 WebVector<WebCookie> webCookies; |
| 158 if (!webKitClient()->rawCookies(url, WebURL(), &webCookies)) |
| 159 return false; |
| 160 |
| 161 for (unsigned i = 0; i < webCookies.size(); ++i) { |
| 162 const WebCookie& webCookie = webCookies[i]; |
| 163 Cookie cookie(webCookie.name, |
| 164 webCookie.value, |
| 165 webCookie.domain, |
| 166 webCookie.path, |
| 167 webCookie.expires, |
| 168 webCookie.httpOnly, |
| 169 webCookie.secure, |
| 170 webCookie.session); |
| 171 rawCookies->append(cookie); |
| 172 } |
| 173 return true; |
| 174 } |
| 175 |
| 176 void ChromiumBridge::deleteCookie(const KURL& url, const String& cookieName) |
| 177 { |
| 178 webKitClient()->deleteCookie(url, cookieName); |
| 179 } |
| 180 |
151 // DNS ------------------------------------------------------------------------ | 181 // DNS ------------------------------------------------------------------------ |
152 | 182 |
153 void ChromiumBridge::prefetchDNS(const String& hostname) | 183 void ChromiumBridge::prefetchDNS(const String& hostname) |
154 { | 184 { |
155 webKitClient()->prefetchHostName(hostname); | 185 webKitClient()->prefetchHostName(hostname); |
156 } | 186 } |
157 | 187 |
158 // File ------------------------------------------------------------------------ | 188 // File ------------------------------------------------------------------------ |
159 | 189 |
160 bool ChromiumBridge::fileExists(const String& path) | 190 bool ChromiumBridge::fileExists(const String& path) |
(...skipping 431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 { | 622 { |
593 return webKitClient()->widgetSetFocus(widget); | 623 return webKitClient()->widgetSetFocus(widget); |
594 } | 624 } |
595 | 625 |
596 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) | 626 WorkerContextProxy* WorkerContextProxy::create(Worker* worker) |
597 { | 627 { |
598 return webKitClient()->createWorkerContextProxy(worker); | 628 return webKitClient()->createWorkerContextProxy(worker); |
599 } | 629 } |
600 | 630 |
601 } // namespace WebCore | 631 } // namespace WebCore |
OLD | NEW |