| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 |
| 11 #if defined(OS_WIN) | 11 #if defined(OS_WIN) |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 std::string GetUIResourceProtocol() { | 205 std::string GetUIResourceProtocol() { |
| 206 return "chrome"; | 206 return "chrome"; |
| 207 } | 207 } |
| 208 | 208 |
| 209 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 209 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 210 if (!RenderThread::current()->plugin_refresh_allowed()) | 210 if (!RenderThread::current()->plugin_refresh_allowed()) |
| 211 refresh = false; | 211 refresh = false; |
| 212 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); | 212 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); |
| 213 } | 213 } |
| 214 | 214 |
| 215 bool IsProtocolSupportedForMedia(const GURL& url) { |
| 216 // If new protocol is to be added here, we need to make sure the response is |
| 217 // validated accordingly in the media engine. |
| 218 if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || |
| 219 url.SchemeIs(chrome::kHttpsScheme) || |
| 220 url.SchemeIs(chrome::kExtensionScheme)) |
| 221 return true; |
| 222 return false; |
| 223 } |
| 224 |
| 215 // static factory function | 225 // static factory function |
| 216 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 226 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 217 const std::string& method, | 227 const std::string& method, |
| 218 const GURL& url, | 228 const GURL& url, |
| 219 const GURL& first_party_for_cookies, | 229 const GURL& first_party_for_cookies, |
| 220 const GURL& referrer, | 230 const GURL& referrer, |
| 221 const std::string& frame_origin, | 231 const std::string& frame_origin, |
| 222 const std::string& main_frame_origin, | 232 const std::string& main_frame_origin, |
| 223 const std::string& headers, | 233 const std::string& headers, |
| 224 int load_flags, | 234 int load_flags, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 243 | 253 |
| 244 void CloseIdleConnections() { | 254 void CloseIdleConnections() { |
| 245 RenderThread::current()->CloseIdleConnections(); | 255 RenderThread::current()->CloseIdleConnections(); |
| 246 } | 256 } |
| 247 | 257 |
| 248 void SetCacheMode(bool enabled) { | 258 void SetCacheMode(bool enabled) { |
| 249 RenderThread::current()->SetCacheMode(enabled); | 259 RenderThread::current()->SetCacheMode(enabled); |
| 250 } | 260 } |
| 251 | 261 |
| 252 } // namespace webkit_glue | 262 } // namespace webkit_glue |
| OLD | NEW |