diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 16:23:13 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-23 16:23:13 +0000 |
commit | 7cd2fbecfcd81d19a0d028c504adfbc8f2dea0a0 (patch) | |
tree | 445e90b49c15f0280a47fac96127c8938f159d8e /chrome | |
parent | 74c32b2bd363f9bfab26771b8c9e2ccdedfa27c7 (diff) | |
download | chromium_src-7cd2fbecfcd81d19a0d028c504adfbc8f2dea0a0.zip chromium_src-7cd2fbecfcd81d19a0d028c504adfbc8f2dea0a0.tar.gz chromium_src-7cd2fbecfcd81d19a0d028c504adfbc8f2dea0a0.tar.bz2 |
Disables turning on custom frame in chrome os.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/207055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26933 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/defaults.cc | 3 | ||||
-rw-r--r-- | chrome/browser/defaults.h | 3 | ||||
-rw-r--r-- | chrome/browser/gtk/browser_titlebar.cc | 2 | ||||
-rw-r--r-- | chrome/browser/gtk/options/content_page_gtk.cc | 20 |
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); } |