| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 192 void ClipboardReadAsciiText(Clipboard::Buffer buffer, std::string* result) { | 192 void ClipboardReadAsciiText(Clipboard::Buffer buffer, std::string* result) { |
| 193 RenderThread::current()->Send(new ViewHostMsg_ClipboardReadAsciiText(buffer, | 193 RenderThread::current()->Send(new ViewHostMsg_ClipboardReadAsciiText(buffer, |
| 194 result)); | 194 result)); |
| 195 } | 195 } |
| 196 | 196 |
| 197 void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url) { | 197 void ClipboardReadHTML(Clipboard::Buffer buffer, string16* markup, GURL* url) { |
| 198 RenderThread::current()->Send(new ViewHostMsg_ClipboardReadHTML(buffer, | 198 RenderThread::current()->Send(new ViewHostMsg_ClipboardReadHTML(buffer, |
| 199 markup, url)); | 199 markup, url)); |
| 200 } | 200 } |
| 201 | 201 |
| 202 GURL GetInspectorURL() { | |
| 203 return GURL(std::string(chrome::kChromeUIScheme) + | |
| 204 "://inspector/inspector.html"); | |
| 205 } | |
| 206 | |
| 207 std::string GetUIResourceProtocol() { | |
| 208 return "chrome"; | |
| 209 } | |
| 210 | |
| 211 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { | 202 void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { |
| 212 if (!RenderThread::current()->plugin_refresh_allowed()) | 203 if (!RenderThread::current()->plugin_refresh_allowed()) |
| 213 refresh = false; | 204 refresh = false; |
| 214 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); | 205 RenderThread::current()->Send(new ViewHostMsg_GetPlugins(refresh, plugins)); |
| 215 } | 206 } |
| 216 | 207 |
| 217 bool IsProtocolSupportedForMedia(const GURL& url) { | 208 bool IsProtocolSupportedForMedia(const GURL& url) { |
| 218 // If new protocol is to be added here, we need to make sure the response is | 209 // If new protocol is to be added here, we need to make sure the response is |
| 219 // validated accordingly in the media engine. | 210 // validated accordingly in the media engine. |
| 220 if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || | 211 if (url.SchemeIsFile() || url.SchemeIs(chrome::kHttpScheme) || |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 | 256 |
| 266 void CloseIdleConnections() { | 257 void CloseIdleConnections() { |
| 267 RenderThread::current()->CloseIdleConnections(); | 258 RenderThread::current()->CloseIdleConnections(); |
| 268 } | 259 } |
| 269 | 260 |
| 270 void SetCacheMode(bool enabled) { | 261 void SetCacheMode(bool enabled) { |
| 271 RenderThread::current()->SetCacheMode(enabled); | 262 RenderThread::current()->SetCacheMode(enabled); |
| 272 } | 263 } |
| 273 | 264 |
| 274 } // namespace webkit_glue | 265 } // namespace webkit_glue |
| OLD | NEW |