| 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/gtk/options/content_page_gtk.h" | 5 #include "chrome/browser/gtk/options/content_page_gtk.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "app/gfx/gtk_util.h" | 9 #include "app/gfx/gtk_util.h" |
| 10 #include "app/l10n_util.h" | 10 #include "app/l10n_util.h" |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 173 } | 173 } |
| 174 | 174 |
| 175 void ContentPageGtk::OnPersonalDataLoaded() { | 175 void ContentPageGtk::OnPersonalDataLoaded() { |
| 176 DCHECK(personal_data_); | 176 DCHECK(personal_data_); |
| 177 // We might have been alerted that the PersonalDataManager has loaded, so | 177 // We might have been alerted that the PersonalDataManager has loaded, so |
| 178 // remove ourselves as observer. | 178 // remove ourselves as observer. |
| 179 personal_data_->RemoveObserver(this); | 179 personal_data_->RemoveObserver(this); |
| 180 | 180 |
| 181 ShowAutoFillDialog( | 181 ShowAutoFillDialog( |
| 182 personal_data_, personal_data_->profiles(), | 182 personal_data_, personal_data_->profiles(), |
| 183 personal_data_->credit_cards()); | 183 personal_data_->credit_cards(), profile()); |
| 184 } | 184 } |
| 185 | 185 |
| 186 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { | 186 GtkWidget* ContentPageGtk::InitPasswordSavingGroup() { |
| 187 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); | 187 GtkWidget* vbox = gtk_vbox_new(FALSE, gtk_util::kControlSpacing); |
| 188 | 188 |
| 189 // Ask to save radio button. | 189 // Ask to save radio button. |
| 190 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, | 190 passwords_asktosave_radio_ = gtk_radio_button_new_with_label(NULL, |
| 191 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str()); | 191 l10n_util::GetStringUTF8(IDS_OPTIONS_PASSWORDS_ASKTOSAVE).c_str()); |
| 192 g_signal_connect(passwords_asktosave_radio_, "toggled", | 192 g_signal_connect(passwords_asktosave_radio_, "toggled", |
| 193 G_CALLBACK(OnPasswordRadioToggled), this); | 193 G_CALLBACK(OnPasswordRadioToggled), this); |
| (...skipping 378 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 572 | 572 |
| 573 // static | 573 // static |
| 574 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response, | 574 void ContentPageGtk::OnStopSyncDialogResponse(GtkWidget* widget, int response, |
| 575 ContentPageGtk* page) { | 575 ContentPageGtk* page) { |
| 576 if (response == GTK_RESPONSE_ACCEPT) { | 576 if (response == GTK_RESPONSE_ACCEPT) { |
| 577 page->sync_service_->DisableForUser(); | 577 page->sync_service_->DisableForUser(); |
| 578 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); | 578 ProfileSyncService::SyncEvent(ProfileSyncService::STOP_FROM_OPTIONS); |
| 579 } | 579 } |
| 580 gtk_widget_destroy(widget); | 580 gtk_widget_destroy(widget); |
| 581 } | 581 } |
| OLD | NEW |