diff options
Diffstat (limited to 'webkit/glue')
-rw-r--r-- | webkit/glue/SConscript | 1 | ||||
-rw-r--r-- | webkit/glue/cache_manager.cc | 92 | ||||
-rw-r--r-- | webkit/glue/cache_manager.h | 63 | ||||
-rw-r--r-- | webkit/glue/chrome_client_impl.cc | 5 | ||||
-rw-r--r-- | webkit/glue/chromium_bridge_impl.cc | 2 | ||||
-rw-r--r-- | webkit/glue/editor_client_impl.cc | 8 | ||||
-rw-r--r-- | webkit/glue/editor_client_impl.h | 10 | ||||
-rw-r--r-- | webkit/glue/event_conversion.cc | 10 | ||||
-rw-r--r-- | webkit/glue/glue.vcproj | 8 | ||||
-rw-r--r-- | webkit/glue/glue_util.cc | 7 | ||||
-rw-r--r-- | webkit/glue/simple_webmimeregistry_impl.cc | 3 | ||||
-rw-r--r-- | webkit/glue/simple_webmimeregistry_impl.h | 2 | ||||
-rw-r--r-- | webkit/glue/webclipboard_impl.cc | 7 | ||||
-rw-r--r-- | webkit/glue/webclipboard_impl.h | 2 | ||||
-rw-r--r-- | webkit/glue/webkit_glue.cc | 15 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.cc | 3 | ||||
-rw-r--r-- | webkit/glue/webkitclient_impl.h | 4 | ||||
-rw-r--r-- | webkit/glue/webplugin_impl.cc | 17 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.cc | 3 | ||||
-rw-r--r-- | webkit/glue/webthemeengine_impl_win.h | 2 |
20 files changed, 29 insertions, 235 deletions
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 { |