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/advanced_contents_gtk.h" | 5 #include "chrome/browser/gtk/options/advanced_contents_gtk.h" |
6 | 6 |
7 #include <sys/types.h> | 7 #include <sys/types.h> |
8 #include <sys/wait.h> | 8 #include <sys/wait.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1186 | 1186 |
1187 AdvancedContentsGtk::AdvancedContentsGtk(Profile* profile) | 1187 AdvancedContentsGtk::AdvancedContentsGtk(Profile* profile) |
1188 : profile_(profile) { | 1188 : profile_(profile) { |
1189 Init(); | 1189 Init(); |
1190 } | 1190 } |
1191 | 1191 |
1192 AdvancedContentsGtk::~AdvancedContentsGtk() { | 1192 AdvancedContentsGtk::~AdvancedContentsGtk() { |
1193 } | 1193 } |
1194 | 1194 |
1195 void AdvancedContentsGtk::Init() { | 1195 void AdvancedContentsGtk::Init() { |
1196 OptionsLayoutBuilderGtk options_builder; | 1196 scoped_ptr<OptionsLayoutBuilderGtk> |
| 1197 options_builder(OptionsLayoutBuilderGtk::Create()); |
1197 | 1198 |
1198 privacy_section_.reset(new PrivacySection(profile_)); | 1199 privacy_section_.reset(new PrivacySection(profile_)); |
1199 options_builder.AddOptionGroup( | 1200 options_builder->AddOptionGroup( |
1200 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY), | 1201 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY), |
1201 privacy_section_->get_page_widget(), false); | 1202 privacy_section_->get_page_widget(), false); |
1202 | 1203 |
1203 network_section_.reset(new NetworkSection(profile_)); | 1204 network_section_.reset(new NetworkSection(profile_)); |
1204 options_builder.AddOptionGroup( | 1205 options_builder->AddOptionGroup( |
1205 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK), | 1206 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_NETWORK), |
1206 network_section_->get_page_widget(), false); | 1207 network_section_->get_page_widget(), false); |
1207 | 1208 |
1208 translate_section_.reset(new TranslateSection(profile_)); | 1209 translate_section_.reset(new TranslateSection(profile_)); |
1209 options_builder.AddOptionGroup( | 1210 options_builder->AddOptionGroup( |
1210 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE), | 1211 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_TRANSLATE), |
1211 translate_section_->get_page_widget(), false); | 1212 translate_section_->get_page_widget(), false); |
1212 | 1213 |
1213 download_section_.reset(new DownloadSection(profile_)); | 1214 download_section_.reset(new DownloadSection(profile_)); |
1214 options_builder.AddOptionGroup( | 1215 options_builder->AddOptionGroup( |
1215 l10n_util::GetStringUTF8(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME), | 1216 l10n_util::GetStringUTF8(IDS_OPTIONS_DOWNLOADLOCATION_GROUP_NAME), |
1216 download_section_->get_page_widget(), false); | 1217 download_section_->get_page_widget(), false); |
1217 | 1218 |
1218 web_content_section_.reset(new WebContentSection(profile_)); | 1219 web_content_section_.reset(new WebContentSection(profile_)); |
1219 options_builder.AddOptionGroup( | 1220 options_builder->AddOptionGroup( |
1220 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), | 1221 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_CONTENT), |
1221 web_content_section_->get_page_widget(), false); | 1222 web_content_section_->get_page_widget(), false); |
1222 | 1223 |
1223 security_section_.reset(new SecuritySection(profile_)); | 1224 security_section_.reset(new SecuritySection(profile_)); |
1224 options_builder.AddOptionGroup( | 1225 options_builder->AddOptionGroup( |
1225 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), | 1226 l10n_util::GetStringUTF8(IDS_OPTIONS_ADVANCED_SECTION_TITLE_SECURITY), |
1226 security_section_->get_page_widget(), false); | 1227 security_section_->get_page_widget(), false); |
1227 | 1228 |
1228 page_ = options_builder.get_page_widget(); | 1229 page_ = options_builder->get_page_widget(); |
1229 } | 1230 } |
OLD | NEW |