Skip to content

Commit

Permalink
GTK: Make the gtk port compile with GTK_DISABLE_SINGLE_INCLUDES.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
erg@chromium.org committed Nov 22, 2011
1 parent 7ffe7e1 commit a47aa89
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 31 deletions.
5 changes: 5 additions & 0 deletions build/common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
}],
Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/printing/print_dialog_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
#include "chrome/browser/printing/print_dialog_gtk.h"

#include <fcntl.h>
#include <gtk/gtkpagesetupunixdialog.h>
#include <gtk/gtkprintjob.h>
#include <gtk/gtkunixprint.h>
#include <sys/stat.h>
#include <sys/types.h>

Expand Down
2 changes: 1 addition & 1 deletion chrome/browser/printing/print_dialog_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#pragma once

#include <gtk/gtk.h>
#include <gtk/gtkprintunixdialog.h>
#include <gtk/gtkunixprint.h>

#include "base/compiler_specific.h"
#include "base/file_path.h"
Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include "chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h"

#include <gdk/gdkkeysyms.h>
#include <glib.h>

namespace {

Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#define CHROME_BROWSER_UI_GTK_BUBBLE_BUBBLE_ACCELERATORS_GTK_H_
#pragma once

#include <gdk/gdktypes.h>
#include <glib.h>
#include <gdk/gdk.h>

#include "base/basictypes.h"

Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ui/gtk/chrome_gtk_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#define CHROME_BROWSER_UI_GTK_CHROME_GTK_FRAME_H_
#pragma once

#include <gdk/gdk.h>
#include <gtk/gtkwindow.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

Expand Down
3 changes: 1 addition & 2 deletions chrome/browser/ui/gtk/gtk_chrome_button.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@
#define CHROME_BROWSER_UI_GTK_GTK_CHROME_BUTTON_H_
#pragma once

#include <gdk/gdk.h>
#include <gtk/gtkbutton.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS

Expand Down
2 changes: 0 additions & 2 deletions chrome/browser/ui/gtk/gtk_custom_menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@
// For a more through overview of this system, see the comments in
// gtk_custom_menu_item.h.

#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gtk/gtkmenuitem.h>

G_BEGIN_DECLS

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ui/gtk/gtk_custom_menu_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
// we need to communicate additional information, namely which button was
// activated.

#include <gdk/gdk.h>
#include <gtk/gtk.h>

G_BEGIN_DECLS
Expand Down
4 changes: 1 addition & 3 deletions chrome/browser/ui/gtk/gtk_input_event_box.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

#include "chrome/browser/ui/gtk/gtk_input_event_box.h"

#include <gdk/gdkwindow.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkbin.h>

G_BEGIN_DECLS

Expand Down
1 change: 0 additions & 1 deletion chrome/browser/ui/gtk/gtk_input_event_box.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#define CHROME_BROWSER_UI_GTK_GTK_INPUT_EVENT_BOX_H_
#pragma once

#include <gdk/gdk.h>
#include <gtk/gtk.h>

// GtkInputEventBox is like GtkEventBox, but with the following differences:
Expand Down
2 changes: 1 addition & 1 deletion content/browser/gpu/gpu_process_host_ui_shim.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gdk/gdkwindow.h> // NOLINT
#include <gdk/gdk.h> // NOLINT
#include <gdk/gdkx.h> // NOLINT
#endif

Expand Down
2 changes: 1 addition & 1 deletion printing/print_settings_initializer_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "printing/print_settings_initializer_gtk.h"

#include <gtk/gtk.h>
#include <gtk/gtkprinter.h>
#include <gtk/gtkunixprint.h>

#include "base/string16.h"
#include "base/utf_string_conversions.h"
Expand Down
2 changes: 1 addition & 1 deletion printing/printing_context_gtk.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "printing/printing_context_gtk.h"

#include <gtk/gtk.h>
#include <gtk/gtkprintunixdialog.h>
#include <gtk/gtkunixprint.h>

#include "base/logging.h"
#include "base/values.h"
Expand Down
9 changes: 5 additions & 4 deletions ui/base/gtk/gtk_floating_container.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
#include "ui/base/gtk/gtk_floating_container.h"

#include <gtk/gtk.h>
#include <gtk/gtkmarshal.h>
#include <gtk/gtkprivate.h>

#include <algorithm>

Expand Down Expand Up @@ -41,6 +39,9 @@ GtkFloatingContainerChild* GetChild(GtkFloatingContainer* container,
return NULL;
}

const GParamFlags kStaticReadWriteProp = static_cast<GParamFlags>(
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);

} // namespace

G_BEGIN_DECLS
Expand Down Expand Up @@ -99,7 +100,7 @@ static void gtk_floating_container_class_init(
G_MININT,
G_MAXINT,
0,
static_cast<GParamFlags>(GTK_PARAM_READWRITE)));
kStaticReadWriteProp));

gtk_container_class_install_child_property(
container_class,
Expand All @@ -110,7 +111,7 @@ static void gtk_floating_container_class_init(
G_MININT,
G_MAXINT,
0,
static_cast<GParamFlags>(GTK_PARAM_READWRITE)));
kStaticReadWriteProp));

floating_container_signals[SET_FLOATING_POSITION] =
g_signal_new("set-floating-position",
Expand Down
4 changes: 1 addition & 3 deletions ui/gfx/gtk_preserve_window.cc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

#include "ui/gfx/gtk_preserve_window.h"

#include <gdk/gdkwindow.h>
#include <gdk/gdk.h>
#include <gtk/gtk.h>
#include <gtk/gtkwidget.h>
#include <gtk/gtkfixed.h>

#include "ui/base/gtk/gtk_compat.h"

Expand Down
2 changes: 1 addition & 1 deletion ui/gfx/insets.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include "ui/base/ui_export.h"

#if defined(TOOLKIT_USES_GTK)
#include <gtk/gtkstyle.h>
#include <gtk/gtk.h>
#endif

namespace gfx {
Expand Down
4 changes: 2 additions & 2 deletions ui/gfx/skia_utils_gtk.cc
Original file line number Diff line number Diff line change
@@ -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 <gdk/gdkcolor.h>
#include <gdk/gdk.h>

namespace gfx {

Expand Down
2 changes: 1 addition & 1 deletion webkit/tools/test_shell/test_webview_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#endif

#if defined(TOOLKIT_USES_GTK)
#include <gdk/gdkcursor.h>
#include <gdk/gdk.h>
#endif

struct WebPreferences;
Expand Down

0 comments on commit a47aa89

Please sign in to comment.