Skip to content

Commit

Permalink
Eliminate WebCore include paths when compiling Chromium code.
Browse files Browse the repository at this point in the history
In the process of trying to do this, I discovered some unnecessary
config.h includes as well as some remaining WebCore function calls.

R=dglazkov
BUG=none
TEST=none

Review URL: http://codereview.chromium.org/1521010

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43574 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
darin@chromium.org committed Apr 3, 2010
1 parent 215160a commit e0d92f2
Show file tree
Hide file tree
Showing 19 changed files with 23 additions and 100 deletions.
4 changes: 0 additions & 4 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,6 @@ include_rules = [
# this should probably change.
"+unicode",
"+testing",

# Allow anybody to include files from the "public" Skia directory in the
# webkit port. This is shared between the webkit port and Chrome.
"+webkit/port/platform/graphics/skia/public",
]


Expand Down
7 changes: 1 addition & 6 deletions chrome/chrome_browser.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
'../webkit/webkit.gyp:appcache',
'../webkit/webkit.gyp:database',
'../webkit/webkit.gyp:glue',
'../webkit/webkit.gyp:webkit_resources',
],
'include_dirs': [
'..',
Expand Down Expand Up @@ -3071,12 +3072,6 @@
'browser/jumplist.cc',
],
}],
# views depends on webkit headers.
['OS=="win" or chromeos==1 or toolkit_views==1',{
'dependencies': [
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
],
}],
],
},
{
Expand Down
4 changes: 1 addition & 3 deletions chrome/chrome_renderer.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,9 @@
'../third_party/icu/icu.gyp:icui18n',
'../third_party/icu/icu.gyp:icuuc',
'../third_party/npapi/npapi.gyp:npapi',
# TODO(yaar): Should only stop depending on webcore and depend
# only on webkit.
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../webkit/webkit.gyp:glue',
'../webkit/webkit.gyp:webkit_resources',
],
'include_dirs': [
'..',
Expand Down
3 changes: 1 addition & 2 deletions chrome/renderer/render_thread.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@

#include "chrome/renderer/render_thread.h"

#include <v8.h>

#include <algorithm>
#include <limits>
#include <map>
Expand Down Expand Up @@ -80,6 +78,7 @@
#include "webkit/extensions/v8/gears_extension.h"
#include "webkit/extensions/v8/interval_extension.h"
#include "webkit/extensions/v8/playback_extension.h"
#include "v8/include/v8.h"

#if defined(OS_WIN)
#include <windows.h>
Expand Down
3 changes: 0 additions & 3 deletions skia/ext/platform_canvas_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

#include "SkColor.h"

// TODO(maruel): Removes once notImplemented() is not necessary anymore.
#include "NotImplemented.h"

namespace skia {

namespace {
Expand Down
9 changes: 4 additions & 5 deletions webkit/extensions/v8/benchmarking_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "Cache.h"
#include "base/stats_table.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCache.h"
#include "webkit/extensions/v8/benchmarking_extension.h"
#include "webkit/glue/webkit_glue.h"

using WebKit::WebCache;

namespace extensions_v8 {

const char* kBenchmarkingExtensionName = "v8/Benchmarking";
Expand Down Expand Up @@ -57,9 +58,7 @@ class BenchmarkingWrapper : public v8::Extension {
// TODO(mbelshe): should be enable/disable?
webkit_glue::SetCacheMode(false);

// Disabling and re-enabling the cache forces it to flush.
WebCore::cache()->setDisabled(true);
WebCore::cache()->setDisabled(false);
WebCache::clear();
return v8::Undefined();
}

Expand Down
1 change: 0 additions & 1 deletion webkit/extensions/v8/gc_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "webkit/extensions/v8/gc_extension.h"

namespace extensions_v8 {
Expand Down
1 change: 0 additions & 1 deletion webkit/extensions/v8/gears_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "webkit/extensions/v8/gears_extension.h"

namespace extensions_v8 {
Expand Down
1 change: 0 additions & 1 deletion webkit/extensions/v8/interval_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "webkit/extensions/v8/interval_extension.h"
#include "base/time.h"

Expand Down
1 change: 0 additions & 1 deletion webkit/extensions/v8/playback_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "webkit/extensions/v8/playback_extension.h"

namespace extensions_v8 {
Expand Down
1 change: 0 additions & 1 deletion webkit/extensions/v8/profiler_extension.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"
#include "webkit/extensions/v8/profiler_extension.h"

#include "base/profiler.h"
Expand Down
4 changes: 3 additions & 1 deletion webkit/glue/webkit_glue.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@
'dependencies': [
'<(DEPTH)/app/app.gyp:app_base',
'<(DEPTH)/net/net.gyp:net',
'<(webkit_src_dir)/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/icu/icu.gyp:icui18n',
'<(DEPTH)/third_party/icu/icu.gyp:icuuc',
'<(webkit_src_dir)/WebKit/chromium/WebKit.gyp:webkit',
'webkit_resources',
'webkit_strings',
],
Expand Down
2 changes: 0 additions & 2 deletions webkit/tools/test_shell/image_decoder_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "config.h"

#include "webkit/tools/test_shell/image_decoder_unittest.h"

#include "base/file_path.h"
Expand Down
6 changes: 0 additions & 6 deletions webkit/tools/test_shell/image_decoder_unittest.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@
#include <string>
#include <vector>

#if COMPILER(MSVC)
#pragma warning(disable: 4355) // 'this' used in initializer list
#endif

#undef LOG

#include "base/basictypes.h"
#include "base/file_path.h"
#include "base/scoped_ptr.h"
Expand Down
5 changes: 2 additions & 3 deletions webkit/tools/test_shell/test_shell.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,12 @@
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/testing/gmock.gyp:gmock',
'<(DEPTH)/testing/gtest.gyp:gtest',
'<(DEPTH)/third_party/npapi/npapi.gyp:npapi',
'<(DEPTH)/third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'<(DEPTH)/webkit/webkit.gyp:appcache',
'<(DEPTH)/webkit/webkit.gyp:database',
'<(DEPTH)/webkit/webkit.gyp:glue',
'<(DEPTH)/webkit/webkit.gyp:inspector_resources',
'<(DEPTH)/webkit/webkit.gyp:webkit_resources',
'<(DEPTH)/webkit/webkit.gyp:webkit_support',
'npapi_layout_test_plugin',
],
Expand Down Expand Up @@ -118,7 +117,6 @@
'export_dependent_settings': [
'<(DEPTH)/base/base.gyp:base',
'<(DEPTH)/net/net.gyp:net',
'<(DEPTH)/third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'<(DEPTH)/third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'<(DEPTH)/webkit/webkit.gyp:glue',
],
Expand Down Expand Up @@ -238,6 +236,7 @@
'dependencies': [
'test_shell_common',
'<(DEPTH)/net/net.gyp:net_test_support',
'<(DEPTH)/skia/skia.gyp:skia',
'<(DEPTH)/tools/imagediff/image_diff.gyp:image_diff',
],
'defines': [
Expand Down
4 changes: 4 additions & 0 deletions webkit/tools/test_shell/test_shell_main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@
#include "webkit/tools/test_shell/test_shell_switches.h"
#include "webkit/tools/test_shell/test_shell_webkit_init.h"

#if defined(OS_WIN)
#pragma warning(disable: 4996)
#endif

static const size_t kPathBufSize = 2048;

using WebKit::WebScriptController;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
#include "base/chrome_application_mac.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
#include "webkit/tools/test_shell/test_shell.h"
#include "webkit/tools/test_shell/test_shell_platform_delegate.h"
#include "webkit/tools/test_shell/test_shell_switches.h"
#include "WebSystemInterface.h"

static NSAutoreleasePool *gTestShellAutoreleasePool = nil;

Expand Down
32 changes: 3 additions & 29 deletions webkit/tools/webcore_unit_tests/BMPImageDecoder_unittest.cpp
Original file line number Diff line number Diff line change
@@ -1,32 +1,6 @@
// Copyright (c) 2008, Google Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "config.h"
// Copyright (c) 2010 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 "third_party/WebKit/WebKit/chromium/public/WebImageDecoder.h"
#include "webkit/tools/test_shell/image_decoder_unittest.h"
Expand Down
33 changes: 3 additions & 30 deletions webkit/tools/webcore_unit_tests/ICOImageDecoder_unittest.cpp
Original file line number Diff line number Diff line change
@@ -1,33 +1,6 @@
// Copyright (c) 2008, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

#include "config.h"
// Copyright (c) 2010 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 "base/file_path.h"
#include "base/file_util.h"
Expand Down

0 comments on commit e0d92f2

Please sign in to comment.