diff options
25 files changed, 53 insertions, 31 deletions
diff --git a/app/gfx/native_widget_types.h b/app/gfx/native_widget_types.h index eda722d..ba845a0 100644 --- a/app/gfx/native_widget_types.h +++ b/app/gfx/native_widget_types.h @@ -48,10 +48,10 @@ class NSTextField; #endif // __OBJC__ #elif defined(USE_X11) typedef struct _GdkCursor GdkCursor; +typedef struct _GdkRegion GdkRegion; typedef struct _GtkWidget GtkWidget; typedef struct _GtkWindow GtkWindow; typedef struct _cairo cairo_t; -typedef struct _GdkRegion GdkRegion; #endif namespace gfx { diff --git a/base/scoped_handle_gtk.h b/app/scoped_handle_gtk.h index 06dd64d..d501f91 100644 --- a/base/scoped_handle_gtk.h +++ b/app/scoped_handle_gtk.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef BASE_SCOPED_HANDLE_GTK_H_ -#define BASE_SCOPED_HANDLE_GTK_H_ +#ifndef APP_SCOPED_HANDLE_GTK_H_ +#define APP_SCOPED_HANDLE_GTK_H_ #include <gdk/gdk.h> @@ -47,4 +47,4 @@ class ScopedRegion { DISALLOW_COPY_AND_ASSIGN(ScopedRegion); }; -#endif // BASE_SCOPED_HANDLE_GTK_H_ +#endif // APP_SCOPED_HANDLE_GTK_H_ diff --git a/app/theme_provider.h b/app/theme_provider.h index 0bd7ae1..13b421e 100644 --- a/app/theme_provider.h +++ b/app/theme_provider.h @@ -11,7 +11,8 @@ #include "third_party/skia/include/core/SkColor.h" #if defined(OS_LINUX) -#include <gdk/gdk.h> +typedef struct _GdkColor GdkColor; +typedef struct _GdkPixbuf GdkPixbuf; #elif defined(OS_MACOSX) #ifdef __OBJC__ @class NSColor; diff --git a/base/scoped_handle.h b/base/scoped_handle.h index 0b97ff0..e53b2dd 100644 --- a/base/scoped_handle.h +++ b/base/scoped_handle.h @@ -11,8 +11,6 @@ #if defined(OS_WIN) #include "base/scoped_handle_win.h" -#elif defined(OS_POSIX) && !defined(OS_MACOSX) -#include "base/scoped_handle_gtk.h" #endif class ScopedStdioHandle { diff --git a/chrome/browser/browser_theme_pack.cc b/chrome/browser/browser_theme_pack.cc index 638cca2..acfa24e 100644 --- a/chrome/browser/browser_theme_pack.cc +++ b/chrome/browser/browser_theme_pack.cc @@ -8,6 +8,7 @@ #include "app/gfx/codec/png_codec.h" #include "app/gfx/skbitmap_operations.h" +#include "app/resource_bundle.h" #include "base/data_pack.h" #include "base/logging.h" #include "base/stl_util-inl.h" diff --git a/chrome/browser/browser_theme_provider.cc b/chrome/browser/browser_theme_provider.cc index ae08fa8..46bf290 100644 --- a/chrome/browser/browser_theme_provider.cc +++ b/chrome/browser/browser_theme_provider.cc @@ -6,6 +6,7 @@ #include "app/gfx/codec/png_codec.h" #include "app/gfx/skbitmap_operations.h" +#include "app/resource_bundle.h" #include "base/file_util.h" #include "base/stl_util-inl.h" #include "base/string_util.h" diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h index 756e2bc..1474c24 100644 --- a/chrome/browser/browser_theme_provider.h +++ b/chrome/browser/browser_theme_provider.h @@ -8,22 +8,23 @@ #include <map> #include <set> #include <string> -#include <vector> -#include "app/gfx/color_utils.h" -#include "app/resource_bundle.h" #include "app/theme_provider.h" -#include "base/basictypes.h" -#include "base/lock.h" #include "base/non_thread_safe.h" #include "base/ref_counted.h" -class Extension; -class Profile; +namespace color_utils { + struct HSL; +} + +class BrowserThemePack; +class BrowserThemeProviderTest; class DictionaryValue; +class Extension; +class FilePath; class PrefService; -class BrowserThemeProviderTest; -class BrowserThemePack; +class Profile; +class ResourceBundle; class BrowserThemeProvider : public NonThreadSafe, public ThemeProvider { diff --git a/chrome/browser/browser_theme_provider_gtk.cc b/chrome/browser/browser_theme_provider_gtk.cc index 3269c15..c52a9fe 100644 --- a/chrome/browser/browser_theme_provider_gtk.cc +++ b/chrome/browser/browser_theme_provider_gtk.cc @@ -4,6 +4,8 @@ #include "chrome/browser/browser_theme_provider.h" +#include <gdk-pixbuf/gdk-pixbuf.h> + #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" #include "base/logging.h" diff --git a/chrome/browser/dom_ui/dom_ui_theme_source.cc b/chrome/browser/dom_ui/dom_ui_theme_source.cc index c871e42..75de29d 100644 --- a/chrome/browser/dom_ui/dom_ui_theme_source.cc +++ b/chrome/browser/dom_ui/dom_ui_theme_source.cc @@ -4,6 +4,7 @@ #include "chrome/browser/dom_ui/dom_ui_theme_source.h" +#include "app/resource_bundle.h" #include "app/theme_provider.h" #include "base/message_loop.h" #include "chrome/browser/browser_theme_provider.h" diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc index 2cbb282..ac935aa 100644 --- a/chrome/browser/dom_ui/ntp_resource_cache.cc +++ b/chrome/browser/dom_ui/ntp_resource_cache.cc @@ -5,6 +5,7 @@ #include "chrome/browser/dom_ui/ntp_resource_cache.h" #include "app/animation.h" +#include "app/gfx/color_utils.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "app/theme_provider.h" diff --git a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc index d5341a7..bc4bb1c 100644 --- a/chrome/browser/gtk/blocked_popup_container_view_gtk.cc +++ b/chrome/browser/gtk/blocked_popup_container_view_gtk.cc @@ -6,6 +6,7 @@ #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" +#include "app/resource_bundle.h" #include "base/string_util.h" #include "chrome/browser/gtk/custom_button.h" #include "chrome/browser/gtk/gtk_chrome_button.h" diff --git a/chrome/browser/gtk/find_bar_gtk.cc b/chrome/browser/gtk/find_bar_gtk.cc index 0ee2137..fb2fa9b 100644 --- a/chrome/browser/gtk/find_bar_gtk.cc +++ b/chrome/browser/gtk/find_bar_gtk.cc @@ -8,6 +8,7 @@ #include "app/gfx/gtk_util.h" #include "app/l10n_util.h" +#include "app/resource_bundle.h" #include "base/string_util.h" #include "chrome/browser/browser.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/gtk/first_run_dialog.h b/chrome/browser/gtk/first_run_dialog.h index b0f7e61..fb77c87 100644 --- a/chrome/browser/gtk/first_run_dialog.h +++ b/chrome/browser/gtk/first_run_dialog.h @@ -5,7 +5,8 @@ #ifndef CHROME_BROWSER_GTK_FIRST_RUN_DIALOG_H_ #define CHROME_BROWSER_GTK_FIRST_RUN_DIALOG_H_ -#include <gtk/gtk.h> +typedef struct _GtkButton GtkButton; +typedef struct _GtkWidget GtkWidget; #include "chrome/browser/first_run.h" #include "chrome/browser/importer/importer.h" diff --git a/chrome/browser/gtk/gtk_theme_provider.cc b/chrome/browser/gtk/gtk_theme_provider.cc index 7881bae..971be0c 100644 --- a/chrome/browser/gtk/gtk_theme_provider.cc +++ b/chrome/browser/gtk/gtk_theme_provider.cc @@ -9,6 +9,7 @@ #include "app/gfx/color_utils.h" #include "app/gfx/gtk_util.h" #include "app/gfx/skbitmap_operations.h" +#include "app/resource_bundle.h" #include "base/stl_util-inl.h" #include "chrome/browser/metrics/user_metrics.h" #include "chrome/browser/profile.h" diff --git a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc index 016a34a..f143b1d 100644 --- a/chrome/browser/renderer_host/render_widget_host_view_gtk.cc +++ b/chrome/browser/renderer_host/render_widget_host_view_gtk.cc @@ -673,7 +673,8 @@ void RenderWidgetHostViewGtk::ShowCurrentCursor() { break; default: - gdk_cursor = gtk_util::GetCursor(current_cursor_.GetCursorType()); + gdk_cursor = gtk_util::GetCursor( + static_cast<GdkCursorType>(current_cursor_.GetCursorType())); } gdk_window_set_cursor(view_.get()->window, gdk_cursor); // The window now owns the cursor. diff --git a/chrome/browser/views/detachable_toolbar_view.cc b/chrome/browser/views/detachable_toolbar_view.cc index 0664d01..fcf8f5c 100644 --- a/chrome/browser/views/detachable_toolbar_view.cc +++ b/chrome/browser/views/detachable_toolbar_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/views/detachable_toolbar_view.h" #include "app/gfx/canvas.h" +#include "app/resource_bundle.h" #include "chrome/browser/browser_theme_provider.h" #include "grit/theme_resources.h" #include "skia/ext/skia_utils.h" diff --git a/chrome/browser/views/find_bar_host.cc b/chrome/browser/views/find_bar_host.cc index bc81cda..1e7cca7 100644 --- a/chrome/browser/views/find_bar_host.cc +++ b/chrome/browser/views/find_bar_host.cc @@ -23,6 +23,10 @@ #include "views/widget/root_view.h" #include "views/widget/widget.h" +#if defined(OS_LINUX) +#include "app/scoped_handle_gtk.h" +#endif + using gfx::Path; namespace browser { diff --git a/chrome/chrome.gyp b/chrome/chrome.gyp index 049e1d0..d1ab06c 100755 --- a/chrome/chrome.gyp +++ b/chrome/chrome.gyp @@ -466,6 +466,11 @@ 'plugin/command_buffer_stub.h', ], },], + ['OS=="linux" or OS=="freebsd"', { + 'dependencies': [ + '../build/linux/system.gyp:gtk', + ], + }], ], }, { diff --git a/chrome/common/native_web_keyboard_event.h b/chrome/common/native_web_keyboard_event.h index 4edf0e2..438d159 100644 --- a/chrome/common/native_web_keyboard_event.h +++ b/chrome/common/native_web_keyboard_event.h @@ -16,8 +16,8 @@ #else class NSEvent; #endif // __OBJC__ -#elif defined(OS_LINUX) -#include <gdk/gdk.h> +#elif defined(OS_POSIX) +typedef struct _GdkEventKey GdkEventKey; #endif // Owns a platform specific event; used to pass own and pass event through diff --git a/chrome/common/native_web_keyboard_event_linux.cc b/chrome/common/native_web_keyboard_event_linux.cc index 3daeb47..c671654 100644 --- a/chrome/common/native_web_keyboard_event_linux.cc +++ b/chrome/common/native_web_keyboard_event_linux.cc @@ -4,6 +4,8 @@ #include "chrome/common/native_web_keyboard_event.h" +#include <gdk/gdk.h> + #include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h" using WebKit::WebInputEventFactory; diff --git a/views/view.cc b/views/view.cc index 5dcc900..123fe86 100644 --- a/views/view.cc +++ b/views/view.cc @@ -25,9 +25,13 @@ #include "views/widget/tooltip_manager.h" #include "views/widget/widget.h" #include "views/window/window.h" + #if defined(OS_WIN) #include "views/accessibility/view_accessibility_wrapper.h" #endif +#if defined(OS_LINUX) +#include "app/scoped_handle_gtk.h" +#endif namespace views { 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', ], |