summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/defaults.cc3
-rw-r--r--chrome/browser/defaults.h3
-rw-r--r--chrome/browser/gtk/browser_titlebar.cc2
-rw-r--r--chrome/browser/gtk/options/content_page_gtk.cc20
4 files changed, 21 insertions, 7 deletions
diff --git a/chrome/browser/defaults.cc b/chrome/browser/defaults.cc
index 6ae71e3..a035d76 100644
--- a/chrome/browser/defaults.cc
+++ b/chrome/browser/defaults.cc
@@ -17,6 +17,7 @@ const SessionStartupPref::Type kDefaultSessionStartupType =
const bool kSuppressCrashInfoBar = true;
const bool kRestoreAfterCrash = true;
const int kPinnedTabWidth = 64;
+const bool kCanToggleSystemTitleBar = false;
#elif defined(OS_LINUX)
@@ -30,6 +31,8 @@ const double kAutocompleteEditFontPixelSizeInPopup =
const int kAutocompletePopupFontSize = 10;
+const bool kCanToggleSystemTitleBar = true;
+
#endif
#if !defined(OS_CHROMEOS)
diff --git a/chrome/browser/defaults.h b/chrome/browser/defaults.h
index bd7b4f0..e29dddd 100644
--- a/chrome/browser/defaults.h
+++ b/chrome/browser/defaults.h
@@ -23,6 +23,9 @@ extern const double kAutocompleteEditFontPixelSizeInPopup;
// Size of the font used in the autocomplete popup.
extern const int kAutocompletePopupFontSize;
+// Can the user toggle the system title bar?
+extern const bool kCanToggleSystemTitleBar;
+
#endif
// The default value for session startup.
diff --git a/chrome/browser/gtk/browser_titlebar.cc b/chrome/browser/gtk/browser_titlebar.cc
index 088bcbd..cc72cf6 100644
--- a/chrome/browser/gtk/browser_titlebar.cc
+++ b/chrome/browser/gtk/browser_titlebar.cc
@@ -486,9 +486,11 @@ void BrowserTitlebar::ShowContextMenu() {
{ MENU_SEPARATOR },
{ MENU_NORMAL, IDC_TASK_MANAGER, IDS_TASK_MANAGER, 0, NULL,
GDK_Escape, GDK_SHIFT_MASK, true },
+#if !defined(OS_CHROMEOS)
{ MENU_SEPARATOR },
{ MENU_CHECKBOX, kShowWindowDecorationsCommand,
IDS_SHOW_WINDOW_DECORATIONS },
+#endif
{ MENU_END },
};
diff --git a/chrome/browser/gtk/options/content_page_gtk.cc b/chrome/browser/gtk/options/content_page_gtk.cc
index 14892f4..6682b69 100644
--- a/chrome/browser/gtk/options/content_page_gtk.cc
+++ b/chrome/browser/gtk/options/content_page_gtk.cc
@@ -8,6 +8,7 @@
#include "app/resource_bundle.h"
#include "base/gfx/gtk_util.h"
#include "chrome/browser/browser_list.h"
+#include "chrome/browser/defaults.h"
#include "chrome/browser/gtk/clear_browsing_data_dialog_gtk.h"
#include "chrome/browser/gtk/gtk_chrome_link_button.h"
#include "chrome/browser/gtk/import_dialog_gtk.h"
@@ -27,6 +28,7 @@
ContentPageGtk::ContentPageGtk(Profile* profile)
: OptionsPageBase(profile),
+ system_title_bar_checkbox_(NULL),
initializing_(true) {
// Prepare the group options layout.
@@ -83,7 +85,8 @@ void ContentPageGtk::NotifyPrefChanged(const std::wstring* pref_name) {
GTK_TOGGLE_BUTTON(form_autofill_neversave_radio_), TRUE);
}
}
- if (!pref_name || *pref_name == prefs::kUseCustomChromeFrame) {
+ if (browser_defaults::kCanToggleSystemTitleBar &&
+ (!pref_name || *pref_name == prefs::kUseCustomChromeFrame)) {
gtk_toggle_button_set_active(
GTK_TOGGLE_BUTTON(system_title_bar_checkbox_),
!use_custom_chrome_frame_.GetValue());
@@ -187,12 +190,14 @@ GtkWidget* ContentPageGtk::InitThemesGroup() {
GtkWidget* hbox = gtk_hbox_new(FALSE, gtk_util::kControlSpacing);
// "Use system title bar and borders" checkbox.
- system_title_bar_checkbox_ = gtk_check_button_new_with_label(
- l10n_util::GetStringUTF8(IDS_SHOW_WINDOW_DECORATIONS).c_str());
- g_signal_connect(G_OBJECT(system_title_bar_checkbox_), "clicked",
- G_CALLBACK(OnSystemTitleBarCheckboxClicked), this);
- gtk_box_pack_start(GTK_BOX(vbox), system_title_bar_checkbox_,
- FALSE, FALSE, 0);
+ if (browser_defaults::kCanToggleSystemTitleBar) {
+ system_title_bar_checkbox_ = gtk_check_button_new_with_label(
+ l10n_util::GetStringUTF8(IDS_SHOW_WINDOW_DECORATIONS).c_str());
+ g_signal_connect(G_OBJECT(system_title_bar_checkbox_), "clicked",
+ G_CALLBACK(OnSystemTitleBarCheckboxClicked), this);
+ gtk_box_pack_start(GTK_BOX(vbox), system_title_bar_checkbox_,
+ FALSE, FALSE, 0);
+ }
#if defined(TOOLKIT_GTK)
// GTK theme button.
@@ -267,6 +272,7 @@ void ContentPageGtk::OnGetThemesButtonClicked(GtkButton* widget,
// static
void ContentPageGtk::OnSystemTitleBarCheckboxClicked(GtkButton* widget,
ContentPageGtk* page) {
+ DCHECK(browser_defaults::kCanToggleSystemTitleBar);
bool use_custom = !gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget));
page->use_custom_chrome_frame_.SetValue(use_custom);
}