OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/views/options/content_page_view.h" | 5 #include "chrome/browser/views/options/content_page_view.h" |
6 | 6 |
7 #include <windows.h> | 7 #include <windows.h> |
8 #include <shlobj.h> | 8 #include <shlobj.h> |
9 #include <vsstyle.h> | 9 #include <vsstyle.h> |
10 #include <vssym32.h> | 10 #include <vssym32.h> |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 200 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
201 | 201 |
202 layout->StartRow(0, single_column_view_set_id); | 202 layout->StartRow(0, single_column_view_set_id); |
203 InitThemesGroup(); | 203 InitThemesGroup(); |
204 layout->AddView(themes_group_); | 204 layout->AddView(themes_group_); |
205 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 205 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
206 | 206 |
207 // Init member prefs so we can update the controls if prefs change. | 207 // Init member prefs so we can update the controls if prefs change. |
208 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled, | 208 ask_to_save_passwords_.Init(prefs::kPasswordManagerEnabled, |
209 profile()->GetPrefs(), this); | 209 profile()->GetPrefs(), this); |
210 ask_to_save_form_autofill_.Init(prefs::kFormAutofillEnabled, | 210 ask_to_save_form_autofill_.Init(prefs::kAutoFillEnabled, |
211 profile()->GetPrefs(), this); | 211 profile()->GetPrefs(), this); |
212 is_using_default_theme_.Init(prefs::kCurrentThemeID, | 212 is_using_default_theme_.Init(prefs::kCurrentThemeID, |
213 profile()->GetPrefs(), this); | 213 profile()->GetPrefs(), this); |
214 } | 214 } |
215 | 215 |
216 void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) { | 216 void ContentPageView::NotifyPrefChanged(const std::wstring* pref_name) { |
217 if (!pref_name || *pref_name == prefs::kPasswordManagerEnabled) { | 217 if (!pref_name || *pref_name == prefs::kPasswordManagerEnabled) { |
218 if (ask_to_save_passwords_.GetValue()) { | 218 if (ask_to_save_passwords_.GetValue()) { |
219 passwords_asktosave_radio_->SetChecked(true); | 219 passwords_asktosave_radio_->SetChecked(true); |
220 } else { | 220 } else { |
221 passwords_neversave_radio_->SetChecked(true); | 221 passwords_neversave_radio_->SetChecked(true); |
222 } | 222 } |
223 } | 223 } |
224 if (!pref_name || *pref_name == prefs::kFormAutofillEnabled) { | 224 if (!pref_name || *pref_name == prefs::kAutoFillEnabled) { |
225 if (ask_to_save_form_autofill_.GetValue()) { | 225 if (ask_to_save_form_autofill_.GetValue()) { |
226 form_autofill_enable_radio_->SetChecked(true); | 226 form_autofill_enable_radio_->SetChecked(true); |
227 } else { | 227 } else { |
228 form_autofill_disable_radio_->SetChecked(true); | 228 form_autofill_disable_radio_->SetChecked(true); |
229 } | 229 } |
230 } | 230 } |
231 if (!pref_name || *pref_name == prefs::kCurrentThemeID) { | 231 if (!pref_name || *pref_name == prefs::kCurrentThemeID) { |
232 themes_reset_button_->SetEnabled( | 232 themes_reset_button_->SetEnabled( |
233 is_using_default_theme_.GetValue().length() > 0); | 233 is_using_default_theme_.GetValue().length() > 0); |
234 } | 234 } |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 sync_action_link_->SetText(link_label); | 480 sync_action_link_->SetText(link_label); |
481 sync_action_link_->SetVisible(!link_label.empty()); | 481 sync_action_link_->SetVisible(!link_label.empty()); |
482 if (status_has_error) { | 482 if (status_has_error) { |
483 sync_status_label_->set_background(CreateErrorBackground()); | 483 sync_status_label_->set_background(CreateErrorBackground()); |
484 sync_action_link_->set_background(CreateErrorBackground()); | 484 sync_action_link_->set_background(CreateErrorBackground()); |
485 } else { | 485 } else { |
486 sync_status_label_->set_background(NULL); | 486 sync_status_label_->set_background(NULL); |
487 sync_action_link_->set_background(NULL); | 487 sync_action_link_->set_background(NULL); |
488 } | 488 } |
489 } | 489 } |
OLD | NEW |