| 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 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 const GURL& first_party_for_cookies, | 218 const GURL& first_party_for_cookies, |
| 219 const GURL& referrer, | 219 const GURL& referrer, |
| 220 const std::string& frame_origin, | 220 const std::string& frame_origin, |
| 221 const std::string& main_frame_origin, | 221 const std::string& main_frame_origin, |
| 222 const std::string& headers, | 222 const std::string& headers, |
| 223 int load_flags, | 223 int load_flags, |
| 224 int origin_pid, | 224 int origin_pid, |
| 225 ResourceType::Type resource_type, | 225 ResourceType::Type resource_type, |
| 226 int app_cache_context_id, | 226 int app_cache_context_id, |
| 227 int routing_id) { | 227 int routing_id) { |
| 228 ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher(); | 228 ResourceDispatcher* dispatch = ChildThread::current()->resource_dispatcher(); |
| 229 return dispatch->CreateBridge(method, url, first_party_for_cookies, referrer, | 229 return dispatch->CreateBridge(method, url, first_party_for_cookies, referrer, |
| 230 frame_origin, main_frame_origin, headers, | 230 frame_origin, main_frame_origin, headers, |
| 231 load_flags, origin_pid, resource_type, 0, | 231 load_flags, origin_pid, resource_type, 0, |
| 232 app_cache_context_id, routing_id); | 232 app_cache_context_id, routing_id); |
| 233 } | 233 } |
| 234 | 234 |
| 235 void NotifyCacheStats() { | 235 void NotifyCacheStats() { |
| 236 // Update the browser about our cache | 236 // Update the browser about our cache |
| 237 // NOTE: Since this can be called from the plugin process, we might not have | 237 // NOTE: Since this can be called from the plugin process, we might not have |
| 238 // a RenderThread. Do nothing in that case. | 238 // a RenderThread. Do nothing in that case. |
| 239 if (!IsPluginProcess()) | 239 if (RenderThread::current()) |
| 240 RenderThread::current()->InformHostOfCacheStatsLater(); | 240 RenderThread::current()->InformHostOfCacheStatsLater(); |
| 241 } | 241 } |
| 242 | 242 |
| 243 void CloseIdleConnections() { | 243 void CloseIdleConnections() { |
| 244 RenderThread::current()->CloseIdleConnections(); | 244 RenderThread::current()->CloseIdleConnections(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 void SetCacheMode(bool enabled) { | 247 void SetCacheMode(bool enabled) { |
| 248 RenderThread::current()->SetCacheMode(enabled); | 248 RenderThread::current()->SetCacheMode(enabled); |
| 249 } | 249 } |
| 250 | 250 |
| 251 } // namespace webkit_glue | 251 } // namespace webkit_glue |
| OLD | NEW |