View | Details | Raw Unified | Return to bug 152816
Collapse All | Expand All

(-)chromium/Makefile (-2 / +14 lines)
Lines 43-49 Link Here
43
USE_GMAKE=	yes
43
USE_GMAKE=	yes
44
MAN1=		chrome.1
44
MAN1=		chrome.1
45
USE_XORG=	scrnsaverproto
45
USE_XORG=	scrnsaverproto
46
USE_GNOME=	glib20 gtk20 gconf2 libxslt
46
USE_GNOME=	glib20 gtk20 dconf libxslt
47
LICENSE_COMB=	multi
47
LICENSE_COMB=	multi
48
LICENSE=	BSD LGPL21 MPL
48
LICENSE=	BSD LGPL21 MPL
49
49
Lines 63-69 Link Here
63
#GYP_DEFINES+=	use_system_zlib=1
63
#GYP_DEFINES+=	use_system_zlib=1
64
64
65
OPTIONS=	CODECS		"Compile and enable patented codecs like H.264" off \
65
OPTIONS=	CODECS		"Compile and enable patented codecs like H.264" off \
66
		VPX		"Use system libvpx for VP8 codec" on
66
		GCONF		"Use gconf2 for preferences"		on \
67
		SSE2		"Use SSE2, disable this for PIII or older" on \
68
		VPX		"Use system libvpx for VP8 codec"	on
67
69
68
.include <bsd.port.pre.mk>
70
.include <bsd.port.pre.mk>
69
71
Lines 77-82 Link Here
77
GYP_DEFINES+=	ffmpeg_branding=Chromium
79
GYP_DEFINES+=	ffmpeg_branding=Chromium
78
.endif
80
.endif
79
81
82
.if defined(WITH_GCONF)
83
USE_GNOME+=	gconf2
84
.else
85
GYP_DEFINES+=	use_gconf=0
86
.endif
87
88
.if defined(WITHOUT_SSE2)
89
GYP_DEFINES+=	disable_sse2=1
90
.endif
91
80
.if defined(WITH_VPX)
92
.if defined(WITH_VPX)
81
LIB_DEPENDS+=	vpx:${PORTSDIR}/multimedia/libvpx
93
LIB_DEPENDS+=	vpx:${PORTSDIR}/multimedia/libvpx
82
GYP_DEFINES+=	use_system_vpx=1
94
GYP_DEFINES+=	use_system_vpx=1
(-)chromium/files/patch-chromium (-2 / +136 lines)
Lines 509-515 Link Here
509
 
509
 
510
     # Set Thumb compilation flags.
510
     # Set Thumb compilation flags.
511
     'arm_thumb%': 0,
511
     'arm_thumb%': 0,
512
@@ -285,7 +285,7 @@
512
@@ -279,13 +279,16 @@
513
     # whether to compile in the sources for the GPU plugin / process.
514
     'enable_gpu%': 1,
515
 
516
+    # Use GConf, the GNOME configuration system.
517
+    'use_gconf%': 1,
518
+
519
     'conditions': [
520
       ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', {
521
         # This will set gcc_version to XY if you are running gcc X.Y.*.
513
         # This is used to tweak build flags for gcc 4.4.
522
         # This is used to tweak build flags for gcc 4.4.
514
         'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
523
         'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
515
         # Figure out the python architecture to decide if we build pyauto.
524
         # Figure out the python architecture to decide if we build pyauto.
Lines 568-573 Link Here
568
index 876579a..23d1c6c 100644
577
index 876579a..23d1c6c 100644
569
--- build/linux/system.gyp
578
--- build/linux/system.gyp
570
+++ build/linux/system.gyp
579
+++ build/linux/system.gyp
580
@@ -188,11 +188,14 @@
581
       'target_name': 'gconf',
582
       'type': 'settings',
583
       'conditions': [
584
-        ['_toolset=="target"', {
585
+        ['use_gconf==1 and _toolset=="target"', {
586
           'direct_dependent_settings': {
587
             'cflags': [
588
               '<!@(<(pkg-config) --cflags gconf-2.0)',
589
             ],
590
+            'defines': [
591
+              'USE_GCONF',
592
+            ],
593
           },
594
           'link_settings': {
595
             'ldflags': [
571
@@ -283,7 +283,6 @@
596
@@ -283,7 +283,6 @@
572
             }, {
597
             }, {
573
               'link_settings': {
598
               'link_settings': {
Lines 1174-1179 Link Here
1174
   void OnGetViewXID(gfx::NativeViewId id, unsigned long* xid);
1199
   void OnGetViewXID(gfx::NativeViewId id, unsigned long* xid);
1175
 #endif
1200
 #endif
1176
 
1201
 
1202
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
1203
index dea24e6..77adb09 100644
1204
--- chrome/browser/gtk/browser_titlebar.cc
1205
+++ chrome/browser/gtk/browser_titlebar.cc
1206
@@ -23,7 +23,9 @@
1207
 #include "chrome/browser/gtk/accelerators_gtk.h"
1208
 #include "chrome/browser/gtk/browser_window_gtk.h"
1209
 #include "chrome/browser/gtk/custom_button.h"
1210
+#if defined(USE_GCONF)
1211
 #include "chrome/browser/gtk/gconf_titlebar_listener.h"
1212
+#endif
1213
 #include "chrome/browser/gtk/gtk_theme_provider.h"
1214
 #include "chrome/browser/gtk/gtk_util.h"
1215
 #include "chrome/browser/gtk/menu_gtk.h"
1216
@@ -193,6 +195,9 @@ void PopupPageMenuModel::Build() {
1217
 ////////////////////////////////////////////////////////////////////////////////
1218
 // BrowserTitlebar
1219
 
1220
+// static
1221
+const char BrowserTitlebar::kDefaultButtonString[] = ":minimize,maximize,close";
1222
+
1223
 BrowserTitlebar::BrowserTitlebar(BrowserWindowGtk* browser_window,
1224
                                  GtkWindow* window)
1225
     : browser_window_(browser_window),
1226
@@ -299,9 +304,13 @@ void BrowserTitlebar::Init() {
1227
   gtk_box_pack_end(GTK_BOX(container_hbox_), titlebar_right_buttons_vbox_,
1228
                    FALSE, FALSE, 0);
1229
 
1230
+#if defined(USE_GCONF)
1231
   // Either read the gconf database and register for updates (on GNOME), or use
1232
   // the default value (anywhere else).
1233
   Singleton<GConfTitlebarListener>()->SetTitlebarButtons(this);
1234
+#else
1235
+  BuildButtons(kDefaultButtonString);
1236
+#endif
1237
 
1238
   // We use an alignment to control the titlebar height.
1239
   titlebar_alignment_ = gtk_alignment_new(0.0, 0.0, 1.0, 1.0);
1240
@@ -363,7 +372,9 @@ void BrowserTitlebar::Init() {
1241
 
1242
 BrowserTitlebar::~BrowserTitlebar() {
1243
   ActiveWindowWatcherX::RemoveObserver(this);
1244
+#if defined(USE_GCONF)
1245
   Singleton<GConfTitlebarListener>()->RemoveObserver(this);
1246
+#endif
1247
 }
1248
 
1249
 void BrowserTitlebar::BuildButtons(const std::string& button_string) {
1250
diff --git a/chrome/browser/gtk/browser_titlebar.h b/chrome/browser/gtk/browser_titlebar.h
1251
index c6da855..5cd30e6 100644
1252
--- chrome/browser/gtk/browser_titlebar.h
1253
+++ chrome/browser/gtk/browser_titlebar.h
1254
@@ -31,6 +31,10 @@ class BrowserTitlebar : public NotificationObserver,
1255
                         public ActiveWindowWatcherX::Observer,
1256
                         public menus::SimpleMenuModel::Delegate {
1257
  public:
1258
+  // A default button order string for when we aren't asking gconf for the
1259
+  // metacity configuration.
1260
+  static const char kDefaultButtonString[];
1261
+
1262
   BrowserTitlebar(BrowserWindowGtk* browser_window, GtkWindow* window);
1263
   virtual ~BrowserTitlebar();
1264
 
1265
diff --git a/chrome/browser/gtk/gconf_titlebar_listener.cc b/chrome/browser/gtk/gconf_titlebar_listener.cc
1266
index 81b5ef0..237332f 100644
1267
--- chrome/browser/gtk/gconf_titlebar_listener.cc
1268
+++ chrome/browser/gtk/gconf_titlebar_listener.cc
1269
@@ -13,10 +13,6 @@
1270
 
1271
 namespace {
1272
 
1273
-// A default button order string for when we aren't asking gconf for the
1274
-// metacity configuration.
1275
-const char* kDefaultButtonPlacement = ":minimize,maximize,close";
1276
-
1277
 // The GConf key we read for the button placement string. Even through the key
1278
 // has "metacity" in it, it's shared between metacity and compiz.
1279
 const char* kButtonLayoutKey = "/apps/metacity/general/button_layout";
1280
@@ -34,7 +30,7 @@ void GConfTitlebarListener::SetTitlebarButtons(BrowserTitlebar* titlebar) {
1281
     titlebar->BuildButtons(current_value_);
1282
     titlebars_.insert(titlebar);
1283
   } else {
1284
-    titlebar->BuildButtons(kDefaultButtonPlacement);
1285
+    titlebar->BuildButtons(BrowserTitlebar::kDefaultButtonString);
1286
   }
1287
 }
1288
 
1289
@@ -113,8 +109,8 @@ bool GConfTitlebarListener::HandleGError(GError* error, const char* key) {
1290
 void GConfTitlebarListener::ParseAndStoreValue(GConfValue* gconf_value) {
1291
   if (gconf_value) {
1292
     const char* value = gconf_value_get_string(gconf_value);
1293
-    current_value_ = value ? value : kDefaultButtonPlacement;
1294
+    current_value_ = value ? value : BrowserTitlebar::kDefaultButtonString;
1295
   } else {
1296
-    current_value_ = kDefaultButtonPlacement;
1297
+    current_value_ = BrowserTitlebar::kDefaultButtonString;
1298
   }
1299
 }
1177
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
1300
diff --git a/chrome/browser/memory_details.cc b/chrome/browser/memory_details.cc
1178
index 5c38d97..29a73d7 100644
1301
index 5c38d97..29a73d7 100644
1179
--- chrome/browser/memory_details.cc
1302
--- chrome/browser/memory_details.cc
Lines 2668-2674 Link Here
2668
index 05a38da..b64be85 100644
2791
index 05a38da..b64be85 100644
2669
--- chrome/chrome_browser.gypi
2792
--- chrome/chrome_browser.gypi
2670
+++ chrome/chrome_browser.gypi
2793
+++ chrome/chrome_browser.gypi
2671
@@ -2862,7 +2862,7 @@
2794
@@ -2883,12 +2883,18 @@
2795
             ],
2796
           },
2797
         }],
2798
+        ['use_gconf==0', {
2799
+          'sources!': [
2800
+            'browser/gtk/gconf_titlebar_listener.cc',
2801
+            'browser/gtk/gconf_titlebar_listener.h',
2802
+          ],
2803
+        }],
2804
         ['touchui==0', {
2805
           'sources!': [
2672
             # Nothing yet.
2806
             # Nothing yet.
2673
           ],
2807
           ],
2674
         }],
2808
         }],

Return to bug 152816