OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/views/importer_view.h" | 5 #include "chrome/browser/ui/views/importer_view.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
10 #include "chrome/browser/browser_list.h" | 10 #include "chrome/browser/browser_list.h" |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 (initial_state_ & importer::FAVORITES) != 0); | 72 (initial_state_ & importer::FAVORITES) != 0); |
73 passwords_checkbox_ = InitCheckbox( | 73 passwords_checkbox_ = InitCheckbox( |
74 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_PASSWORDS_CHKBOX)), | 74 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_PASSWORDS_CHKBOX)), |
75 (initial_state_ & importer::PASSWORDS) != 0); | 75 (initial_state_ & importer::PASSWORDS) != 0); |
76 search_engines_checkbox_ = InitCheckbox( | 76 search_engines_checkbox_ = InitCheckbox( |
77 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_SEARCH_ENGINES_CHKBOX)), | 77 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_SEARCH_ENGINES_CHKBOX)), |
78 (initial_state_ & importer::SEARCH_ENGINES) != 0); | 78 (initial_state_ & importer::SEARCH_ENGINES) != 0); |
79 | 79 |
80 // Arranges controls by using GridLayout. | 80 // Arranges controls by using GridLayout. |
81 const int column_set_id = 0; | 81 const int column_set_id = 0; |
82 GridLayout* layout = CreatePanelGridLayout(this); | 82 GridLayout* layout = GridLayout::CreatePanel(this); |
83 SetLayoutManager(layout); | 83 SetLayoutManager(layout); |
84 ColumnSet* column_set = layout->AddColumnSet(column_set_id); | 84 ColumnSet* column_set = layout->AddColumnSet(column_set_id); |
85 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 85 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
86 GridLayout::USE_PREF, 0, 0); | 86 GridLayout::USE_PREF, 0, 0); |
87 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); | 87 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); |
88 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, | 88 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 0, |
89 GridLayout::FIXED, 200, 0); | 89 GridLayout::FIXED, 200, 0); |
90 | 90 |
91 layout->StartRow(0, column_set_id); | 91 layout->StartRow(0, column_set_id); |
92 layout->AddView(import_from_label_); | 92 layout->AddView(import_from_label_); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
292 | 292 |
293 if (favorites_checkbox_->IsEnabled()) | 293 if (favorites_checkbox_->IsEnabled()) |
294 favorites_checkbox_->SetChecked(!!(items & importer::FAVORITES)); | 294 favorites_checkbox_->SetChecked(!!(items & importer::FAVORITES)); |
295 | 295 |
296 if (passwords_checkbox_->IsEnabled()) | 296 if (passwords_checkbox_->IsEnabled()) |
297 passwords_checkbox_->SetChecked(!!(items & importer::PASSWORDS)); | 297 passwords_checkbox_->SetChecked(!!(items & importer::PASSWORDS)); |
298 | 298 |
299 if (search_engines_checkbox_->IsEnabled()) | 299 if (search_engines_checkbox_->IsEnabled()) |
300 search_engines_checkbox_->SetChecked(!!(items & importer::SEARCH_ENGINES)); | 300 search_engines_checkbox_->SetChecked(!!(items & importer::SEARCH_ENGINES)); |
301 } | 301 } |
OLD | NEW |