| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // This file provides the embedder's side of random webkit glue functions. | 5 // This file provides the embedder's side of random webkit glue functions. |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
| 10 #include <windows.h> | 10 #include <windows.h> |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 ResourceDispatcher* dispatcher = GetResourceDispatcher(webframe); | 295 ResourceDispatcher* dispatcher = GetResourceDispatcher(webframe); |
| 296 if (!dispatcher) { | 296 if (!dispatcher) { |
| 297 DLOG(WARNING) << "no resource dispatcher"; | 297 DLOG(WARNING) << "no resource dispatcher"; |
| 298 return NULL; | 298 return NULL; |
| 299 } | 299 } |
| 300 return dispatcher->CreateBridge(method, url, policy_url, referrer, headers, | 300 return dispatcher->CreateBridge(method, url, policy_url, referrer, headers, |
| 301 load_flags, origin_pid, resource_type, | 301 load_flags, origin_pid, resource_type, |
| 302 mixed_content, 0); | 302 mixed_content, 0); |
| 303 } | 303 } |
| 304 | 304 |
| 305 void SetCookie(const GURL& url, const GURL& policy_url, |
| 306 const std::string& cookie) { |
| 307 RenderThread::current()->Send(new ViewHostMsg_SetCookie(url, policy_url, cooki
e)); |
| 308 } |
| 309 |
| 310 std::string GetCookies(const GURL& url, const GURL& policy_url) { |
| 311 std::string cookies; |
| 312 RenderThread::current()->Send(new ViewHostMsg_GetCookies(url, policy_url, &coo
kies)); |
| 313 return cookies; |
| 314 } |
| 315 |
| 305 void NotifyCacheStats() { | 316 void NotifyCacheStats() { |
| 306 // Update the browser about our cache | 317 // Update the browser about our cache |
| 307 // NOTE: Since this can be called from the plugin process, we might not have | 318 // NOTE: Since this can be called from the plugin process, we might not have |
| 308 // a RenderThread. Do nothing in that case. | 319 // a RenderThread. Do nothing in that case. |
| 309 if (!IsPluginProcess()) | 320 if (!IsPluginProcess()) |
| 310 RenderThread::current()->InformHostOfCacheStatsLater(); | 321 RenderThread::current()->InformHostOfCacheStatsLater(); |
| 311 } | 322 } |
| 312 | 323 |
| 313 #endif // !USING_SIMPLE_RESOURCE_LOADER_BRIDGE | 324 #endif // !USING_SIMPLE_RESOURCE_LOADER_BRIDGE |
| 314 | 325 |
| 315 } // namespace webkit_glue | 326 } // namespace webkit_glue |
| OLD | NEW |