| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/gtk/options/content_page_gtk.h" | 5 #include "chrome/browser/gtk/options/content_page_gtk.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "app/resource_bundle.h" | 8 #include "app/resource_bundle.h" |
| 9 #include "base/gfx/gtk_util.h" | 9 #include "base/gfx/gtk_util.h" |
| 10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 options_builder.AddOptionGroup( | 45 options_builder.AddOptionGroup( |
| 46 l10n_util::GetStringUTF8(IDS_THEMES_GROUP_NAME), | 46 l10n_util::GetStringUTF8(IDS_THEMES_GROUP_NAME), |
| 47 InitThemesGroup(), false); | 47 InitThemesGroup(), false); |
| 48 page_ = options_builder.get_page_widget(); | 48 page_ = options_builder.get_page_widget(); |
| 49 | 49 |
| 50 // Add preferences observers. | 50 // Add preferences observers. |
| 51 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled, | 51 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled, |
| 52 profile->GetPrefs(), this); | 52 profile->GetPrefs(), this); |
| 53 ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled, | 53 ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled, |
| 54 profile->GetPrefs(), this); | 54 profile->GetPrefs(), this); |
| 55 use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame, | 55 if (browser_defaults::kCanToggleSystemTitleBar) { |
| 56 profile->GetPrefs(), this); | 56 use_custom_chrome_frame_.Init(prefs::kUseCustomChromeFrame, |
| 57 profile->GetPrefs(), this); |
| 58 } |
| 57 | 59 |
| 58 // Load initial values | 60 // Load initial values |
| 59 NotifyPrefChanged(NULL); | 61 NotifyPrefChanged(NULL); |
| 60 } | 62 } |
| 61 | 63 |
| 62 ContentPageGtk::~ContentPageGtk() { | 64 ContentPageGtk::~ContentPageGtk() { |
| 63 } | 65 } |
| 64 | 66 |
| 65 // If |pref_name| is NULL, set the state of all the widgets. (This is used | 67 // If |pref_name| is NULL, set the state of all the widgets. (This is used |
| 66 // in ContentPageGtk() above to initialize the dialog.) Otherwise, reset the | 68 // in ContentPageGtk() above to initialize the dialog.) Otherwise, reset the |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 GTK_TOGGLE_BUTTON(page->form_autofill_asktosave_radio_)); | 325 GTK_TOGGLE_BUTTON(page->form_autofill_asktosave_radio_)); |
| 324 if (enabled) { | 326 if (enabled) { |
| 325 page->UserMetricsRecordAction(L"Options_FormAutofill_Enable", | 327 page->UserMetricsRecordAction(L"Options_FormAutofill_Enable", |
| 326 page->profile()->GetPrefs()); | 328 page->profile()->GetPrefs()); |
| 327 } else { | 329 } else { |
| 328 page->UserMetricsRecordAction(L"Options_FormAutofill_Disable", | 330 page->UserMetricsRecordAction(L"Options_FormAutofill_Disable", |
| 329 page->profile()->GetPrefs()); | 331 page->profile()->GetPrefs()); |
| 330 } | 332 } |
| 331 page->ask_to_save_form_autofill_.SetValue(enabled); | 333 page->ask_to_save_form_autofill_.SetValue(enabled); |
| 332 } | 334 } |
| OLD | NEW |