| 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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 208 | 208 |
| 209 GURL GetInspectorURL() { | 209 GURL GetInspectorURL() { |
| 210 return GURL("chrome-ui://inspector/inspector.html"); | 210 return GURL("chrome-ui://inspector/inspector.html"); |
| 211 } | 211 } |
| 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 if (!RenderThread::current()->plugin_refresh_allowed()) |
| 219 new ViewHostMsg_GetPlugins(refresh, plugins)); | 219 refresh = false; |
| 220 return RenderThread::current()->Send(new ViewHostMsg_GetPlugins( |
| 221 refresh, plugins)); |
| 220 } | 222 } |
| 221 | 223 |
| 222 // static factory function | 224 // static factory function |
| 223 ResourceLoaderBridge* ResourceLoaderBridge::Create( | 225 ResourceLoaderBridge* ResourceLoaderBridge::Create( |
| 224 const std::string& method, | 226 const std::string& method, |
| 225 const GURL& url, | 227 const GURL& url, |
| 226 const GURL& policy_url, | 228 const GURL& policy_url, |
| 227 const GURL& referrer, | 229 const GURL& referrer, |
| 228 const std::string& frame_origin, | 230 const std::string& frame_origin, |
| 229 const std::string& main_frame_origin, | 231 const std::string& main_frame_origin, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 243 void NotifyCacheStats() { | 245 void NotifyCacheStats() { |
| 244 // Update the browser about our cache | 246 // Update the browser about our cache |
| 245 // NOTE: Since this can be called from the plugin process, we might not have | 247 // NOTE: Since this can be called from the plugin process, we might not have |
| 246 // a RenderThread. Do nothing in that case. | 248 // a RenderThread. Do nothing in that case. |
| 247 if (!IsPluginProcess()) | 249 if (!IsPluginProcess()) |
| 248 RenderThread::current()->InformHostOfCacheStatsLater(); | 250 RenderThread::current()->InformHostOfCacheStatsLater(); |
| 249 } | 251 } |
| 250 | 252 |
| 251 | 253 |
| 252 } // namespace webkit_glue | 254 } // namespace webkit_glue |
| OLD | NEW |