diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 01:13:23 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-29 01:13:23 +0000 |
commit | 031e4d30e56ca9fc438e7e32bf6e51bdee74e8d0 (patch) | |
tree | fd9e8d470de5f79c0e531fecc1338ca6197974a7 /webkit | |
parent | e76049f366a8ffd17708d8915d7d3881b35d53a4 (diff) | |
download | chromium_src-031e4d30e56ca9fc438e7e32bf6e51bdee74e8d0.zip chromium_src-031e4d30e56ca9fc438e7e32bf6e51bdee74e8d0.tar.gz chromium_src-031e4d30e56ca9fc438e7e32bf6e51bdee74e8d0.tar.bz2 |
linux: reduce header interdependencies
By analyzing gcc -H output, I found some of our worst offenders for
headers bringing in other headers. native_web_keyboard_event.h was
responsible for just under 60,000 extra includes!
This change will in theory make the build faster.
Review URL: http://codereview.chromium.org/524004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35326 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/webcursor.h | 8 | ||||
-rw-r--r-- | webkit/glue/webcursor_gtk.cc | 2 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_webview_delegate_gtk.cc | 3 | ||||
-rw-r--r-- | webkit/webkit.gyp | 4 |
4 files changed, 6 insertions, 11 deletions
diff --git a/webkit/glue/webcursor.h b/webkit/glue/webcursor.h index 32c8a2b..8697f731 100644 --- a/webkit/glue/webcursor.h +++ b/webkit/glue/webcursor.h @@ -16,10 +16,7 @@ typedef struct HINSTANCE__* HINSTANCE; typedef struct HICON__* HICON; typedef HICON HCURSOR; #elif defined(USE_X11) -// GdkCursorType is an enum, which we can't forward-declare. :( -// If you work around this, be sure to fix webkit_glue.gyp:glue to not put -// GTK in the export_dependent_settings section! -#include <gdk/gdkcursor.h> +typedef struct _GdkCursor GdkCursor; #elif defined(OS_MACOSX) #ifdef __OBJC__ @class NSCursor; @@ -81,7 +78,8 @@ class WebCursor { // Return the stock GdkCursorType for this cursor, or GDK_CURSOR_IS_PIXMAP // if it's a custom cursor. Return GDK_LAST_CURSOR to indicate that the cursor // should be set to the system default. - GdkCursorType GetCursorType() const; + // Returns an int so we don't need to include GDK headers in this header file. + int GetCursorType() const; // Return a new GdkCursor* for this cursor. Only valid if GetCursorType // returns GDK_CURSOR_IS_PIXMAP. diff --git a/webkit/glue/webcursor_gtk.cc b/webkit/glue/webcursor_gtk.cc index abcbaec..011005f 100644 --- a/webkit/glue/webcursor_gtk.cc +++ b/webkit/glue/webcursor_gtk.cc @@ -40,7 +40,7 @@ GdkCursor* GetInlineCustomCursor(CustomCursorType type) { } // end anonymous namespace -GdkCursorType WebCursor::GetCursorType() const { +int WebCursor::GetCursorType() const { // http://library.gnome.org/devel/gdk/2.12/gdk-Cursors.html has images // of the default X theme, but beware that the user's cursor theme can // change everything. diff --git a/webkit/tools/test_shell/test_webview_delegate_gtk.cc b/webkit/tools/test_shell/test_webview_delegate_gtk.cc index 66207e1..9da1f69 100644 --- a/webkit/tools/test_shell/test_webview_delegate_gtk.cc +++ b/webkit/tools/test_shell/test_webview_delegate_gtk.cc @@ -114,7 +114,8 @@ void TestWebViewDelegate::closeWidgetSoon() { void TestWebViewDelegate::didChangeCursor(const WebCursorInfo& cursor_info) { current_cursor_.InitFromCursorInfo(cursor_info); - GdkCursorType cursor_type = current_cursor_.GetCursorType(); + GdkCursorType cursor_type = + static_cast<GdkCursorType>(current_cursor_.GetCursorType()); GdkCursor* gdk_cursor; if (cursor_type == GDK_CURSOR_IS_PIXMAP) { // TODO(port): WebKit bug https://bugs.webkit.org/show_bug.cgi?id=16388 is diff --git a/webkit/webkit.gyp b/webkit/webkit.gyp index 2f34ff5..37699cb 100644 --- a/webkit/webkit.gyp +++ b/webkit/webkit.gyp @@ -416,10 +416,6 @@ '../build/linux/system.gyp:gtk', '../base/base.gyp:linux_versioninfo', ], - 'export_dependent_settings': [ - # Users of webcursor.h need the GTK include path. - '../build/linux/system.gyp:gtk', - ], 'sources!': [ 'glue/plugins/plugin_stubs.cc', ], |