diff options
author | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-24 22:10:20 +0000 |
---|---|---|
committer | darin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-07-24 22:10:20 +0000 |
commit | 6bd867b0c6db7782ad5afae9d990e924bfc6d311 (patch) | |
tree | 41c1d97aa4d0a262fa3105087d272c5a327dd078 /webkit/glue/webkit_glue.cc | |
parent | d5f52957f885b07309142180cbc6a06f2a36e25a (diff) | |
download | chromium_src-6bd867b0c6db7782ad5afae9d990e924bfc6d311.zip chromium_src-6bd867b0c6db7782ad5afae9d990e924bfc6d311.tar.gz chromium_src-6bd867b0c6db7782ad5afae9d990e924bfc6d311.tar.bz2 |
Thin out webkit_glue.{h,cc} a bit more.
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/19931009
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@213529 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webkit_glue.cc')
-rw-r--r-- | webkit/glue/webkit_glue.cc | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/webkit/glue/webkit_glue.cc b/webkit/glue/webkit_glue.cc index 4c832f3..30b03e5 100644 --- a/webkit/glue/webkit_glue.cc +++ b/webkit/glue/webkit_glue.cc @@ -4,65 +4,16 @@ #include "webkit/glue/webkit_glue.h" -#if defined(OS_LINUX) -#include <malloc.h> -#endif - #include "base/logging.h" -#include "base/memory/scoped_ptr.h" -#include "base/process_util.h" -#include "base/strings/string_tokenizer.h" -#include "base/strings/string_util.h" -#include "base/strings/stringprintf.h" -#include "net/base/escape.h" -#include "skia/ext/platform_canvas.h" #include "third_party/WebKit/public/platform/WebFileInfo.h" -#include "third_party/WebKit/public/web/WebFrame.h" -#include "third_party/WebKit/public/web/WebGlyphCache.h" -#include "third_party/WebKit/public/web/WebKit.h" -#include "third_party/skia/include/core/SkBitmap.h" #include "v8/include/v8.h" -using WebKit::WebCanvas; -using WebKit::WebFrame; -using WebKit::WebGlyphCache; - -//------------------------------------------------------------------------------ -// webkit_glue impl: - namespace webkit_glue { void SetJavaScriptFlags(const std::string& str) { v8::V8::SetFlagsFromString(str.data(), static_cast<int>(str.size())); } -void EnableWebCoreLogChannels(const std::string& channels) { - if (channels.empty()) - return; - base::StringTokenizer t(channels, ", "); - while (t.GetNext()) { - WebKit::enableLogChannel(t.token().c_str()); - } -} - -#ifndef NDEBUG -// The log macro was having problems due to collisions with WTF, so we just -// code here what that would have inlined. -void DumpLeakedObject(const char* file, int line, const char* object, - int count) { - std::string msg = base::StringPrintf("%s LEAKED %d TIMES", object, count); - logging::LogMessage(file, line).stream() << msg; -} -#endif - -void CheckForLeaks() { -#ifndef NDEBUG - int count = WebFrame::instanceCount(); - if (count) - DumpLeakedObject(__FILE__, __LINE__, "WebFrame", count); -#endif -} - void PlatformFileInfoToWebFileInfo( const base::PlatformFileInfo& file_info, WebKit::WebFileInfo* web_file_info) { @@ -79,14 +30,6 @@ void PlatformFileInfoToWebFileInfo( web_file_info->type = WebKit::WebFileInfo::TypeFile; } -WebCanvas* ToWebCanvas(skia::PlatformCanvas* canvas) { - return canvas; -} - -int GetGlyphPageCount() { - return WebGlyphCache::pageCount(); -} - COMPILE_ASSERT(std::numeric_limits<double>::has_quiet_NaN, has_quiet_NaN); -} // namespace webkit_glue +} // namespace webkit_glue |