From a47aa89e77066507e80f97839e0c08e3432379ab Mon Sep 17 00:00:00 2001 From: "erg@chromium.org" Date: Tue, 22 Nov 2011 03:12:31 +0000 Subject: [PATCH] GTK: Make the gtk port compile with GTK_DISABLE_SINGLE_INCLUDES. BUG=79722 TEST=none TBR=tony Review URL: http://codereview.chromium.org/8586044 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@111090 0039d316-1c4b-4281-b951-d872f2087c98 --- build/common.gypi | 5 +++++ chrome/browser/printing/print_dialog_gtk.cc | 3 +-- chrome/browser/printing/print_dialog_gtk.h | 2 +- chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc | 1 - chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h | 3 +-- chrome/browser/ui/gtk/chrome_gtk_frame.h | 3 +-- chrome/browser/ui/gtk/gtk_chrome_button.h | 3 +-- chrome/browser/ui/gtk/gtk_custom_menu.h | 2 -- chrome/browser/ui/gtk/gtk_custom_menu_item.h | 1 - chrome/browser/ui/gtk/gtk_input_event_box.cc | 4 +--- chrome/browser/ui/gtk/gtk_input_event_box.h | 1 - content/browser/gpu/gpu_process_host_ui_shim.cc | 2 +- printing/print_settings_initializer_gtk.cc | 2 +- printing/printing_context_gtk.cc | 2 +- ui/base/gtk/gtk_floating_container.cc | 9 +++++---- ui/gfx/gtk_preserve_window.cc | 4 +--- ui/gfx/insets.h | 2 +- ui/gfx/skia_utils_gtk.cc | 4 ++-- webkit/tools/test_shell/test_webview_delegate.h | 2 +- 19 files changed, 24 insertions(+), 31 deletions(-) diff --git a/build/common.gypi b/build/common.gypi index e54edfe3d755bc..390697c1d1adcd 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -984,6 +984,11 @@ ['toolkit_uses_gtk==1', { 'defines': ['TOOLKIT_USES_GTK=1'], }], + ['toolkit_uses_gtk==1 and toolkit_views==0', { + # TODO(erg): We are progressively sealing up use of deprecated features + # in gtk in preparation for an eventual porting to gtk3. + 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'], + }], ['chromeos==1', { 'defines': ['OS_CHROMEOS=1'], }], diff --git a/chrome/browser/printing/print_dialog_gtk.cc b/chrome/browser/printing/print_dialog_gtk.cc index 0625743d47f49a..a20225c7805705 100644 --- a/chrome/browser/printing/print_dialog_gtk.cc +++ b/chrome/browser/printing/print_dialog_gtk.cc @@ -5,8 +5,7 @@ #include "chrome/browser/printing/print_dialog_gtk.h" #include -#include -#include +#include #include #include diff --git a/chrome/browser/printing/print_dialog_gtk.h b/chrome/browser/printing/print_dialog_gtk.h index 4402eb43311c9f..de517a6a5b3f13 100644 --- a/chrome/browser/printing/print_dialog_gtk.h +++ b/chrome/browser/printing/print_dialog_gtk.h @@ -7,7 +7,7 @@ #pragma once #include -#include +#include #include "base/compiler_specific.h" #include "base/file_path.h" diff --git a/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc b/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc index 64032563a958d8..3e1e566d913256 100644 --- a/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc +++ b/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc @@ -5,7 +5,6 @@ #include "chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h" #include -#include namespace { diff --git a/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h b/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h index 41e53986c423c8..14bd6e8e0d868a 100644 --- a/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h +++ b/chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h @@ -6,8 +6,7 @@ #define CHROME_BROWSER_UI_GTK_BUBBLE_BUBBLE_ACCELERATORS_GTK_H_ #pragma once -#include -#include +#include #include "base/basictypes.h" diff --git a/chrome/browser/ui/gtk/chrome_gtk_frame.h b/chrome/browser/ui/gtk/chrome_gtk_frame.h index bbcb2fa16842c9..31d37bafb0fdf7 100644 --- a/chrome/browser/ui/gtk/chrome_gtk_frame.h +++ b/chrome/browser/ui/gtk/chrome_gtk_frame.h @@ -6,8 +6,7 @@ #define CHROME_BROWSER_UI_GTK_CHROME_GTK_FRAME_H_ #pragma once -#include -#include +#include G_BEGIN_DECLS diff --git a/chrome/browser/ui/gtk/gtk_chrome_button.h b/chrome/browser/ui/gtk/gtk_chrome_button.h index 1a8e1b89e37ef1..1843ae14b6390c 100644 --- a/chrome/browser/ui/gtk/gtk_chrome_button.h +++ b/chrome/browser/ui/gtk/gtk_chrome_button.h @@ -6,8 +6,7 @@ #define CHROME_BROWSER_UI_GTK_GTK_CHROME_BUTTON_H_ #pragma once -#include -#include +#include G_BEGIN_DECLS diff --git a/chrome/browser/ui/gtk/gtk_custom_menu.h b/chrome/browser/ui/gtk/gtk_custom_menu.h index e832cb00947937..3a0fa0ee970145 100644 --- a/chrome/browser/ui/gtk/gtk_custom_menu.h +++ b/chrome/browser/ui/gtk/gtk_custom_menu.h @@ -16,9 +16,7 @@ // For a more through overview of this system, see the comments in // gtk_custom_menu_item.h. -#include #include -#include G_BEGIN_DECLS diff --git a/chrome/browser/ui/gtk/gtk_custom_menu_item.h b/chrome/browser/ui/gtk/gtk_custom_menu_item.h index d0fbf1a44d969c..c3a1f88c2e810e 100644 --- a/chrome/browser/ui/gtk/gtk_custom_menu_item.h +++ b/chrome/browser/ui/gtk/gtk_custom_menu_item.h @@ -30,7 +30,6 @@ // we need to communicate additional information, namely which button was // activated. -#include #include G_BEGIN_DECLS diff --git a/chrome/browser/ui/gtk/gtk_input_event_box.cc b/chrome/browser/ui/gtk/gtk_input_event_box.cc index eb18665daf9b16..cdfde2be73fd1b 100644 --- a/chrome/browser/ui/gtk/gtk_input_event_box.cc +++ b/chrome/browser/ui/gtk/gtk_input_event_box.cc @@ -4,10 +4,8 @@ #include "chrome/browser/ui/gtk/gtk_input_event_box.h" -#include +#include #include -#include -#include G_BEGIN_DECLS diff --git a/chrome/browser/ui/gtk/gtk_input_event_box.h b/chrome/browser/ui/gtk/gtk_input_event_box.h index 86850acc09f792..b3ce4842e1d1e2 100644 --- a/chrome/browser/ui/gtk/gtk_input_event_box.h +++ b/chrome/browser/ui/gtk/gtk_input_event_box.h @@ -6,7 +6,6 @@ #define CHROME_BROWSER_UI_GTK_GTK_INPUT_EVENT_BOX_H_ #pragma once -#include #include // GtkInputEventBox is like GtkEventBox, but with the following differences: diff --git a/content/browser/gpu/gpu_process_host_ui_shim.cc b/content/browser/gpu/gpu_process_host_ui_shim.cc index f5dcd8f574d502..ed633d1e0f042d 100644 --- a/content/browser/gpu/gpu_process_host_ui_shim.cc +++ b/content/browser/gpu/gpu_process_host_ui_shim.cc @@ -22,7 +22,7 @@ // These two #includes need to come after gpu_messages.h. #include "ui/base/x/x11_util.h" #include "ui/gfx/size.h" -#include // NOLINT +#include // NOLINT #include // NOLINT #endif diff --git a/printing/print_settings_initializer_gtk.cc b/printing/print_settings_initializer_gtk.cc index a0df0c853e5d32..92316a6dab5f8d 100644 --- a/printing/print_settings_initializer_gtk.cc +++ b/printing/print_settings_initializer_gtk.cc @@ -5,7 +5,7 @@ #include "printing/print_settings_initializer_gtk.h" #include -#include +#include #include "base/string16.h" #include "base/utf_string_conversions.h" diff --git a/printing/printing_context_gtk.cc b/printing/printing_context_gtk.cc index fc534ea75193d9..88e57e662377ce 100644 --- a/printing/printing_context_gtk.cc +++ b/printing/printing_context_gtk.cc @@ -5,7 +5,7 @@ #include "printing/printing_context_gtk.h" #include -#include +#include #include "base/logging.h" #include "base/values.h" diff --git a/ui/base/gtk/gtk_floating_container.cc b/ui/base/gtk/gtk_floating_container.cc index edb080f6ff557b..08449e216b2761 100644 --- a/ui/base/gtk/gtk_floating_container.cc +++ b/ui/base/gtk/gtk_floating_container.cc @@ -5,8 +5,6 @@ #include "ui/base/gtk/gtk_floating_container.h" #include -#include -#include #include @@ -41,6 +39,9 @@ GtkFloatingContainerChild* GetChild(GtkFloatingContainer* container, return NULL; } +const GParamFlags kStaticReadWriteProp = static_cast( + G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS); + } // namespace G_BEGIN_DECLS @@ -99,7 +100,7 @@ static void gtk_floating_container_class_init( G_MININT, G_MAXINT, 0, - static_cast(GTK_PARAM_READWRITE))); + kStaticReadWriteProp)); gtk_container_class_install_child_property( container_class, @@ -110,7 +111,7 @@ static void gtk_floating_container_class_init( G_MININT, G_MAXINT, 0, - static_cast(GTK_PARAM_READWRITE))); + kStaticReadWriteProp)); floating_container_signals[SET_FLOATING_POSITION] = g_signal_new("set-floating-position", diff --git a/ui/gfx/gtk_preserve_window.cc b/ui/gfx/gtk_preserve_window.cc index 5a80302f263a9b..79ea8184faafef 100644 --- a/ui/gfx/gtk_preserve_window.cc +++ b/ui/gfx/gtk_preserve_window.cc @@ -4,10 +4,8 @@ #include "ui/gfx/gtk_preserve_window.h" -#include +#include #include -#include -#include #include "ui/base/gtk/gtk_compat.h" diff --git a/ui/gfx/insets.h b/ui/gfx/insets.h index 56f79b4e971d07..147d58fa230522 100644 --- a/ui/gfx/insets.h +++ b/ui/gfx/insets.h @@ -12,7 +12,7 @@ #include "ui/base/ui_export.h" #if defined(TOOLKIT_USES_GTK) -#include +#include #endif namespace gfx { diff --git a/ui/gfx/skia_utils_gtk.cc b/ui/gfx/skia_utils_gtk.cc index 8667612502e60d..8c6f455e059527 100644 --- a/ui/gfx/skia_utils_gtk.cc +++ b/ui/gfx/skia_utils_gtk.cc @@ -1,10 +1,10 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2011 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 "ui/gfx/skia_utils_gtk.h" -#include +#include namespace gfx { diff --git a/webkit/tools/test_shell/test_webview_delegate.h b/webkit/tools/test_shell/test_webview_delegate.h index 67036bd81fcc89..3f42ac828aee40 100644 --- a/webkit/tools/test_shell/test_webview_delegate.h +++ b/webkit/tools/test_shell/test_webview_delegate.h @@ -40,7 +40,7 @@ #endif #if defined(TOOLKIT_USES_GTK) -#include +#include #endif struct WebPreferences;