summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--chrome/browser/browser.scons2
-rw-r--r--chrome/browser/browser.vcproj16
-rw-r--r--chrome/browser/browser_prefs.cc4
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.cc12
-rw-r--r--chrome/browser/renderer_host/browser_render_process_host.h4
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.cc8
-rw-r--r--chrome/browser/renderer_host/resource_message_filter.h4
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.cc (renamed from chrome/browser/cache_manager_host.cc)89
-rw-r--r--chrome/browser/renderer_host/web_cache_manager.h (renamed from chrome/browser/cache_manager_host.h)41
-rw-r--r--chrome/browser/renderer_host/web_cache_manager_unittest.cc (renamed from chrome/browser/cache_manager_host_unittest.cc)136
-rw-r--r--chrome/browser/tab_contents/web_contents.cc4
-rw-r--r--chrome/browser/task_manager.h2
-rw-r--r--chrome/chrome.gyp6
-rw-r--r--chrome/common/ipc_message_utils.h54
-rw-r--r--chrome/common/render_messages.h80
-rw-r--r--chrome/common/render_messages_internal.h4
-rw-r--r--chrome/common/temp_scaffolding_stubs.cc1
-rw-r--r--chrome/common/temp_scaffolding_stubs.h1
-rw-r--r--chrome/renderer/render_thread.cc24
-rw-r--r--chrome/renderer/render_view_unittest.cc3
-rw-r--r--chrome/renderer/renderer_glue.cc13
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.cc5
-rw-r--r--chrome/renderer/renderer_webkitclient_impl.h2
-rw-r--r--chrome/test/unit/unit_tests.scons2
-rw-r--r--chrome/test/unit/unittests.vcproj8
-rw-r--r--chrome/worker/worker_thread.cc3
-rw-r--r--chrome/worker/worker_webkitclient_impl.cc4
-rw-r--r--webkit/build/WebKit/SConscript1
-rw-r--r--webkit/build/WebKit/WebKit.vcproj8
-rw-r--r--webkit/build/WebKit/WebKit.vsprops1
-rw-r--r--webkit/build/WebKit/using_WebKit.vsprops1
-rw-r--r--webkit/build/webkit_common_includes.vsprops2
-rw-r--r--webkit/glue/SConscript1
-rw-r--r--webkit/glue/cache_manager.cc92
-rw-r--r--webkit/glue/cache_manager.h63
-rw-r--r--webkit/glue/chrome_client_impl.cc5
-rw-r--r--webkit/glue/chromium_bridge_impl.cc2
-rw-r--r--webkit/glue/editor_client_impl.cc8
-rw-r--r--webkit/glue/editor_client_impl.h10
-rw-r--r--webkit/glue/event_conversion.cc10
-rw-r--r--webkit/glue/glue.vcproj8
-rw-r--r--webkit/glue/glue_util.cc7
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.cc3
-rw-r--r--webkit/glue/simple_webmimeregistry_impl.h2
-rw-r--r--webkit/glue/webclipboard_impl.cc7
-rw-r--r--webkit/glue/webclipboard_impl.h2
-rw-r--r--webkit/glue/webkit_glue.cc15
-rw-r--r--webkit/glue/webkitclient_impl.cc3
-rw-r--r--webkit/glue/webkitclient_impl.h4
-rw-r--r--webkit/glue/webplugin_impl.cc17
-rw-r--r--webkit/glue/webthemeengine_impl_win.cc3
-rw-r--r--webkit/glue/webthemeengine_impl_win.h2
-rw-r--r--webkit/tools/test_shell/test_shell_main.cc7
-rw-r--r--webkit/tools/test_shell/test_shell_webkit_init.h9
-rwxr-xr-xwebkit/tools/test_shell/test_webview_delegate.cc7
-rw-r--r--webkit/webkit.gyp3
57 files changed, 317 insertions, 520 deletions
diff --git a/DEPS b/DEPS
index e823311..69668d2 100644
--- a/DEPS
+++ b/DEPS
@@ -19,7 +19,7 @@ deps = {
"http://googletest.googlecode.com/svn/trunk@167",
"src/third_party/WebKit":
- "/trunk/deps/third_party/WebKit@12065",
+ "/trunk/deps/third_party/WebKit@12084",
"src/third_party/icu38":
"/trunk/deps/third_party/icu38@11496",
diff --git a/chrome/browser/browser.scons b/chrome/browser/browser.scons
index 222f1e6..4d51802a 100644
--- a/chrome/browser/browser.scons
+++ b/chrome/browser/browser.scons
@@ -96,7 +96,6 @@ input_files = ChromeFileList([
'browsing_data_remover.h',
'browsing_instance.cc',
'browsing_instance.h',
- 'cache_manager_host.cc',
'cache_manager_host.h',
'cancelable_request.cc',
'cancelable_request.h',
@@ -568,6 +567,7 @@ input_files = ChromeFileList([
'renderer_host/save_file_resource_handler.h',
'renderer_host/sync_resource_handler.cc',
'renderer_host/sync_resource_handler.h',
+ 'renderer_host/web_cache_manager.cc',
]),
MSVSFilter('Tab Contents', [
'tab_contents/constrained_window.h',
diff --git a/chrome/browser/browser.vcproj b/chrome/browser/browser.vcproj
index 2d792bf..5c80c9e 100644
--- a/chrome/browser/browser.vcproj
+++ b/chrome/browser/browser.vcproj
@@ -314,14 +314,6 @@
>
</File>
<File
- RelativePath=".\cache_manager_host.cc"
- >
- </File>
- <File
- RelativePath=".\cache_manager_host.h"
- >
- </File>
- <File
RelativePath=".\cancelable_request.cc"
>
</File>
@@ -2157,6 +2149,14 @@
RelativePath=".\renderer_host\sync_resource_handler.h"
>
</File>
+ <File
+ RelativePath=".\renderer_host\web_cache_manager.cc"
+ >
+ </File>
+ <File
+ RelativePath=".\renderer_host\web_cache_manager.h"
+ >
+ </File>
</Filter>
<Filter
Name="Tab Contents"
diff --git a/chrome/browser/browser_prefs.cc b/chrome/browser/browser_prefs.cc
index 570763f..7e9d6d8 100644
--- a/chrome/browser/browser_prefs.cc
+++ b/chrome/browser/browser_prefs.cc
@@ -8,7 +8,6 @@
#include "chrome/browser/bookmarks/bookmark_utils.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/download/download_manager.h"
#include "chrome/browser/external_protocol_handler.h"
#include "chrome/browser/google_url_tracker.h"
@@ -16,6 +15,7 @@
#include "chrome/browser/net/dns_global.h"
#include "chrome/browser/password_manager/password_manager.h"
#include "chrome/browser/renderer_host/browser_render_process_host.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/search_engines/template_url_prepopulate_data.h"
#include "chrome/browser/session_startup_pref.h"
@@ -35,7 +35,7 @@ namespace browser {
void RegisterAllPrefs(PrefService* user_prefs, PrefService* local_state) {
// Prefs in Local State
Browser::RegisterPrefs(local_state);
- CacheManagerHost::RegisterPrefs(local_state);
+ WebCacheManager::RegisterPrefs(local_state);
ExternalProtocolHandler::RegisterPrefs(local_state);
GoogleURLTracker::RegisterPrefs(local_state);
MetricsLog::RegisterPrefs(local_state);
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc
index 810ec1d..c694fdd 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.cc
+++ b/chrome/browser/renderer_host/browser_render_process_host.cc
@@ -23,7 +23,6 @@
#include "base/string_util.h"
#include "base/thread.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/extensions/user_script_master.h"
#include "chrome/browser/history/history.h"
#include "chrome/browser/plugin_service.h"
@@ -31,6 +30,7 @@
#include "chrome/browser/renderer_host/render_widget_helper.h"
#include "chrome/browser/renderer_host/renderer_security_policy.h"
#include "chrome/browser/renderer_host/resource_message_filter.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/visitedlink_master.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/child_process_info.h"
@@ -44,6 +44,8 @@
#include "chrome/renderer/render_process.h"
#include "grit/generated_resources.h"
+using WebKit::WebCache;
+
#if defined(OS_WIN)
// TODO(port): see comment by the only usage of RenderViewHost in this file.
@@ -153,7 +155,7 @@ BrowserRenderProcessHost::BrowserRenderProcessHost(Profile* profile)
BrowserRenderProcessHost::~BrowserRenderProcessHost() {
if (pid() >= 0) {
- CacheManagerHost::GetInstance()->Remove(pid());
+ WebCacheManager::GetInstance()->Remove(pid());
RendererSecurityPolicy::GetInstance()->Remove(pid());
}
@@ -335,7 +337,7 @@ bool BrowserRenderProcessHost::Init() {
}
resource_message_filter->Init(pid());
- CacheManagerHost::GetInstance()->Add(pid());
+ WebCacheManager::GetInstance()->Add(pid());
RendererSecurityPolicy::GetInstance()->Add(pid());
// Now that the process is created, set it's backgrounding accordingly.
@@ -697,8 +699,8 @@ void BrowserRenderProcessHost::OnPageContents(const GURL& url,
}
void BrowserRenderProcessHost::OnUpdatedCacheStats(
- const CacheManager::UsageStats& stats) {
- CacheManagerHost::GetInstance()->ObserveStats(pid(), stats);
+ const WebCache::UsageStats& stats) {
+ WebCacheManager::GetInstance()->ObserveStats(pid(), stats);
}
void BrowserRenderProcessHost::SetBackgrounded(bool backgrounded) {
diff --git a/chrome/browser/renderer_host/browser_render_process_host.h b/chrome/browser/renderer_host/browser_render_process_host.h
index 3cc05a8..d6f821e 100644
--- a/chrome/browser/renderer_host/browser_render_process_host.h
+++ b/chrome/browser/renderer_host/browser_render_process_host.h
@@ -19,7 +19,7 @@
#include "chrome/browser/renderer_host/audio_renderer_host.h"
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/common/notification_observer.h"
-#include "webkit/glue/cache_manager.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
class CommandLine;
class GURL;
@@ -99,7 +99,7 @@ class BrowserRenderProcessHost : public RenderProcessHost,
void OnClipboardReadAsciiText(std::string* result);
void OnClipboardReadHTML(string16* markup, GURL* src_url);
- void OnUpdatedCacheStats(const CacheManager::UsageStats& stats);
+ void OnUpdatedCacheStats(const WebKit::WebCache::UsageStats& stats);
// Initialize support for visited links. Send the renderer process its initial
// set of visited links.
diff --git a/chrome/browser/renderer_host/resource_message_filter.cc b/chrome/browser/renderer_host/resource_message_filter.cc
index 2ea6ac8..377bfc7 100644
--- a/chrome/browser/renderer_host/resource_message_filter.cc
+++ b/chrome/browser/renderer_host/resource_message_filter.cc
@@ -41,6 +41,8 @@
#include "chrome/common/temp_scaffolding_stubs.h"
#endif
+using WebKit::WebCache;
+
namespace {
// Context menus are somewhat complicated. We need to intercept them here on
@@ -555,15 +557,15 @@ void ResourceMessageFilter::OnDuplicateSection(
}
void ResourceMessageFilter::OnResourceTypeStats(
- const CacheManager::ResourceTypeStats& stats) {
+ const WebCache::ResourceTypeStats& stats) {
HISTOGRAM_COUNTS("WebCoreCache.ImagesSizeKB",
static_cast<int>(stats.images.size / 1024));
HISTOGRAM_COUNTS("WebCoreCache.CSSStylesheetsSizeKB",
- static_cast<int>(stats.css_stylesheets.size / 1024));
+ static_cast<int>(stats.cssStyleSheets.size / 1024));
HISTOGRAM_COUNTS("WebCoreCache.ScriptsSizeKB",
static_cast<int>(stats.scripts.size / 1024));
HISTOGRAM_COUNTS("WebCoreCache.XSLStylesheetsSizeKB",
- static_cast<int>(stats.xsl_stylesheets.size / 1024));
+ static_cast<int>(stats.xslStyleSheets.size / 1024));
HISTOGRAM_COUNTS("WebCoreCache.FontsSizeKB",
static_cast<int>(stats.fonts.size / 1024));
}
diff --git a/chrome/browser/renderer_host/resource_message_filter.h b/chrome/browser/renderer_host/resource_message_filter.h
index 7f05d85..29ae829 100644
--- a/chrome/browser/renderer_host/resource_message_filter.h
+++ b/chrome/browser/renderer_host/resource_message_filter.h
@@ -22,7 +22,7 @@
#include "chrome/common/modal_dialog_event.h"
#include "chrome/common/notification_observer.h"
#include "chrome/common/transport_dib.h"
-#include "webkit/glue/cache_manager.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#if defined(OS_WIN)
#include <windows.h>
@@ -164,7 +164,7 @@ class ResourceMessageFilter : public IPC::ChannelProxy::MessageFilter,
void OnGetCPBrowsingContext(uint32* context);
void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
base::SharedMemoryHandle* browser_handle);
- void OnResourceTypeStats(const CacheManager::ResourceTypeStats& stats);
+ void OnResourceTypeStats(const WebKit::WebCache::ResourceTypeStats& stats);
void OnResolveProxy(const GURL& url, IPC::Message* reply_msg);
diff --git a/chrome/browser/cache_manager_host.cc b/chrome/browser/renderer_host/web_cache_manager.cc
index da6ec4c..91b740e 100644
--- a/chrome/browser/cache_manager_host.cc
+++ b/chrome/browser/renderer_host/web_cache_manager.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/cache_manager_host.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include <algorithm>
@@ -19,6 +19,7 @@
using base::Time;
using base::TimeDelta;
+using WebKit::WebCache;
static const unsigned int kReviseAllocationDelayMS = 200 /* milliseconds */;
@@ -44,24 +45,24 @@ int GetDefaultCacheSize() {
} // anonymous namespace
// static
-void CacheManagerHost::RegisterPrefs(PrefService* prefs) {
+void WebCacheManager::RegisterPrefs(PrefService* prefs) {
prefs->RegisterIntegerPref(prefs::kMemoryCacheSize, GetDefaultCacheSize());
}
// static
-CacheManagerHost* CacheManagerHost::GetInstance() {
- return Singleton<CacheManagerHost>::get();
+WebCacheManager* WebCacheManager::GetInstance() {
+ return Singleton<WebCacheManager>::get();
}
-CacheManagerHost::CacheManagerHost()
+WebCacheManager::WebCacheManager()
: global_size_limit_(GetDefaultGlobalSizeLimit()),
ALLOW_THIS_IN_INITIALIZER_LIST(revise_allocation_factory_(this)) {
}
-CacheManagerHost::~CacheManagerHost() {
+WebCacheManager::~WebCacheManager() {
}
-void CacheManagerHost::Add(int renderer_id) {
+void WebCacheManager::Add(int renderer_id) {
DCHECK(inactive_renderers_.count(renderer_id) == 0);
// It is tempting to make the following DCHECK here, but it fails when a new
@@ -83,7 +84,7 @@ void CacheManagerHost::Add(int renderer_id) {
ReviseAllocationStrategyLater();
}
-void CacheManagerHost::Remove(int renderer_id) {
+void WebCacheManager::Remove(int renderer_id) {
DCHECK(active_renderers_.count(renderer_id) > 0 ||
inactive_renderers_.count(renderer_id) > 0);
@@ -96,7 +97,7 @@ void CacheManagerHost::Remove(int renderer_id) {
ReviseAllocationStrategyLater();
}
-void CacheManagerHost::ObserveActivity(int renderer_id) {
+void WebCacheManager::ObserveActivity(int renderer_id) {
// Record activity.
active_renderers_.insert(renderer_id);
@@ -115,36 +116,36 @@ void CacheManagerHost::ObserveActivity(int renderer_id) {
}
}
-void CacheManagerHost::ObserveStats(int renderer_id,
- const CacheManager::UsageStats& stats) {
+void WebCacheManager::ObserveStats(int renderer_id,
+ const WebCache::UsageStats& stats) {
StatsMap::iterator entry = stats_.find(renderer_id);
if (entry == stats_.end())
return; // We might see stats for a renderer that has been destroyed.
// Record the updated stats.
entry->second.capacity = stats.capacity;
- entry->second.dead_size = stats.dead_size;
- entry->second.live_size = stats.live_size;
- entry->second.max_dead_capacity = stats.max_dead_capacity;
- entry->second.min_dead_capacity = stats.min_dead_capacity;
+ entry->second.deadSize = stats.deadSize;
+ entry->second.liveSize = stats.liveSize;
+ entry->second.maxDeadCapacity = stats.maxDeadCapacity;
+ entry->second.minDeadCapacity = stats.minDeadCapacity;
// trigger notification
- CacheManager::UsageStats stats_details(stats);
+ WebCache::UsageStats stats_details(stats);
// &stats_details is only valid during the notification.
// See notification_types.h.
NotificationService::current()->Notify(
NotificationType::WEB_CACHE_STATS_OBSERVED,
Source<RenderProcessHost>(RenderProcessHost::FromID(renderer_id)),
- Details<CacheManager::UsageStats>(&stats_details));
+ Details<WebCache::UsageStats>(&stats_details));
}
-void CacheManagerHost::SetGlobalSizeLimit(size_t bytes) {
+void WebCacheManager::SetGlobalSizeLimit(size_t bytes) {
global_size_limit_ = bytes;
ReviseAllocationStrategyLater();
}
// static
-size_t CacheManagerHost::GetDefaultGlobalSizeLimit() {
+size_t WebCacheManager::GetDefaultGlobalSizeLimit() {
PrefService* perf_service = g_browser_process->local_state();
if (perf_service)
return perf_service->GetInteger(prefs::kMemoryCacheSize);
@@ -152,29 +153,29 @@ size_t CacheManagerHost::GetDefaultGlobalSizeLimit() {
return GetDefaultCacheSize();
}
-void CacheManagerHost::GatherStats(const std::set<int>& renderers,
- CacheManager::UsageStats* stats) {
+void WebCacheManager::GatherStats(const std::set<int>& renderers,
+ WebCache::UsageStats* stats) {
DCHECK(stats);
- memset(stats, 0, sizeof(CacheManager::UsageStats));
+ memset(stats, 0, sizeof(WebCache::UsageStats));
std::set<int>::const_iterator iter = renderers.begin();
while (iter != renderers.end()) {
StatsMap::iterator elmt = stats_.find(*iter);
if (elmt != stats_.end()) {
- stats->min_dead_capacity += elmt->second.min_dead_capacity;
- stats->max_dead_capacity += elmt->second.max_dead_capacity;
+ stats->minDeadCapacity += elmt->second.minDeadCapacity;
+ stats->maxDeadCapacity += elmt->second.maxDeadCapacity;
stats->capacity += elmt->second.capacity;
- stats->live_size += elmt->second.live_size;
- stats->dead_size += elmt->second.dead_size;
+ stats->liveSize += elmt->second.liveSize;
+ stats->deadSize += elmt->second.deadSize;
}
++iter;
}
}
// static
-size_t CacheManagerHost::GetSize(AllocationTactic tactic,
- const CacheManager::UsageStats& stats) {
+size_t WebCacheManager::GetSize(AllocationTactic tactic,
+ const WebCache::UsageStats& stats) {
switch (tactic) {
case DIVIDE_EVENLY:
// We aren't going to reserve any space for existing objects.
@@ -184,24 +185,24 @@ size_t CacheManagerHost::GetSize(AllocationTactic tactic,
return 3 * GetSize(KEEP_CURRENT, stats) / 2;
case KEEP_CURRENT:
// We need enough space to keep our current objects.
- return stats.live_size + stats.dead_size;
+ return stats.liveSize + stats.deadSize;
case KEEP_LIVE_WITH_HEADROOM:
// We need enough space to keep out live resources, plus some headroom.
return 3 * GetSize(KEEP_LIVE, stats) / 2;
case KEEP_LIVE:
// We need enough space to keep our live resources.
- return stats.live_size;
+ return stats.liveSize;
default:
NOTREACHED() << "Unknown cache allocation tactic";
return 0;
}
}
-bool CacheManagerHost::AttemptTactic(
+bool WebCacheManager::AttemptTactic(
AllocationTactic active_tactic,
- const CacheManager::UsageStats& active_stats,
+ const WebCache::UsageStats& active_stats,
AllocationTactic inactive_tactic,
- const CacheManager::UsageStats& inactive_stats,
+ const WebCache::UsageStats& inactive_stats,
AllocationStrategy* strategy) {
DCHECK(strategy);
@@ -238,10 +239,10 @@ bool CacheManagerHost::AttemptTactic(
return true;
}
-void CacheManagerHost::AddToStrategy(std::set<int> renderers,
- AllocationTactic tactic,
- size_t extra_bytes_to_allocate,
- AllocationStrategy* strategy) {
+void WebCacheManager::AddToStrategy(std::set<int> renderers,
+ AllocationTactic tactic,
+ size_t extra_bytes_to_allocate,
+ AllocationStrategy* strategy) {
DCHECK(strategy);
// Nothing to do if there are no renderers. It is common for there to be no
@@ -267,7 +268,7 @@ void CacheManagerHost::AddToStrategy(std::set<int> renderers,
}
}
-void CacheManagerHost::EnactStrategy(const AllocationStrategy& strategy) {
+void WebCacheManager::EnactStrategy(const AllocationStrategy& strategy) {
// Inform each render process of its cache allocation.
AllocationStrategy::const_iterator allocation = strategy.begin();
while (allocation != strategy.end()) {
@@ -294,7 +295,7 @@ void CacheManagerHost::EnactStrategy(const AllocationStrategy& strategy) {
}
}
-void CacheManagerHost::ReviseAllocationStrategy() {
+void WebCacheManager::ReviseAllocationStrategy() {
DCHECK(stats_.size() <=
active_renderers_.size() + inactive_renderers_.size());
@@ -302,8 +303,8 @@ void CacheManagerHost::ReviseAllocationStrategy() {
FindInactiveRenderers();
// Gather statistics
- CacheManager::UsageStats active;
- CacheManager::UsageStats inactive;
+ WebCache::UsageStats active;
+ WebCache::UsageStats inactive;
GatherStats(active_renderers_, &active);
GatherStats(inactive_renderers_, &inactive);
@@ -349,16 +350,16 @@ void CacheManagerHost::ReviseAllocationStrategy() {
}
}
-void CacheManagerHost::ReviseAllocationStrategyLater() {
+void WebCacheManager::ReviseAllocationStrategyLater() {
// Ask to be called back in a few milliseconds to actually recompute our
// allocation.
MessageLoop::current()->PostDelayedTask(FROM_HERE,
revise_allocation_factory_.NewRunnableMethod(
- &CacheManagerHost::ReviseAllocationStrategy),
+ &WebCacheManager::ReviseAllocationStrategy),
kReviseAllocationDelayMS);
}
-void CacheManagerHost::FindInactiveRenderers() {
+void WebCacheManager::FindInactiveRenderers() {
std::set<int>::const_iterator iter = active_renderers_.begin();
while (iter != active_renderers_.end()) {
StatsMap::iterator elmt = stats_.find(*iter);
diff --git a/chrome/browser/cache_manager_host.h b/chrome/browser/renderer_host/web_cache_manager.h
index f1313dc..1e9b642 100644
--- a/chrome/browser/cache_manager_host.h
+++ b/chrome/browser/renderer_host/web_cache_manager.h
@@ -5,8 +5,8 @@
// This is the browser side of the cache manager, it tracks the activity of the
// render processes and allocates available memory cache resources.
-#ifndef CHROME_BROWSER_CACHE_MANAGER_HOST_H__
-#define CHROME_BROWSER_CACHE_MANAGER_HOST_H__
+#ifndef CHROME_BROWSER_WEB_CACHE_MANAGER_H_
+#define CHROME_BROWSER_WEB_CACHE_MANAGER_H_
#include <map>
#include <list>
@@ -17,21 +17,21 @@
#include "base/singleton.h"
#include "base/task.h"
#include "base/time.h"
-#include "webkit/glue/cache_manager.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
class PrefService;
-class CacheManagerHost {
+class WebCacheManager {
// Unit tests are our friends.
- friend class CacheManagerHostTest;
+ friend class WebCacheManagerTest;
public:
static void RegisterPrefs(PrefService* prefs);
- // Gets the singleton CacheManagerHost object. The first time this method
- // is called, a CacheManagerHost object is constructed and returned.
+ // Gets the singleton WebCacheManager object. The first time this method
+ // is called, a WebCacheManager object is constructed and returned.
// Subsequent calls will return the same object.
- static CacheManagerHost* GetInstance();
+ static WebCacheManager* GetInstance();
// When a render process is created, it registers itself with the cache
// manager host, causing the renderer to be allocated cache resources.
@@ -53,7 +53,8 @@ class CacheManagerHost {
// Periodically, renderers should inform the cache manager of their current
// statistics. The more up-to-date the cache manager's statistics, the
// better it can allocate cache resources.
- void ObserveStats(int renderer_id, const CacheManager::UsageStats& stats);
+ void ObserveStats(
+ int renderer_id, const WebKit::WebCache::UsageStats& stats);
// The global limit on the number of bytes in all the in-memory caches.
size_t global_size_limit() const { return global_size_limit_; }
@@ -70,7 +71,7 @@ class CacheManagerHost {
static const int kRendererInactiveThresholdMinutes = 5;
// Keep track of some renderer information.
- struct RendererInfo : CacheManager::UsageStats {
+ struct RendererInfo : WebKit::WebCache::UsageStats {
// The access time for this renderer.
base::Time access;
};
@@ -86,10 +87,10 @@ class CacheManagerHost {
typedef std::list<Allocation> AllocationStrategy;
// This class is a singleton. Do not instantiate directly.
- CacheManagerHost();
- friend struct DefaultSingletonTraits<CacheManagerHost>;
+ WebCacheManager();
+ friend struct DefaultSingletonTraits<WebCacheManager>;
- ~CacheManagerHost();
+ ~WebCacheManager();
// Recomputes the allocation of cache resources among the renderers. Also
// informs the renderers of their new allocation.
@@ -132,13 +133,13 @@ class CacheManagerHost {
// Add up all the stats from the given set of renderers and place the result
// in |stats|.
void GatherStats(const std::set<int>& renderers,
- CacheManager::UsageStats* stats);
+ WebKit::WebCache::UsageStats* stats);
// Get the amount of memory that would be required to implement |tactic|
// using the specified allocation tactic. This function defines the
// semantics for each of the tactics.
static size_t GetSize(AllocationTactic tactic,
- const CacheManager::UsageStats& stats);
+ const WebKit::WebCache::UsageStats& stats);
// Attempt to use the specified tactics to compute an allocation strategy
// and place the result in |strategy|. |active_stats| and |inactive_stats|
@@ -148,9 +149,9 @@ class CacheManagerHost {
// Returns |true| on success and |false| on failure. Does not modify
// |strategy| on failure.
bool AttemptTactic(AllocationTactic active_tactic,
- const CacheManager::UsageStats& active_stats,
+ const WebKit::WebCache::UsageStats& active_stats,
AllocationTactic inactive_tactic,
- const CacheManager::UsageStats& inactive_stats,
+ const WebKit::WebCache::UsageStats& inactive_stats,
AllocationStrategy* strategy);
// For each renderer in |renderers|, computes its allocation according to
@@ -183,9 +184,9 @@ class CacheManagerHost {
// recently than they have been active.
std::set<int> inactive_renderers_;
- ScopedRunnableMethodFactory<CacheManagerHost> revise_allocation_factory_;
+ ScopedRunnableMethodFactory<WebCacheManager> revise_allocation_factory_;
- DISALLOW_EVIL_CONSTRUCTORS(CacheManagerHost);
+ DISALLOW_COPY_AND_ASSIGN(WebCacheManager);
};
-#endif // CHROME_BROWSER_CACHE_MANAGER_HOST_H__
+#endif // CHROME_BROWSER_WEB_CACHE_MANAGER_H_
diff --git a/chrome/browser/cache_manager_host_unittest.cc b/chrome/browser/renderer_host/web_cache_manager_unittest.cc
index 9164a47..9592582 100644
--- a/chrome/browser/cache_manager_host_unittest.cc
+++ b/chrome/browser/renderer_host/web_cache_manager_unittest.cc
@@ -5,82 +5,82 @@
#include <string>
#include "base/message_loop.h"
-#include "chrome/browser/cache_manager_host.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
-#include "webkit/glue/cache_manager.h"
using base::Time;
using base::TimeDelta;
+using WebKit::WebCache;
-class CacheManagerHostTest : public testing::Test {
+class WebCacheManagerTest : public testing::Test {
protected:
- typedef CacheManagerHost::StatsMap StatsMap;
- typedef CacheManagerHost::Allocation Allocation;
- typedef CacheManagerHost::AllocationStrategy AllocationStrategy;
+ typedef WebCacheManager::StatsMap StatsMap;
+ typedef WebCacheManager::Allocation Allocation;
+ typedef WebCacheManager::AllocationStrategy AllocationStrategy;
static const int kRendererID;
static const int kRendererID2;
- static const CacheManager::UsageStats kStats;
- static const CacheManager::UsageStats kStats2;
+ static const WebCache::UsageStats kStats;
+ static const WebCache::UsageStats kStats2;
- // Thunks to access protected members of CacheManagerHost
- static std::map<int, CacheManagerHost::RendererInfo>& stats(
- CacheManagerHost* h) {
+ // Thunks to access protected members of WebCacheManager
+ static std::map<int, WebCacheManager::RendererInfo>& stats(
+ WebCacheManager* h) {
return h->stats_;
}
- static void SimulateInactivity(CacheManagerHost* h, int renderer_id) {
+ static void SimulateInactivity(WebCacheManager* h, int renderer_id) {
stats(h)[renderer_id].access = Time::Now() - TimeDelta::FromMinutes(
- CacheManagerHost::kRendererInactiveThresholdMinutes);
+ WebCacheManager::kRendererInactiveThresholdMinutes);
h->FindInactiveRenderers();
}
- static std::set<int>& active_renderers(CacheManagerHost* h) {
+ static std::set<int>& active_renderers(WebCacheManager* h) {
return h->active_renderers_;
}
- static std::set<int>& inactive_renderers(CacheManagerHost* h) {
+ static std::set<int>& inactive_renderers(WebCacheManager* h) {
return h->inactive_renderers_;
}
- static void GatherStats(CacheManagerHost* h,
+ static void GatherStats(WebCacheManager* h,
std::set<int> renderers,
- CacheManager::UsageStats* stats) {
+ WebCache::UsageStats* stats) {
h->GatherStats(renderers, stats);
}
static size_t GetSize(int tactic,
- const CacheManager::UsageStats& stats) {
- return CacheManagerHost::GetSize(
- static_cast<CacheManagerHost::AllocationTactic>(tactic), stats);
+ const WebCache::UsageStats& stats) {
+ return WebCacheManager::GetSize(
+ static_cast<WebCacheManager::AllocationTactic>(tactic), stats);
}
- static bool AttemptTactic(CacheManagerHost* h,
+ static bool AttemptTactic(WebCacheManager* h,
int active_tactic,
- const CacheManager::UsageStats& active_stats,
+ const WebCache::UsageStats& active_stats,
int inactive_tactic,
- const CacheManager::UsageStats& inactive_stats,
+ const WebCache::UsageStats& inactive_stats,
std::list< std::pair<int,size_t> >* strategy) {
return h->AttemptTactic(
- static_cast<CacheManagerHost::AllocationTactic>(active_tactic),
+ static_cast<WebCacheManager::AllocationTactic>(active_tactic),
active_stats,
- static_cast<CacheManagerHost::AllocationTactic>(inactive_tactic),
+ static_cast<WebCacheManager::AllocationTactic>(inactive_tactic),
inactive_stats,
strategy);
}
- static void AddToStrategy(CacheManagerHost* h,
+ static void AddToStrategy(WebCacheManager* h,
std::set<int> renderers,
int tactic,
size_t extra_bytes_to_allocate,
std::list< std::pair<int,size_t> >* strategy) {
h->AddToStrategy(renderers,
- static_cast<CacheManagerHost::AllocationTactic>(tactic),
+ static_cast<WebCacheManager::AllocationTactic>(tactic),
extra_bytes_to_allocate,
strategy);
}
enum {
- DIVIDE_EVENLY = CacheManagerHost::DIVIDE_EVENLY,
- KEEP_CURRENT_WITH_HEADROOM = CacheManagerHost::KEEP_CURRENT_WITH_HEADROOM,
- KEEP_CURRENT = CacheManagerHost::KEEP_CURRENT,
- KEEP_LIVE_WITH_HEADROOM = CacheManagerHost::KEEP_LIVE_WITH_HEADROOM,
- KEEP_LIVE = CacheManagerHost::KEEP_LIVE,
+ DIVIDE_EVENLY = WebCacheManager::DIVIDE_EVENLY,
+ KEEP_CURRENT_WITH_HEADROOM = WebCacheManager::KEEP_CURRENT_WITH_HEADROOM,
+ KEEP_CURRENT = WebCacheManager::KEEP_CURRENT,
+ KEEP_LIVE_WITH_HEADROOM = WebCacheManager::KEEP_LIVE_WITH_HEADROOM,
+ KEEP_LIVE = WebCacheManager::KEEP_LIVE,
};
private:
@@ -88,13 +88,13 @@ class CacheManagerHostTest : public testing::Test {
};
// static
-const int CacheManagerHostTest::kRendererID = 146;
+const int WebCacheManagerTest::kRendererID = 146;
// static
-const int CacheManagerHostTest::kRendererID2 = 245;
+const int WebCacheManagerTest::kRendererID2 = 245;
// static
-const CacheManager::UsageStats CacheManagerHostTest::kStats = {
+const WebCache::UsageStats WebCacheManagerTest::kStats = {
0,
1024 * 1024,
1024 * 1024,
@@ -103,7 +103,7 @@ const CacheManager::UsageStats CacheManagerHostTest::kStats = {
};
// static
-const CacheManager::UsageStats CacheManagerHostTest::kStats2 = {
+const WebCache::UsageStats WebCacheManagerTest::kStats2 = {
0,
2 * 1024 * 1024,
2 * 1024 * 1024,
@@ -111,13 +111,13 @@ const CacheManager::UsageStats CacheManagerHostTest::kStats2 = {
2 * 512,
};
-static bool operator==(const CacheManager::UsageStats& lhs,
- const CacheManager::UsageStats& rhs) {
- return !::memcmp(&lhs, &rhs, sizeof(CacheManager::UsageStats));
+static bool operator==(const WebCache::UsageStats& lhs,
+ const WebCache::UsageStats& rhs) {
+ return !::memcmp(&lhs, &rhs, sizeof(WebCache::UsageStats));
}
-TEST_F(CacheManagerHostTest, AddRemoveRendererTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, AddRemoveRendererTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
EXPECT_EQ(0U, active_renderers(h).size());
EXPECT_EQ(0U, inactive_renderers(h).size());
@@ -131,8 +131,8 @@ TEST_F(CacheManagerHostTest, AddRemoveRendererTest) {
EXPECT_EQ(0U, inactive_renderers(h).size());
}
-TEST_F(CacheManagerHostTest, ActiveInactiveTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, ActiveInactiveTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
h->Add(kRendererID);
@@ -151,8 +151,8 @@ TEST_F(CacheManagerHostTest, ActiveInactiveTest) {
h->Remove(kRendererID);
}
-TEST_F(CacheManagerHostTest, ObserveStatsTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, ObserveStatsTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
h->Add(kRendererID);
@@ -166,8 +166,8 @@ TEST_F(CacheManagerHostTest, ObserveStatsTest) {
h->Remove(kRendererID);
}
-TEST_F(CacheManagerHostTest, SetGlobalSizeLimitTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, SetGlobalSizeLimitTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
size_t limit = h->GetDefaultGlobalSizeLimit();
h->SetGlobalSizeLimit(limit);
@@ -177,8 +177,8 @@ TEST_F(CacheManagerHostTest, SetGlobalSizeLimitTest) {
EXPECT_EQ(0U, h->global_size_limit());
}
-TEST_F(CacheManagerHostTest, GatherStatsTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, GatherStatsTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
h->Add(kRendererID);
h->Add(kRendererID2);
@@ -189,7 +189,7 @@ TEST_F(CacheManagerHostTest, GatherStatsTest) {
std::set<int> renderer_set;
renderer_set.insert(kRendererID);
- CacheManager::UsageStats stats;
+ WebCache::UsageStats stats;
GatherStats(h, renderer_set, &stats);
EXPECT_TRUE(kStats == stats);
@@ -197,12 +197,12 @@ TEST_F(CacheManagerHostTest, GatherStatsTest) {
renderer_set.insert(kRendererID2);
GatherStats(h, renderer_set, &stats);
- CacheManager::UsageStats expected_stats = kStats;
- expected_stats.min_dead_capacity += kStats2.min_dead_capacity;
- expected_stats.max_dead_capacity += kStats2.max_dead_capacity;
+ WebCache::UsageStats expected_stats = kStats;
+ expected_stats.minDeadCapacity += kStats2.minDeadCapacity;
+ expected_stats.maxDeadCapacity += kStats2.maxDeadCapacity;
expected_stats.capacity += kStats2.capacity;
- expected_stats.live_size += kStats2.live_size;
- expected_stats.dead_size += kStats2.dead_size;
+ expected_stats.liveSize += kStats2.liveSize;
+ expected_stats.deadSize += kStats2.deadSize;
EXPECT_TRUE(expected_stats == stats);
@@ -210,7 +210,7 @@ TEST_F(CacheManagerHostTest, GatherStatsTest) {
h->Remove(kRendererID2);
}
-TEST_F(CacheManagerHostTest, GetSizeTest) {
+TEST_F(WebCacheManagerTest, GetSizeTest) {
EXPECT_EQ(0U, GetSize(DIVIDE_EVENLY, kStats));
EXPECT_LT(256 * 1024u + 512, GetSize(KEEP_CURRENT_WITH_HEADROOM, kStats));
EXPECT_EQ(256 * 1024u + 512, GetSize(KEEP_CURRENT, kStats));
@@ -218,8 +218,8 @@ TEST_F(CacheManagerHostTest, GetSizeTest) {
EXPECT_EQ(256 * 1024u, GetSize(KEEP_LIVE, kStats));
}
-TEST_F(CacheManagerHostTest, AttemptTacticTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, AttemptTacticTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
h->Add(kRendererID);
h->Add(kRendererID2);
@@ -230,8 +230,8 @@ TEST_F(CacheManagerHostTest, AttemptTacticTest) {
h->ObserveStats(kRendererID, kStats);
h->ObserveStats(kRendererID2, kStats2);
- h->SetGlobalSizeLimit(kStats.live_size + kStats.dead_size +
- kStats2.live_size + kStats2.dead_size/2);
+ h->SetGlobalSizeLimit(kStats.liveSize + kStats.deadSize +
+ kStats2.liveSize + kStats2.deadSize/2);
AllocationStrategy strategy;
@@ -254,9 +254,9 @@ TEST_F(CacheManagerHostTest, AttemptTacticTest) {
AllocationStrategy::iterator iter = strategy.begin();
while (iter != strategy.end()) {
if (iter->first == kRendererID)
- EXPECT_LE(kStats.live_size + kStats.dead_size, iter->second);
+ EXPECT_LE(kStats.liveSize + kStats.deadSize, iter->second);
else if (iter->first == kRendererID2)
- EXPECT_LE(kStats2.live_size, iter->second);
+ EXPECT_LE(kStats2.liveSize, iter->second);
else
EXPECT_FALSE("Unexpected entry in strategy");
++iter;
@@ -266,8 +266,8 @@ TEST_F(CacheManagerHostTest, AttemptTacticTest) {
h->Remove(kRendererID2);
}
-TEST_F(CacheManagerHostTest, AddToStrategyTest) {
- CacheManagerHost* h = CacheManagerHost::GetInstance();
+TEST_F(WebCacheManagerTest, AddToStrategyTest) {
+ WebCacheManager* h = WebCacheManager::GetInstance();
h->Add(kRendererID);
h->Add(kRendererID2);
@@ -296,17 +296,17 @@ TEST_F(CacheManagerHostTest, AddToStrategyTest) {
total_bytes += iter->second;
if (iter->first == kRendererID)
- EXPECT_LE(kStats.live_size + kStats.dead_size, iter->second);
+ EXPECT_LE(kStats.liveSize + kStats.deadSize, iter->second);
else if (iter->first == kRendererID2)
- EXPECT_LE(kStats2.live_size + kStats2.dead_size, iter->second);
+ EXPECT_LE(kStats2.liveSize + kStats2.deadSize, iter->second);
else
EXPECT_FALSE("Unexpected entry in strategy");
++iter;
}
size_t expected_total_bytes = kExtraBytesToAllocate +
- kStats.live_size + kStats.dead_size +
- kStats2.live_size + kStats2.dead_size;
+ kStats.liveSize + kStats.deadSize +
+ kStats2.liveSize + kStats2.deadSize;
EXPECT_GE(expected_total_bytes, total_bytes);
diff --git a/chrome/browser/tab_contents/web_contents.cc b/chrome/browser/tab_contents/web_contents.cc
index f377c96..a6fc32c 100644
--- a/chrome/browser/tab_contents/web_contents.cc
+++ b/chrome/browser/tab_contents/web_contents.cc
@@ -29,6 +29,7 @@
#include "chrome/browser/renderer_host/render_process_host.h"
#include "chrome/browser/renderer_host/render_view_host.h"
#include "chrome/browser/renderer_host/render_widget_host_view.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/search_engines/template_url_model.h"
#include "chrome/browser/tab_contents/navigation_entry.h"
#include "chrome/browser/tab_contents/provisional_load_details.h"
@@ -49,7 +50,6 @@
#if defined(OS_WIN)
// TODO(port): fill these in as we flesh out the implementation of this class
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/download/download_request_manager.h"
#include "chrome/browser/modal_html_dialog_delegate.h"
#include "chrome/browser/plugin_service.h"
@@ -471,7 +471,7 @@ void WebContents::DidBecomeSelected() {
// If pid() is -1, that means the RenderProcessHost still hasn't been
// initialized. It'll register with CacheManagerHost when it is.
if (process()->pid() != -1)
- CacheManagerHost::GetInstance()->ObserveActivity(process()->pid());
+ WebCacheManager::GetInstance()->ObserveActivity(process()->pid());
}
void WebContents::WasHidden() {
diff --git a/chrome/browser/task_manager.h b/chrome/browser/task_manager.h
index ab27fef..8f67eb8 100644
--- a/chrome/browser/task_manager.h
+++ b/chrome/browser/task_manager.h
@@ -13,7 +13,7 @@
#include "base/singleton.h"
#include "base/ref_counted.h"
#include "base/timer.h"
-#include "chrome/browser/cache_manager_host.h"
+#include "chrome/browser/renderer_host/web_cache_manager.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/views/controls/table/group_table_view.h"
#include "chrome/views/window/dialog_delegate.h"
diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp
index b8eacff..dda58d8 100644
--- a/chrome/chrome.gyp
+++ b/chrome/chrome.gyp
@@ -470,8 +470,6 @@
'browser/browsing_data_remover.h',
'browser/browsing_instance.cc',
'browser/browsing_instance.h',
- 'browser/cache_manager_host.cc',
- 'browser/cache_manager_host.h',
'browser/cancelable_request.cc',
'browser/cancelable_request.h',
'browser/cert_store.cc',
@@ -894,6 +892,8 @@
'browser/renderer_host/save_file_resource_handler.h',
'browser/renderer_host/sync_resource_handler.cc',
'browser/renderer_host/sync_resource_handler.h',
+ 'browser/renderer_host/web_cache_manager.cc',
+ 'browser/renderer_host/web_cache_manager.h',
'browser/rlz/rlz.cc',
'browser/rlz/rlz.h',
'browser/safe_browsing/bloom_filter.cc',
@@ -1949,7 +1949,6 @@
'browser/bookmarks/bookmark_utils_unittest.cc',
'browser/browser_commands_unittest.cc',
'browser/debugger/devtools_manager_unittest.cc',
- 'browser/cache_manager_host_unittest.cc',
'browser/chrome_thread_unittest.cc',
# It is safe to list */cocoa/* files in the "common" file list
# without an explicit exclusion since gyp is smart enough to
@@ -2005,6 +2004,7 @@
'browser/renderer_host/render_widget_host_unittest.cc',
'browser/renderer_host/renderer_security_policy_unittest.cc',
'browser/renderer_host/resource_dispatcher_host_unittest.cc',
+ 'browser/renderer_host/web_cache_manager_unittest.cc',
'browser/rlz/rlz_unittest.cc',
'browser/safe_browsing/bloom_filter_unittest.cc',
'browser/safe_browsing/chunk_range_unittest.cc',
diff --git a/chrome/common/ipc_message_utils.h b/chrome/common/ipc_message_utils.h
index 64ca212..e016074 100644
--- a/chrome/common/ipc_message_utils.h
+++ b/chrome/common/ipc_message_utils.h
@@ -19,7 +19,6 @@
#include "chrome/common/ipc_sync_message.h"
#include "chrome/common/thumbnail_score.h"
#include "chrome/common/transport_dib.h"
-#include "webkit/glue/cache_manager.h"
#include "webkit/glue/console_message_level.h"
#include "webkit/glue/find_in_page_request.h"
#include "webkit/glue/webcursor.h"
@@ -808,59 +807,6 @@ struct ParamTraits<ConsoleMessageLevel> {
}
};
-template <>
-struct ParamTraits<CacheManager::ResourceTypeStat> {
- typedef CacheManager::ResourceTypeStat param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.count);
- WriteParam(m, p.size);
- WriteParam(m, p.live_size);
- WriteParam(m, p.decoded_size);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- bool result =
- ReadParam(m, iter, &r->count) &&
- ReadParam(m, iter, &r->size) &&
- ReadParam(m, iter, &r->live_size) &&
- ReadParam(m, iter, &r->decoded_size);
- return result;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(StringPrintf(L"%d %d %d %d", p.count, p.size, p.live_size,
- p.decoded_size));
- }
-};
-
-template <>
-struct ParamTraits<CacheManager::ResourceTypeStats> {
- typedef CacheManager::ResourceTypeStats param_type;
- static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.images);
- WriteParam(m, p.css_stylesheets);
- WriteParam(m, p.scripts);
- WriteParam(m, p.xsl_stylesheets);
- WriteParam(m, p.fonts);
- }
- static bool Read(const Message* m, void** iter, param_type* r) {
- bool result =
- ReadParam(m, iter, &r->images) &&
- ReadParam(m, iter, &r->css_stylesheets) &&
- ReadParam(m, iter, &r->scripts) &&
- ReadParam(m, iter, &r->xsl_stylesheets) &&
- ReadParam(m, iter, &r->fonts);
- return result;
- }
- static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<WebCoreStats>");
- LogParam(p.images, l);
- LogParam(p.css_stylesheets, l);
- LogParam(p.scripts, l);
- LogParam(p.xsl_stylesheets, l);
- LogParam(p.fonts, l);
- l->append(L"</WebCoreStats>");
- }
-};
-
#if defined(OS_WIN)
template <>
struct ParamTraits<XFORM> {
diff --git a/chrome/common/render_messages.h b/chrome/common/render_messages.h
index ebac85c..0053921 100644
--- a/chrome/common/render_messages.h
+++ b/chrome/common/render_messages.h
@@ -25,8 +25,8 @@
#include "net/base/upload_data.h"
#include "net/http/http_response_headers.h"
#include "net/url_request/url_request_status.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "webkit/glue/autofill_form.h"
-#include "webkit/glue/cache_manager.h"
#include "webkit/glue/context_menu.h"
#include "webkit/glue/feed.h"
#include "webkit/glue/form_data.h"
@@ -1165,27 +1165,80 @@ struct ParamTraits<net::UploadData::Element> {
}
};
-// Traits for CacheManager::UsageStats
+// Traits for WebKit::WebCache::UsageStats
template <>
-struct ParamTraits<CacheManager::UsageStats> {
- typedef CacheManager::UsageStats param_type;
+struct ParamTraits<WebKit::WebCache::UsageStats> {
+ typedef WebKit::WebCache::UsageStats param_type;
static void Write(Message* m, const param_type& p) {
- WriteParam(m, p.min_dead_capacity);
- WriteParam(m, p.max_dead_capacity);
+ WriteParam(m, p.minDeadCapacity);
+ WriteParam(m, p.maxDeadCapacity);
WriteParam(m, p.capacity);
- WriteParam(m, p.live_size);
- WriteParam(m, p.dead_size);
+ WriteParam(m, p.liveSize);
+ WriteParam(m, p.deadSize);
}
static bool Read(const Message* m, void** iter, param_type* r) {
return
- ReadParam(m, iter, &r->min_dead_capacity) &&
- ReadParam(m, iter, &r->max_dead_capacity) &&
+ ReadParam(m, iter, &r->minDeadCapacity) &&
+ ReadParam(m, iter, &r->maxDeadCapacity) &&
ReadParam(m, iter, &r->capacity) &&
- ReadParam(m, iter, &r->live_size) &&
- ReadParam(m, iter, &r->dead_size);
+ ReadParam(m, iter, &r->liveSize) &&
+ ReadParam(m, iter, &r->deadSize);
}
static void Log(const param_type& p, std::wstring* l) {
- l->append(L"<CacheManager::UsageStats>");
+ l->append(L"<WebCache::UsageStats>");
+ }
+};
+
+template <>
+struct ParamTraits<WebKit::WebCache::ResourceTypeStat> {
+ typedef WebKit::WebCache::ResourceTypeStat param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.count);
+ WriteParam(m, p.size);
+ WriteParam(m, p.liveSize);
+ WriteParam(m, p.decodedSize);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool result =
+ ReadParam(m, iter, &r->count) &&
+ ReadParam(m, iter, &r->size) &&
+ ReadParam(m, iter, &r->liveSize) &&
+ ReadParam(m, iter, &r->decodedSize);
+ return result;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(StringPrintf(L"%d %d %d %d", p.count, p.size, p.liveSize,
+ p.decodedSize));
+ }
+};
+
+template <>
+struct ParamTraits<WebKit::WebCache::ResourceTypeStats> {
+ typedef WebKit::WebCache::ResourceTypeStats param_type;
+ static void Write(Message* m, const param_type& p) {
+ WriteParam(m, p.images);
+ WriteParam(m, p.cssStyleSheets);
+ WriteParam(m, p.scripts);
+ WriteParam(m, p.xslStyleSheets);
+ WriteParam(m, p.fonts);
+ }
+ static bool Read(const Message* m, void** iter, param_type* r) {
+ bool result =
+ ReadParam(m, iter, &r->images) &&
+ ReadParam(m, iter, &r->cssStyleSheets) &&
+ ReadParam(m, iter, &r->scripts) &&
+ ReadParam(m, iter, &r->xslStyleSheets) &&
+ ReadParam(m, iter, &r->fonts);
+ return result;
+ }
+ static void Log(const param_type& p, std::wstring* l) {
+ l->append(L"<WebCoreStats>");
+ LogParam(p.images, l);
+ LogParam(p.cssStyleSheets, l);
+ LogParam(p.scripts, l);
+ LogParam(p.xslStyleSheets, l);
+ LogParam(p.fonts, l);
+ l->append(L"</WebCoreStats>");
}
};
@@ -1833,7 +1886,6 @@ struct ParamTraits<AudioOutputStream::State> {
}
};
-
} // namespace IPC
diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h
index dedf4774..4d8c9a9 100644
--- a/chrome/common/render_messages_internal.h
+++ b/chrome/common/render_messages_internal.h
@@ -569,7 +569,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
IPC_SYNC_MESSAGE_ROUTED0_0(ViewHostMsg_RunModal)
IPC_MESSAGE_CONTROL1(ViewHostMsg_UpdatedCacheStats,
- CacheManager::UsageStats /* stats */)
+ WebKit::WebCache::UsageStats /* stats */)
// Indicates the renderer is ready in response to a ViewMsg_New or
// a ViewMsg_CreatingNew_ACK.
@@ -1132,7 +1132,7 @@ IPC_BEGIN_MESSAGES(ViewHost)
// Provide the browser process with information about the WebCore resource
// cache.
IPC_MESSAGE_CONTROL1(ViewHostMsg_ResourceTypeStats,
- CacheManager::ResourceTypeStats)
+ WebKit::WebCache::ResourceTypeStats)
// Notify the browser that this render either has or doesn't have a
// beforeunload or unload handler.
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc
index 93c7064..4690499 100644
--- a/chrome/common/temp_scaffolding_stubs.cc
+++ b/chrome/common/temp_scaffolding_stubs.cc
@@ -19,7 +19,6 @@
#include "chrome/browser/automation/automation_provider.h"
#include "chrome/browser/browser.h"
#include "chrome/browser/browser_shutdown.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/debugger/debugger_shell.h"
#include "chrome/browser/dom_ui/dom_ui.h"
#include "chrome/browser/download/download_request_dialog_delegate.h"
diff --git a/chrome/common/temp_scaffolding_stubs.h b/chrome/common/temp_scaffolding_stubs.h
index 5037b50..c1a12e5 100644
--- a/chrome/common/temp_scaffolding_stubs.h
+++ b/chrome/common/temp_scaffolding_stubs.h
@@ -23,7 +23,6 @@
#include "base/gfx/rect.h"
#include "chrome/browser/bookmarks/bookmark_model.h"
#include "chrome/browser/browser_process.h"
-#include "chrome/browser/cache_manager_host.h"
#include "chrome/browser/cancelable_request.h"
#include "chrome/browser/download/download_shelf.h"
#include "chrome/browser/download/save_types.h"
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 {
diff --git a/chrome/test/unit/unit_tests.scons b/chrome/test/unit/unit_tests.scons
index 47d0341..f9ac5c1 100644
--- a/chrome/test/unit/unit_tests.scons
+++ b/chrome/test/unit/unit_tests.scons
@@ -120,7 +120,6 @@ input_files = ChromeFileList([
'$CHROME_DIR/browser/bookmarks/bookmark_table_model_unittest.cc',
'$CHROME_DIR/browser/bookmarks/bookmark_utils_unittest.cc',
'$CHROME_DIR/browser/browser_commands_unittest.cc',
- '$CHROME_DIR/browser/cache_manager_host_unittest.cc',
'$CHROME_DIR/browser/chrome_thread_unittest.cc',
'$CHROME_DIR/browser/safe_browsing/chunk_range_unittest.cc',
'$CHROME_DIR/browser/command_updater_unittest.cc',
@@ -163,6 +162,7 @@ input_files = ChromeFileList([
'$CHROME_DIR/browser/renderer_host/renderer_security_policy_unittest.cc',
'$CHROME_DIR/browser/renderer_host/resource_dispatcher_host_unittest.cc',
'$CHROME_DIR/browser/renderer_host/test_render_view_host.cc',
+ '$CHROME_DIR/browser/renderer_host/web_cache_manager_unittest.cc',
'$CHROME_DIR/browser/rlz/rlz_unittest.cc',
'$CHROME_DIR/browser/safe_browsing/safe_browsing_database_unittest.cc',
'$CHROME_DIR/browser/safe_browsing/safe_browsing_util_unittest.cc',
diff --git a/chrome/test/unit/unittests.vcproj b/chrome/test/unit/unittests.vcproj
index e48792d..b8ce6f4 100644
--- a/chrome/test/unit/unittests.vcproj
+++ b/chrome/test/unit/unittests.vcproj
@@ -428,10 +428,6 @@
>
</File>
<File
- RelativePath="..\..\browser\cache_manager_host_unittest.cc"
- >
- </File>
- <File
RelativePath="..\..\browser\chrome_thread_unittest.cc"
>
</File>
@@ -740,6 +736,10 @@
>
</File>
<File
+ RelativePath="..\..\browser\renderer_host\web_cache_manager_unittest.cc"
+ >
+ </File>
+ <File
RelativePath="..\..\browser\tab_contents\web_contents_unittest.cc"
>
</File>
diff --git a/chrome/worker/worker_thread.cc b/chrome/worker/worker_thread.cc
index b986fcd..c48eae0 100644
--- a/chrome/worker/worker_thread.cc
+++ b/chrome/worker/worker_thread.cc
@@ -8,8 +8,7 @@
#include "chrome/worker/webworkerclient_proxy.h"
#include "chrome/worker/worker_process.h"
#include "chrome/worker/worker_webkitclient_impl.h"
-
-#include "WebKit.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
WorkerThread::WorkerThread()
: ChildThread(base::Thread::Options(MessageLoop::TYPE_DEFAULT,
diff --git a/chrome/worker/worker_webkitclient_impl.cc b/chrome/worker/worker_webkitclient_impl.cc
index 94f71cf..e99347a 100644
--- a/chrome/worker/worker_webkitclient_impl.cc
+++ b/chrome/worker/worker_webkitclient_impl.cc
@@ -4,8 +4,8 @@
#include "chrome/worker/worker_webkitclient_impl.h"
-#include "WebString.h"
-#include "WebURL.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
WebKit::WebMimeRegistry* WorkerWebKitClientImpl::mimeRegistry() {
return NULL;
diff --git a/webkit/build/WebKit/SConscript b/webkit/build/WebKit/SConscript
index 8686346..db059cc 100644
--- a/webkit/build/WebKit/SConscript
+++ b/webkit/build/WebKit/SConscript
@@ -21,6 +21,7 @@ input_files = [
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/ChromiumBridge.cpp',
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/ChromiumCurrentTime.cpp',
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/ChromiumThreading.cpp',
+ '$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/WebCache.cpp',
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/WebCString.cpp',
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/WebImageSkia.cpp',
'$THIRD_PARTY_WEBKIT_DIR/WebKit/chromium/src/WebKit.cpp',
diff --git a/webkit/build/WebKit/WebKit.vcproj b/webkit/build/WebKit/WebKit.vcproj
index f484d55..b76c8f0 100644
--- a/webkit/build/WebKit/WebKit.vcproj
+++ b/webkit/build/WebKit/WebKit.vcproj
@@ -128,6 +128,10 @@
Name="public"
>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebCache.h"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\public\WebCanvas.h"
>
</File>
@@ -208,6 +212,10 @@
>
</File>
<File
+ RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\src\WebCache.cpp"
+ >
+ </File>
+ <File
RelativePath="..\..\..\third_party\WebKit\WebKit\chromium\src\WebCString.cpp"
>
</File>
diff --git a/webkit/build/WebKit/WebKit.vsprops b/webkit/build/WebKit/WebKit.vsprops
index d9f3a80..03d48a3 100644
--- a/webkit/build/WebKit/WebKit.vsprops
+++ b/webkit/build/WebKit/WebKit.vsprops
@@ -7,6 +7,7 @@
>
<Tool
Name="VCCLCompilerTool"
+ AdditionalIncludeDirectories="$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public\win"
PreprocessorDefinitions="WEBKIT_IMPLEMENTATION;WEBKIT_USING_SKIA=1;_SCL_SECURE_NO_DEPRECATE;_HAS_EXCEPTIONS=1"
WarnAsError="true"
/>
diff --git a/webkit/build/WebKit/using_WebKit.vsprops b/webkit/build/WebKit/using_WebKit.vsprops
index fe1effd..28e1b79 100644
--- a/webkit/build/WebKit/using_WebKit.vsprops
+++ b/webkit/build/WebKit/using_WebKit.vsprops
@@ -7,7 +7,6 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public\win"
PreprocessorDefinitions="WEBKIT_USING_SKIA=1"
WarnAsError="true"
/>
diff --git a/webkit/build/webkit_common_includes.vsprops b/webkit/build/webkit_common_includes.vsprops
index bdbcb37..48cf5ac 100644
--- a/webkit/build/webkit_common_includes.vsprops
+++ b/webkit/build/webkit_common_includes.vsprops
@@ -6,6 +6,6 @@
>
<Tool
Name="VCCLCompilerTool"
- AdditionalIncludeDirectories="&quot;$(OutDir)\obj\WebCore&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore&quot;;$(SolutionDir)..\webkit\pending;$(SolutionDir)..\webkit\port\bridge;&quot;$(ProjectDir)&quot;;$(SolutionDir)..\third_party\WebKit\WebCore;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8\custom;$(SolutionDir)..\third_party\WebKit\WebCore\bridge;$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c;$(SolutionDir)..\third_party\WebKit\WebCore\css;$(SolutionDir)..\third_party\WebKit\WebCore\dom;$(SolutionDir)..\third_party\WebKit\WebCore\editing;$(SolutionDir)..\third_party\WebKit\WebCore\history;$(SolutionDir)..\third_party\WebKit\WebCore\html;$(SolutionDir)..\third_party\WebKit\WebCore\loader;$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache;$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive;$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon;$(SolutionDir)..\third_party\WebKit\WebCore\page;$(SolutionDir)..\third_party\WebKit\WebCore\page\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform;$(SolutionDir)..\third_party\WebKit\WebCore\platform\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-decoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-encoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\page\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\text;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\opentype;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\transforms;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\skia;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql;$(SolutionDir)..\third_party\WebKit\WebCore\rendering;$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style;$(SolutionDir)..\third_party\WebKit\WebCore\storage;$(SolutionDir)..\third_party\WebKit\WebCore\xml;&quot;$(SolutionDir)..\third_party\WebKit\WebCore\os-win32&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\wtf;$(SolutionDir)..\third_party\WebKit\JavaScriptCore;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf;&quot;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32&quot;;..\..\build;&quot;$(SDKIncludes)&quot;;&quot;$(IntDir)\..\WebCore\DerivedSources&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\svg;$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters;$(SolutionDir)..\third_party\WebKit\WebCore\plugins;$(SolutionDir)..\third_party\WebKit\WebCore\inspector;$(SolutionDir)..\third_party\WebKit\WebCore\workers;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public;$(SolutionDir)..\third_party\WebKit\WebKit\chromium\public\win;$(SolutionDir)..\third_party\sqlite\preprocessed"
+ AdditionalIncludeDirectories="&quot;$(OutDir)\obj\WebCore&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders&quot;;&quot;$(OutDir)\obj\WebCore\JavaScriptHeaders\JavaScriptCore&quot;;$(SolutionDir)..\webkit\pending;$(SolutionDir)..\webkit\port\bridge;&quot;$(ProjectDir)&quot;;$(SolutionDir)..\third_party\WebKit\WebCore;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8;$(SolutionDir)..\third_party\WebKit\WebCore\bindings\v8\custom;$(SolutionDir)..\third_party\WebKit\WebCore\bridge;$(SolutionDir)..\third_party\WebKit\WebCore\bridge\c;$(SolutionDir)..\third_party\WebKit\WebCore\css;$(SolutionDir)..\third_party\WebKit\WebCore\dom;$(SolutionDir)..\third_party\WebKit\WebCore\editing;$(SolutionDir)..\third_party\WebKit\WebCore\history;$(SolutionDir)..\third_party\WebKit\WebCore\html;$(SolutionDir)..\third_party\WebKit\WebCore\loader;$(SolutionDir)..\third_party\WebKit\WebCore\loader\appcache;$(SolutionDir)..\third_party\WebKit\WebCore\loader\archive;$(SolutionDir)..\third_party\WebKit\WebCore\loader\icon;$(SolutionDir)..\third_party\WebKit\WebCore\page;$(SolutionDir)..\third_party\WebKit\WebCore\page\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform;$(SolutionDir)..\third_party\WebKit\WebCore\platform\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-decoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\platform\image-encoders\skia;$(SolutionDir)..\third_party\WebKit\WebCore\page\animation;$(SolutionDir)..\third_party\WebKit\WebCore\platform\text;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\opentype;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\transforms;$(SolutionDir)..\third_party\WebKit\WebCore\platform\graphics\skia;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network;$(SolutionDir)..\third_party\WebKit\WebCore\platform\network\chromium;$(SolutionDir)..\third_party\WebKit\WebCore\platform\sql;$(SolutionDir)..\third_party\WebKit\WebCore\rendering;$(SolutionDir)..\third_party\WebKit\WebCore\rendering\style;$(SolutionDir)..\third_party\WebKit\WebCore\storage;$(SolutionDir)..\third_party\WebKit\WebCore\xml;&quot;$(SolutionDir)..\third_party\WebKit\WebCore\os-win32&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\wtf;$(SolutionDir)..\third_party\WebKit\JavaScriptCore;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\wtf;&quot;$(SolutionDir)..\third_party\WebKit\JavaScriptCore\os-win32&quot;;..\..\build;&quot;$(SDKIncludes)&quot;;&quot;$(IntDir)\..\WebCore\DerivedSources&quot;;$(SolutionDir)..\third_party\WebKit\WebCore\svg;$(SolutionDir)..\third_party\WebKit\WebCore\svg\animation;$(SolutionDir)..\third_party\WebKit\WebCore\svg\graphics\filters;$(SolutionDir)..\third_party\WebKit\WebCore\plugins;$(SolutionDir)..\third_party\WebKit\WebCore\inspector;$(SolutionDir)..\third_party\WebKit\WebCore\workers;$(SolutionDir)..\third_party\sqlite\preprocessed"
/>
</VisualStudioPropertySheet>
diff --git a/webkit/glue/SConscript b/webkit/glue/SConscript
index 3a6b91c..91dce60 100644
--- a/webkit/glue/SConscript
+++ b/webkit/glue/SConscript
@@ -39,7 +39,6 @@ input_files = [
'alt_error_page_resource_fetcher.cc',
'autofill_form.cc',
'back_forward_list_client_impl.cc',
- 'cache_manager.cc',
'chrome_client_impl.cc',
'chromium_bridge_impl.cc',
'clipboard_conversion.cc',
diff --git a/webkit/glue/cache_manager.cc b/webkit/glue/cache_manager.cc
deleted file mode 100644
index 09e43a8..0000000
--- a/webkit/glue/cache_manager.cc
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "config.h"
-
-#include "base/compiler_specific.h"
-
-MSVC_PUSH_WARNING_LEVEL(0);
-// Instead of providing accessors, we make all members of Cache public.
-// This will make it easier to track WebKit changes to the Cache class.
-#define private public
-#include "Cache.h"
-#undef private
-MSVC_POP_WARNING();
-
-#undef LOG
-#include "base/logging.h"
-#include "webkit/glue/cache_manager.h"
-
-namespace {
-
-// A helper method for coverting a WebCore::Cache::TypeStatistic to a
-// CacheManager::ResourceTypeStat.
-CacheManager::ResourceTypeStat TypeStatisticToResourceTypeStat(
- const WebCore::Cache::TypeStatistic& in_stat) {
- CacheManager::ResourceTypeStat stat;
- stat.count = static_cast<size_t>(in_stat.count);
- stat.size = static_cast<size_t>(in_stat.size);
- stat.live_size = static_cast<size_t>(in_stat.liveSize);
- stat.decoded_size = static_cast<size_t>(in_stat.decodedSize);
- return stat;
-}
-
-} // namespace
-
-// ----------------------------------------------------------------------------
-// CacheManager implementation
-
-CacheManager::CacheManager() {
-}
-
-CacheManager::~CacheManager() {
-}
-
-// static
-void CacheManager::GetUsageStats(UsageStats* result) {
- DCHECK(result);
-
- WebCore::Cache* cache = WebCore::cache();
-
- if (cache) {
- result->min_dead_capacity = cache->m_minDeadCapacity;
- result->max_dead_capacity = cache->m_maxDeadCapacity;
- result->capacity = cache->m_capacity;
- result->live_size = cache->m_liveSize;
- result->dead_size = cache->m_deadSize;
- } else {
- memset(result, 0, sizeof(UsageStats));
- }
-}
-
-// static
-void CacheManager::SetCapacities(size_t min_dead_capacity,
- size_t max_dead_capacity,
- size_t capacity) {
- WebCore::Cache* cache = WebCore::cache();
-
- if (cache) {
- cache->setCapacities(static_cast<unsigned int>(min_dead_capacity),
- static_cast<unsigned int>(max_dead_capacity),
- static_cast<unsigned int>(capacity));
- }
-}
-
-// static
-void CacheManager::GetResourceTypeStats(
- CacheManager::ResourceTypeStats* result) {
- WebCore::Cache* cache = WebCore::cache();
- if (cache) {
- WebCore::Cache::Statistics in_stats = cache->getStatistics();
- result->images = TypeStatisticToResourceTypeStat(in_stats.images);
- result->css_stylesheets = TypeStatisticToResourceTypeStat(
- in_stats.cssStyleSheets);
- result->scripts = TypeStatisticToResourceTypeStat(in_stats.scripts);
- result->xsl_stylesheets = TypeStatisticToResourceTypeStat(
- in_stats.xslStyleSheets);
- result->fonts = TypeStatisticToResourceTypeStat(in_stats.fonts);
- } else {
- memset(result, 0, sizeof(CacheManager::ResourceTypeStats));
- }
-}
diff --git a/webkit/glue/cache_manager.h b/webkit/glue/cache_manager.h
deleted file mode 100644
index bb1aa6e..0000000
--- a/webkit/glue/cache_manager.h
+++ /dev/null
@@ -1,63 +0,0 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef WEBKIT_GLUE_CACHE_MANAGER_H__
-#define WEBKIT_GLUE_CACHE_MANAGER_H__
-
-#include <stddef.h>
-
-class CacheManager {
- public:
- struct UsageStats {
- public:
- // Capacities.
- size_t min_dead_capacity;
- size_t max_dead_capacity;
- size_t capacity;
- // Utilization.
- size_t live_size;
- size_t dead_size;
- };
-
- // A struct mirroring WebCore::Cache::TypeStatistic that we can send to the
- // browser process.
- struct ResourceTypeStat {
- size_t count;
- size_t size;
- size_t live_size;
- size_t decoded_size;
- ResourceTypeStat()
- : count(0), size(0), live_size(0), decoded_size(0) {}
- };
-
- // A struct mirroring WebCore::Cache::Statistics that we can send to the
- // browser process.
- struct ResourceTypeStats {
- ResourceTypeStat images;
- ResourceTypeStat css_stylesheets;
- ResourceTypeStat scripts;
- ResourceTypeStat xsl_stylesheets;
- ResourceTypeStat fonts;
- };
-
- // Gets the usage statistics from the WebCore cache
- static void GetUsageStats(UsageStats* result);
-
- // Sets the capacities of the WebCore cache, evicting objects as necessary
- static void SetCapacities(size_t min_dead_capacity,
- size_t max_dead_capacity,
- size_t capacity);
-
- // Get usage stats about the WebCore cache.
- static void GetResourceTypeStats(ResourceTypeStats* result);
-
- private:
- // This class only has static methods. It can't be instantiated
- CacheManager();
- ~CacheManager();
-
- DISALLOW_EVIL_CONSTRUCTORS(CacheManager);
-};
-
-#endif // WEBKIT_GLUE_CACHE_MANAGER_H__
diff --git a/webkit/glue/chrome_client_impl.cc b/webkit/glue/chrome_client_impl.cc
index ddb1926..972a643 100644
--- a/webkit/glue/chrome_client_impl.cc
+++ b/webkit/glue/chrome_client_impl.cc
@@ -22,8 +22,6 @@ MSVC_PUSH_WARNING_LEVEL(0);
#endif
MSVC_POP_WARNING();
-#include "WebKit.h"
-
#undef LOG
#include "webkit/glue/chrome_client_impl.h"
@@ -31,6 +29,7 @@ MSVC_POP_WARNING();
#include "base/logging.h"
#include "base/gfx/rect.h"
#include "googleurl/src/gurl.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webinputevent.h"
@@ -40,8 +39,6 @@ MSVC_POP_WARNING();
#include "webkit/glue/webview_impl.h"
#include "webkit/glue/webwidget_impl.h"
-struct IWebURLResponse;
-
// Callback class that's given to the WebViewDelegate during a file choose
// operation.
class WebFileChooserCallbackImpl : public WebFileChooserCallback {
diff --git a/webkit/glue/chromium_bridge_impl.cc b/webkit/glue/chromium_bridge_impl.cc
index 26d7bfb..9dc8d96 100644
--- a/webkit/glue/chromium_bridge_impl.cc
+++ b/webkit/glue/chromium_bridge_impl.cc
@@ -25,8 +25,6 @@
#include "Widget.h"
#include <wtf/CurrentTime.h>
-#include "WebKit.h"
-
#undef LOG
#include "base/file_util.h"
#include "base/string_util.h"
diff --git a/webkit/glue/editor_client_impl.cc b/webkit/glue/editor_client_impl.cc
index b4ba417..411c514 100644
--- a/webkit/glue/editor_client_impl.cc
+++ b/webkit/glue/editor_client_impl.cc
@@ -6,10 +6,8 @@
// and I'm not really sure what to do about most of them.
#include "config.h"
+#include "webkit/glue/editor_client_impl.h"
-#include "base/compiler_specific.h"
-
-MSVC_PUSH_WARNING_LEVEL(0);
#include "Document.h"
#include "EditCommand.h"
#include "Editor.h"
@@ -24,13 +22,11 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "PlatformKeyboardEvent.h"
#include "PlatformString.h"
#include "RenderObject.h"
-MSVC_POP_WARNING();
-
-#include "WebKit.h"
#undef LOG
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/autofill_form.h"
#include "webkit/glue/editor_client_impl.h"
#include "webkit/glue/glue_util.h"
diff --git a/webkit/glue/editor_client_impl.h b/webkit/glue/editor_client_impl.h
index c503bfc..5467470 100644
--- a/webkit/glue/editor_client_impl.h
+++ b/webkit/glue/editor_client_impl.h
@@ -5,16 +5,12 @@
#ifndef WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__
#define WEBKIT_GLUE_EDITOR_CLIENT_IMPL_H__
-#include "base/compiler_specific.h"
-#include "base/task.h"
-
-#include "build/build_config.h"
-
#include <deque>
-MSVC_PUSH_WARNING_LEVEL(0);
+#include "DOMWindow.h"
#include "EditorClient.h"
-MSVC_POP_WARNING();
+
+#include "base/task.h"
namespace WebCore {
class Frame;
diff --git a/webkit/glue/event_conversion.cc b/webkit/glue/event_conversion.cc
index 27125f2..826c02f 100644
--- a/webkit/glue/event_conversion.cc
+++ b/webkit/glue/event_conversion.cc
@@ -3,25 +3,19 @@
// found in the LICENSE file.
#include "config.h"
-
-#include "base/compiler_specific.h"
+#include "webkit/glue/event_conversion.h"
#include "KeyboardCodes.h"
#include "StringImpl.h" // This is so that the KJS build works
-
-MSVC_PUSH_WARNING_LEVEL(0);
#include "PlatformKeyboardEvent.h"
#include "PlatformMouseEvent.h"
#include "PlatformWheelEvent.h"
#include "Widget.h"
-MSVC_POP_WARNING();
-
-#include "WebKit.h"
#undef LOG
#include "base/gfx/point.h"
#include "base/logging.h"
-#include "webkit/glue/event_conversion.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webinputevent.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/webkit/glue/glue.vcproj b/webkit/glue/glue.vcproj
index 08b5246..5379315 100644
--- a/webkit/glue/glue.vcproj
+++ b/webkit/glue/glue.vcproj
@@ -133,10 +133,6 @@
>
</File>
<File
- RelativePath=".\cache_manager.h"
- >
- </File>
- <File
RelativePath=".\console_message_level.h"
>
</File>
@@ -321,10 +317,6 @@
>
</File>
<File
- RelativePath=".\cache_manager.cc"
- >
- </File>
- <File
RelativePath=".\chrome_client_impl.cc"
>
</File>
diff --git a/webkit/glue/glue_util.cc b/webkit/glue/glue_util.cc
index 25002cb..05a395a 100644
--- a/webkit/glue/glue_util.cc
+++ b/webkit/glue/glue_util.cc
@@ -3,20 +3,14 @@
// found in the LICENSE file.
#include "config.h"
-#include "base/compiler_specific.h"
-
#include "webkit/glue/glue_util.h"
#include <string>
-MSVC_PUSH_WARNING_LEVEL(0);
#include "CString.h"
#include "IntRect.h"
#include "PlatformString.h"
#include "KURL.h"
-MSVC_POP_WARNING();
-
-#include "WebString.h"
#undef LOG
#include "base/compiler_specific.h"
@@ -25,6 +19,7 @@ MSVC_POP_WARNING();
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "googleurl/src/gurl.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
// TODO(darin): This file will be deleted once we complete the move to
diff --git a/webkit/glue/simple_webmimeregistry_impl.cc b/webkit/glue/simple_webmimeregistry_impl.cc
index 00b8310..1d6ebed 100644
--- a/webkit/glue/simple_webmimeregistry_impl.cc
+++ b/webkit/glue/simple_webmimeregistry_impl.cc
@@ -4,11 +4,10 @@
#include "webkit/glue/simple_webmimeregistry_impl.h"
-#include "WebString.h"
-
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "net/base/mime_util.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/glue_util.h"
using WebKit::WebString;
diff --git a/webkit/glue/simple_webmimeregistry_impl.h b/webkit/glue/simple_webmimeregistry_impl.h
index 778dee0..4857c8f 100644
--- a/webkit/glue/simple_webmimeregistry_impl.h
+++ b/webkit/glue/simple_webmimeregistry_impl.h
@@ -5,7 +5,7 @@
#ifndef WEBMIMEREGISTRY_IMPL_H_
#define WEBMIMEREGISTRY_IMPL_H_
-#include "WebMimeRegistry.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebMimeRegistry.h"
namespace webkit_glue {
diff --git a/webkit/glue/webclipboard_impl.cc b/webkit/glue/webclipboard_impl.cc
index 04b0ef6..5989c06 100644
--- a/webkit/glue/webclipboard_impl.cc
+++ b/webkit/glue/webclipboard_impl.cc
@@ -4,16 +4,15 @@
#include "webkit/glue/webclipboard_impl.h"
-#include "WebImage.h"
-#include "WebString.h"
-#include "WebURL.h"
-
#include "base/clipboard.h"
#include "base/logging.h"
#include "base/string_util.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "net/base/escape.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebImage.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "webkit/glue/scoped_clipboard_writer_glue.h"
#include "webkit/glue/webkit_glue.h"
diff --git a/webkit/glue/webclipboard_impl.h b/webkit/glue/webclipboard_impl.h
index 2be3ea6..6640203 100644
--- a/webkit/glue/webclipboard_impl.h
+++ b/webkit/glue/webclipboard_impl.h
@@ -5,7 +5,7 @@
#ifndef WEBCLIPBOARD_IMPL_H_
#define WEBCLIPBOARD_IMPL_H_
-#include "WebClipboard.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebClipboard.h"
namespace webkit_glue {
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc
index ac90657..3362c03 100644
--- a/webkit/glue/webkit_glue.cc
+++ b/webkit/glue/webkit_glue.cc
@@ -2,17 +2,14 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/compiler_specific.h"
-#include "build/build_config.h"
+#include "config.h"
+#include "webkit/glue/webkit_glue.h"
#if defined(OS_WIN)
#include <objidl.h>
#include <mlang.h>
#endif
-#include "config.h"
-#include "webkit_version.h"
-MSVC_PUSH_WARNING_LEVEL(0);
#include "BackForwardList.h"
#include "Document.h"
#include "FrameTree.h"
@@ -27,13 +24,8 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "RenderView.h"
#include "ScriptController.h"
#include "SharedBuffer.h"
-MSVC_POP_WARNING();
-
-#include "WebString.h"
#undef LOG
-#include "webkit/glue/webkit_glue.h"
-
#include "base/file_version_info.h"
#include "base/singleton.h"
#include "base/string_piece.h"
@@ -41,12 +33,15 @@ MSVC_POP_WARNING();
#include "base/sys_info.h"
#include "base/sys_string_conversions.h"
#include "skia/include/SkBitmap.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "webkit/glue/event_conversion.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/weburlrequest_impl.h"
#include "webkit/glue/webframe_impl.h"
#include "webkit/glue/webview_impl.h"
+#include "webkit_version.h" // Generated
+
//------------------------------------------------------------------------------
// webkit_glue impl:
diff --git a/webkit/glue/webkitclient_impl.cc b/webkit/glue/webkitclient_impl.cc
index 3eaa180..bd50df5 100644
--- a/webkit/glue/webkitclient_impl.cc
+++ b/webkit/glue/webkitclient_impl.cc
@@ -4,12 +4,11 @@
#include "webkit/glue/webkitclient_impl.h"
-#include "WebCString.h"
-
#include "base/message_loop.h"
#include "base/stats_counters.h"
#include "base/trace_event.h"
#include "grit/webkit_resources.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebClipboard;
diff --git a/webkit/glue/webkitclient_impl.h b/webkit/glue/webkitclient_impl.h
index a04831b..e53605d 100644
--- a/webkit/glue/webkitclient_impl.h
+++ b/webkit/glue/webkitclient_impl.h
@@ -5,11 +5,9 @@
#ifndef WEBKIT_CLIENT_IMPL_H_
#define WEBKIT_CLIENT_IMPL_H_
-#include "WebKitClient.h"
-
#include "base/timer.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
#include "webkit/glue/webclipboard_impl.h"
-
#if defined(OS_WIN)
#include "webkit/glue/webthemeengine_impl_win.h"
#endif
diff --git a/webkit/glue/webplugin_impl.cc b/webkit/glue/webplugin_impl.cc
index 2bb5916..1db23f9 100644
--- a/webkit/glue/webplugin_impl.cc
+++ b/webkit/glue/webplugin_impl.cc
@@ -3,11 +3,8 @@
// found in the LICENSE file.
#include "config.h"
+#include "webkit/glue/webplugin_impl.h"
-#include "base/compiler_specific.h"
-#include "build/build_config.h"
-
-MSVC_PUSH_WARNING_LEVEL(0);
#include "Cursor.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -40,27 +37,23 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "ScriptValue.h"
#include "ScrollView.h"
#include "Widget.h"
-MSVC_POP_WARNING();
-
-#include "WebKit.h"
-#include "WebKitClient.h"
-#include "WebString.h"
-#include "WebURL.h"
#undef LOG
-
#include "base/gfx/rect.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/sys_string_conversions.h"
#include "net/base/escape.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 "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "webkit/glue/chrome_client_impl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/multipart_response_delegate.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webkit_glue.h"
-#include "webkit/glue/webplugin_impl.h"
#include "webkit/glue/plugins/plugin_host.h"
#include "webkit/glue/plugins/plugin_instance.h"
#include "webkit/glue/stacking_order_iterator.h"
diff --git a/webkit/glue/webthemeengine_impl_win.cc b/webkit/glue/webthemeengine_impl_win.cc
index 0ab5bf3..19260ce2 100644
--- a/webkit/glue/webthemeengine_impl_win.cc
+++ b/webkit/glue/webthemeengine_impl_win.cc
@@ -4,10 +4,9 @@
#include "webkit/glue/webthemeengine_impl_win.h"
-#include "WebRect.h"
-
#include "base/gfx/native_theme.h"
#include "skia/ext/skia_utils_win.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
using WebKit::WebCanvas;
using WebKit::WebColor;
diff --git a/webkit/glue/webthemeengine_impl_win.h b/webkit/glue/webthemeengine_impl_win.h
index d95d041..c284527 100644
--- a/webkit/glue/webthemeengine_impl_win.h
+++ b/webkit/glue/webthemeengine_impl_win.h
@@ -5,7 +5,7 @@
#ifndef WEBTHEMEENGINE_IMPL_WIN_H_
#define WEBTHEMEENGINE_IMPL_WIN_H_
-#include "WebThemeEngine.h"
+#include "third_party/WebKit/WebKit/chromium/public/win/WebThemeEngine.h"
namespace webkit_glue {
diff --git a/webkit/tools/test_shell/test_shell_main.cc b/webkit/tools/test_shell/test_shell_main.cc
index fb0ecae..0b096a6a 100644
--- a/webkit/tools/test_shell/test_shell_main.cc
+++ b/webkit/tools/test_shell/test_shell_main.cc
@@ -2,8 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Creates an instance of the test_shell.
-#include "build/build_config.h"
+#include <iostream>
#include "base/at_exit.h"
#include "base/basictypes.h"
@@ -25,6 +24,7 @@
#include "net/http/http_cache.h"
#include "net/base/ssl_test_util.h"
#include "net/url_request/url_request_context.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/window_open_disposition.h"
#include "webkit/extensions/v8/gc_extension.h"
@@ -37,9 +37,6 @@
#include "webkit/tools/test_shell/test_shell_switches.h"
#include "webkit/tools/test_shell/test_shell_webkit_init.h"
-#include "WebKit.h"
-
-#include <iostream>
using namespace std;
static const size_t kPathBufSize = 2048;
diff --git a/webkit/tools/test_shell/test_shell_webkit_init.h b/webkit/tools/test_shell/test_shell_webkit_init.h
index 4ca5ac1..b0ae2d2 100644
--- a/webkit/tools/test_shell/test_shell_webkit_init.h
+++ b/webkit/tools/test_shell/test_shell_webkit_init.h
@@ -6,6 +6,10 @@
#define WEBKIT_TOOLS_TEST_SHELL_TEST_SHELL_WEBKIT_INIT_H_
#include "base/string_util.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/webkitclient_impl.h"
@@ -14,11 +18,6 @@
#include "webkit/tools/test_shell/simple_resource_loader_bridge.h"
#include "v8/include/v8.h"
-#include "WebCString.h"
-#include "WebKit.h"
-#include "WebString.h"
-#include "WebURL.h"
-
class TestShellWebKitInit : public webkit_glue::WebKitClientImpl {
public:
TestShellWebKitInit(bool layout_test_mode) {
diff --git a/webkit/tools/test_shell/test_webview_delegate.cc b/webkit/tools/test_shell/test_webview_delegate.cc
index 5b5af94..2a39260 100755
--- a/webkit/tools/test_shell/test_webview_delegate.cc
+++ b/webkit/tools/test_shell/test_webview_delegate.cc
@@ -8,8 +8,6 @@
#include "webkit/tools/test_shell/test_webview_delegate.h"
-#include "WebKit.h"
-
#include "base/file_util.h"
#include "base/gfx/point.h"
#include "base/gfx/native_widget_types.h"
@@ -17,6 +15,7 @@
#include "base/string_util.h"
#include "base/trace_event.h"
#include "net/base/net_errors.h"
+#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "webkit/glue/webdatasource.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/weberror.h"
@@ -163,7 +162,7 @@ std::string TestWebViewDelegate::GetResourceDescription(uint32 identifier) {
void TestWebViewDelegate::WillSendRequest(WebView* webview,
uint32 identifier,
WebRequest* request) {
- GURL url = request->GetURL();
+ GURL url = request->GetURL();
std::string request_url = url.possibly_invalid_spec();
std::string host = request->GetURL().host();
@@ -180,7 +179,7 @@ void TestWebViewDelegate::WillSendRequest(WebView* webview,
// back an error.
host != "localhost") {
printf("Blocked access to external URL %s\n", request_url.c_str());
-
+
// To block the request, we set its URL to an empty one.
request->SetURL(GURL());
return;
diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp
index 9345512..2129e7d 100644
--- a/webkit/webkit.gyp
+++ b/webkit/webkit.gyp
@@ -4106,6 +4106,7 @@
'../third_party/WebKit/WebKit/chromium/src/ChromiumBridge.cpp',
'../third_party/WebKit/WebKit/chromium/src/ChromiumCurrentTime.cpp',
'../third_party/WebKit/WebKit/chromium/src/ChromiumThreading.cpp',
+ '../third_party/WebKit/WebKit/chromium/src/WebCache.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebCString.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebImageSkia.cpp',
'../third_party/WebKit/WebKit/chromium/src/WebKit.cpp',
@@ -4253,8 +4254,6 @@
'glue/autofill_form.h',
'glue/back_forward_list_client_impl.cc',
'glue/back_forward_list_client_impl.h',
- 'glue/cache_manager.cc',
- 'glue/cache_manager.h',
'glue/chrome_client_impl.cc',
'glue/chrome_client_impl.h',
'glue/chromium_bridge_impl.cc',