| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 std::string GetUIResourceProtocol() { | 213 std::string GetUIResourceProtocol() { |
| 214 return "chrome-ui"; | 214 return "chrome-ui"; |
| 215 } | 215 } |
| 216 | 216 |
| 217 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 217 bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 218 return RenderThread::current()->Send( | 218 return RenderThread::current()->Send( |
| 219 new ViewHostMsg_GetPlugins(refresh, plugins)); | 219 new ViewHostMsg_GetPlugins(refresh, plugins)); |
| 220 } | 220 } |
| 221 | 221 |
| 222 webkit_glue::ScreenInfo GetScreenInfo(gfx::NativeViewId window) { | |
| 223 webkit_glue::ScreenInfo results; | |
| 224 RenderThread::current()->Send( | |
| 225 new ViewHostMsg_GetScreenInfo(window, &results)); | |
| 226 return results; | |
| 227 } | |
| 228 | |
| 229 // static factory function | 222 // static factory function |
| 230 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 223 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 231 const std::string& method, | 224 const std::string& method, |
| 232 const GURL& url, | 225 const GURL& url, |
| 233 const GURL& policy_url, | 226 const GURL& policy_url, |
| 234 const GURL& referrer, | 227 const GURL& referrer, |
| 235 const std::string& frame_origin, | 228 const std::string& frame_origin, |
| 236 const std::string& main_frame_origin, | 229 const std::string& main_frame_origin, |
| 237 const std::string& headers, | 230 const std::string& headers, |
| 238 const std::string& default_mime_type, | 231 const std::string& default_mime_type, |
| (...skipping 11 matching lines...) Expand all Loading... |
| 250 void NotifyCacheStats() { | 243 void NotifyCacheStats() { |
| 251 // Update the browser about our cache | 244 // Update the browser about our cache |
| 252 // NOTE: Since this can be called from the plugin process, we might not have | 245 // NOTE: Since this can be called from the plugin process, we might not have |
| 253 // a RenderThread. Do nothing in that case. | 246 // a RenderThread. Do nothing in that case. |
| 254 if (!IsPluginProcess()) | 247 if (!IsPluginProcess()) |
| 255 RenderThread::current()->InformHostOfCacheStatsLater(); | 248 RenderThread::current()->InformHostOfCacheStatsLater(); |
| 256 } | 249 } |
| 257 | 250 |
| 258 | 251 |
| 259 } // namespace webkit_glue | 252 } // namespace webkit_glue |
| OLD | NEW |