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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 ImporterView::~ImporterView() { | 51 ImporterView::~ImporterView() { |
52 } | 52 } |
53 | 53 |
54 void ImporterView::SetupControl() { | 54 void ImporterView::SetupControl() { |
55 // Adds all controls. | 55 // Adds all controls. |
56 import_from_label_ = new views::Label(UTF16ToWide( | 56 import_from_label_ = new views::Label(UTF16ToWide( |
57 l10n_util::GetStringUTF16(IDS_IMPORT_FROM_LABEL))); | 57 l10n_util::GetStringUTF16(IDS_IMPORT_FROM_LABEL))); |
58 | 58 |
59 profile_combobox_ = new views::Combobox(this); | 59 profile_combobox_ = new views::Combobox(this); |
60 profile_combobox_->set_listener(this); | 60 profile_combobox_->set_listener(this); |
61 profile_combobox_->SetAccessibleName(import_from_label_->GetText()); | 61 profile_combobox_->SetAccessibleName( |
| 62 WideToUTF16Hack(import_from_label_->GetText())); |
62 | 63 |
63 import_items_label_ = new views::Label(UTF16ToWide( | 64 import_items_label_ = new views::Label(UTF16ToWide( |
64 l10n_util::GetStringUTF16(IDS_IMPORT_ITEMS_LABEL))); | 65 l10n_util::GetStringUTF16(IDS_IMPORT_ITEMS_LABEL))); |
65 | 66 |
66 history_checkbox_ = InitCheckbox( | 67 history_checkbox_ = InitCheckbox( |
67 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_HISTORY_CHKBOX)), | 68 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_HISTORY_CHKBOX)), |
68 (initial_state_ & importer::HISTORY) != 0); | 69 (initial_state_ & importer::HISTORY) != 0); |
69 favorites_checkbox_ = InitCheckbox( | 70 favorites_checkbox_ = InitCheckbox( |
70 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_FAVORITES_CHKBOX)), | 71 UTF16ToWide(l10n_util::GetStringUTF16(IDS_IMPORT_FAVORITES_CHKBOX)), |
71 (initial_state_ & importer::FAVORITES) != 0); | 72 (initial_state_ & importer::FAVORITES) != 0); |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 | 292 |
292 if (favorites_checkbox_->IsEnabled()) | 293 if (favorites_checkbox_->IsEnabled()) |
293 favorites_checkbox_->SetChecked(!!(items & importer::FAVORITES)); | 294 favorites_checkbox_->SetChecked(!!(items & importer::FAVORITES)); |
294 | 295 |
295 if (passwords_checkbox_->IsEnabled()) | 296 if (passwords_checkbox_->IsEnabled()) |
296 passwords_checkbox_->SetChecked(!!(items & importer::PASSWORDS)); | 297 passwords_checkbox_->SetChecked(!!(items & importer::PASSWORDS)); |
297 | 298 |
298 if (search_engines_checkbox_->IsEnabled()) | 299 if (search_engines_checkbox_->IsEnabled()) |
299 search_engines_checkbox_->SetChecked(!!(items & importer::SEARCH_ENGINES)); | 300 search_engines_checkbox_->SetChecked(!!(items & importer::SEARCH_ENGINES)); |
300 } | 301 } |
OLD | NEW |