summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/renderer_glue.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 01:13:47 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-28 01:13:47 +0000
commit90a3fbb1723ba60bcf557121b7bbe80817a7533f (patch)
tree28d845ed0f1d64cdfa418f4561af4536de6f3c40 /chrome/renderer/renderer_glue.cc
parent41fb1d7d262e44d8561a5c4d6d7e353f638b56e8 (diff)
downloadchromium_src-90a3fbb1723ba60bcf557121b7bbe80817a7533f.zip
chromium_src-90a3fbb1723ba60bcf557121b7bbe80817a7533f.tar.gz
chromium_src-90a3fbb1723ba60bcf557121b7bbe80817a7533f.tar.bz2
Chrome side to pick up new WebKit API changes.
WebKit API now provides: - layoutTestMode - support for registering extra local URL schemes - access to the current WebKitClient WebKitClient was extended to include: - access to the default locale - access to the current time - methods to start/stop the shared timer - method to get work scheduled on the main thread - methods to access cookies - method to prefetch hostnames R=dglazkov Review URL: http://codereview.chromium.org/27276 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10665 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_glue.cc')
-rw-r--r--chrome/renderer/renderer_glue.cc29
1 files changed, 10 insertions, 19 deletions
diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc
index 1058698..97a26ff 100644
--- a/chrome/renderer/renderer_glue.cc
+++ b/chrome/renderer/renderer_glue.cc
@@ -28,6 +28,10 @@
#include "webkit/glue/webframe.h"
#include "webkit/glue/webkit_glue.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+#include "WebString.h"
+
#include <vector>
#include "SkBitmap.h"
@@ -156,16 +160,14 @@ bool IsMediaPlayerAvailable() {
return g_media_player_available;
}
-void PrefetchDns(const std::string& hostname) {
- if (!hostname.empty())
- DnsPrefetchCString(hostname.c_str(), hostname.length());
-}
-
void PrecacheUrl(const wchar_t* url, int url_length) {
// TBD: jar: Need implementation that loads the targetted URL into our cache.
// For now, at least prefetch DNS lookup
- GURL parsed_url(WideToUTF8(std::wstring(url, url_length)));
- PrefetchDns(parsed_url.host());
+ std::string url_string;
+ WideToUTF8(url, url_length, &url_string);
+ const std::string host = GURL(url_string).host();
+ if (!host.empty())
+ DnsPrefetchCString(host.data(), host.length());
}
void AppendToLog(const char* file, int line, const char* msg) {
@@ -226,7 +228,7 @@ GURL GetInspectorURL() {
}
std::string GetUIResourceProtocol() {
- return "chrome";
+ return "chrome-ui";
}
bool GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) {
@@ -300,17 +302,6 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create(
mixed_content, 0);
}
-void SetCookie(const GURL& url, const GURL& policy_url,
- const std::string& cookie) {
- RenderThread::current()->Send(new ViewHostMsg_SetCookie(url, policy_url, cookie));
-}
-
-std::string GetCookies(const GURL& url, const GURL& policy_url) {
- std::string cookies;
- RenderThread::current()->Send(new ViewHostMsg_GetCookies(url, policy_url, &cookies));
- return cookies;
-}
-
void NotifyCacheStats() {
// Update the browser about our cache
// NOTE: Since this can be called from the plugin process, we might not have