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 |
}], |