diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 06:27:47 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-19 06:27:47 +0000 |
commit | 2c434b3ebbf5deb5f225ac375da9be89c9683c76 (patch) | |
tree | fe7adcb3f446417bed170d3334a2423d2072db21 /chrome/renderer | |
parent | 2d24533e33dca38c64e2a4ec2480eb59b6ef34b6 (diff) | |
download | chromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.zip chromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.tar.gz chromium_src-2c434b3ebbf5deb5f225ac375da9be89c9683c76.tar.bz2 |
Chrome-side of moving webkit/glue/cache_manager.{h,cc} to the WebKit API layer.
This also includes a change to not have third_party/WebKit/WebKit/chromium/public
in the global include path. Most of the code changes pertain to this.
I also took this opportunity to do some renaming:
browser/cache_manager_host -> browser/renderer_host/web_cache_manager
R=brettw
Review URL: http://codereview.chromium.org/42194
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12085 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/render_thread.cc | 24 | ||||
-rw-r--r-- | chrome/renderer/render_view_unittest.cc | 3 | ||||
-rw-r--r-- | chrome/renderer/renderer_glue.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.cc | 5 | ||||
-rw-r--r-- | chrome/renderer/renderer_webkitclient_impl.h | 2 |
5 files changed, 23 insertions, 24 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc index fa81909..fb00145 100644 --- a/chrome/renderer/render_thread.cc +++ b/chrome/renderer/render_thread.cc @@ -29,22 +29,23 @@ #include "chrome/renderer/renderer_webkitclient_impl.h" #include "chrome/renderer/user_script_slave.h" #include "chrome/renderer/visitedlink_slave.h" +#include "third_party/WebKit/WebKit/chromium/public/WebCache.h" +#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "v8/include/v8.h" #include "webkit/extensions/v8/gears_extension.h" #include "webkit/extensions/v8/interval_extension.h" #include "webkit/extensions/v8/playback_extension.h" -#include "webkit/glue/cache_manager.h" - -#include "WebKit.h" -#include "WebString.h" #if defined(OS_WIN) #include <windows.h> #include <objbase.h> #endif -static const unsigned int kCacheStatsDelayMS = 2000 /* milliseconds */; +using WebKit::WebCache; +using WebKit::WebString; +static const unsigned int kCacheStatsDelayMS = 2000 /* milliseconds */; //----------------------------------------------------------------------------- // Methods below are only called on the owner's thread: @@ -196,13 +197,14 @@ void RenderThread::OnSetCacheCapacities(size_t min_dead_capacity, size_t max_dead_capacity, size_t capacity) { EnsureWebKitInitialized(); - CacheManager::SetCapacities(min_dead_capacity, max_dead_capacity, capacity); + WebCache::setCapacities( + min_dead_capacity, max_dead_capacity, capacity); } void RenderThread::OnGetCacheResourceStats() { EnsureWebKitInitialized(); - CacheManager::ResourceTypeStats stats; - CacheManager::GetResourceTypeStats(&stats); + WebCache::ResourceTypeStats stats; + WebCache::getResourceTypeStats(&stats); Send(new ViewHostMsg_ResourceTypeStats(stats)); } @@ -212,8 +214,8 @@ void RenderThread::OnGetRendererHistograms() { void RenderThread::InformHostOfCacheStats() { EnsureWebKitInitialized(); - CacheManager::UsageStats stats; - CacheManager::GetUsageStats(&stats); + WebCache::UsageStats stats; + WebCache::getUsageStats(&stats); Send(new ViewHostMsg_UpdatedCacheStats(stats)); } @@ -240,7 +242,7 @@ void RenderThread::EnsureWebKitInitialized() { // chrome-ui pages should not be accessible by normal content, and should // also be unable to script anything but themselves (to help limit the damage // that a corrupt chrome-ui page could cause). - WebKit::WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); + WebString chrome_ui_scheme(ASCIIToUTF16(chrome::kChromeUIScheme)); WebKit::registerURLSchemeAsLocal(chrome_ui_scheme); WebKit::registerURLSchemeAsNoAccess(chrome_ui_scheme); diff --git a/chrome/renderer/render_view_unittest.cc b/chrome/renderer/render_view_unittest.cc index e81cf4f..9fa394a 100644 --- a/chrome/renderer/render_view_unittest.cc +++ b/chrome/renderer/render_view_unittest.cc @@ -9,13 +9,12 @@ #include "chrome/renderer/render_view.h" #include "chrome/renderer/renderer_webkitclient_impl.h" #include "testing/gtest/include/gtest/gtest.h" +#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" #include "webkit/glue/webframe.h" #include "webkit/glue/webscriptsource.h" #include "webkit/glue/weburlrequest.h" #include "webkit/glue/webview.h" -#include "WebKit.h" - namespace { const int32 kRouteId = 5; diff --git a/chrome/renderer/renderer_glue.cc b/chrome/renderer/renderer_glue.cc index 4cf4577..b6a1a11 100644 --- a/chrome/renderer/renderer_glue.cc +++ b/chrome/renderer/renderer_glue.cc @@ -6,6 +6,8 @@ #include "build/build_config.h" +#include <vector> + #if defined(OS_WIN) #include <windows.h> #include <wininet.h> @@ -22,16 +24,13 @@ #include "chrome/renderer/render_process.h" #include "chrome/renderer/render_thread.h" #include "googleurl/src/url_util.h" +#include "third_party/WebKit/WebKit/chromium/public/WebKit.h" +#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h" +#include "third_party/WebKit/WebKit/chromium/public/WebString.h" #include "webkit/glue/scoped_clipboard_writer_glue.h" #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" #if defined(OS_WIN) @@ -241,7 +240,7 @@ ResourceLoaderBridge* ResourceLoaderBridge::Create( ResourceType::Type resource_type, int routing_id) { ResourceDispatcher* dispatch = RenderThread::current()->resource_dispatcher(); - return dispatch->CreateBridge(method, url, policy_url, referrer, + return dispatch->CreateBridge(method, url, policy_url, referrer, frame_origin, main_frame_origin, headers, load_flags, origin_pid, resource_type, 0, routing_id); diff --git a/chrome/renderer/renderer_webkitclient_impl.cc b/chrome/renderer/renderer_webkitclient_impl.cc index 28d6f73..26eb73d 100644 --- a/chrome/renderer/renderer_webkitclient_impl.cc +++ b/chrome/renderer/renderer_webkitclient_impl.cc @@ -4,9 +4,6 @@ #include "chrome/renderer/renderer_webkitclient_impl.h" -#include "WebString.h" -#include "WebURL.h" - #include "base/command_line.h" #include "chrome/common/chrome_switches.h" #include "chrome/common/render_messages.h" @@ -14,6 +11,8 @@ #include "chrome/renderer/net/render_dns_master.h" #include "chrome/renderer/render_thread.h" #include "chrome/renderer/visitedlink_slave.h" +#include "third_party/WebKit/WebKit/chromium/public/WebString.h" +#include "third_party/WebKit/WebKit/chromium/public/WebURL.h" #include "webkit/glue/glue_util.h" #include "webkit/glue/webkit_glue.h" diff --git a/chrome/renderer/renderer_webkitclient_impl.h b/chrome/renderer/renderer_webkitclient_impl.h index 5eada2a..603cad9 100644 --- a/chrome/renderer/renderer_webkitclient_impl.h +++ b/chrome/renderer/renderer_webkitclient_impl.h @@ -9,7 +9,7 @@ #include "webkit/glue/webkitclient_impl.h" #if defined(OS_WIN) -#include "WebSandboxSupport.h" +#include "third_party/WebKit/WebKit/chromium/public/win/WebSandboxSupport.h" #endif class RendererWebKitClientImpl : public webkit_glue::WebKitClientImpl { |