| 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/uninstall_view.h" | 5 #include "chrome/browser/ui/views/uninstall_view.h" |
| 6 | 6 |
| 7 #include "base/message_loop.h" | 7 #include "base/message_loop.h" |
| 8 #include "base/process_util.h" | 8 #include "base/process_util.h" |
| 9 #include "base/string16.h" | 9 #include "base/string16.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 | 40 |
| 41 GridLayout* layout = GridLayout::CreatePanel(this); | 41 GridLayout* layout = GridLayout::CreatePanel(this); |
| 42 SetLayoutManager(layout); | 42 SetLayoutManager(layout); |
| 43 | 43 |
| 44 // Message to confirm uninstallation. | 44 // Message to confirm uninstallation. |
| 45 int column_set_id = 0; | 45 int column_set_id = 0; |
| 46 ColumnSet* column_set = layout->AddColumnSet(column_set_id); | 46 ColumnSet* column_set = layout->AddColumnSet(column_set_id); |
| 47 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 47 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| 48 GridLayout::USE_PREF, 0, 0); | 48 GridLayout::USE_PREF, 0, 0); |
| 49 layout->StartRow(0, column_set_id); | 49 layout->StartRow(0, column_set_id); |
| 50 confirm_label_ = new views::Label( | 50 confirm_label_ = new views::Label(UTF16ToWide( |
| 51 l10n_util::GetStringUTF16(IDS_UNINSTALL_VERIFY)); | 51 l10n_util::GetStringUTF16(IDS_UNINSTALL_VERIFY))); |
| 52 confirm_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 52 confirm_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 53 layout->AddView(confirm_label_); | 53 layout->AddView(confirm_label_); |
| 54 | 54 |
| 55 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); | 55 layout->AddPaddingRow(0, views::kUnrelatedControlVerticalSpacing); |
| 56 | 56 |
| 57 // The "delete profile" check box. | 57 // The "delete profile" check box. |
| 58 ++column_set_id; | 58 ++column_set_id; |
| 59 column_set = layout->AddColumnSet(column_set_id); | 59 column_set = layout->AddColumnSet(column_set_id); |
| 60 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); | 60 column_set->AddPaddingColumn(0, views::kRelatedControlHorizontalSpacing); |
| 61 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 61 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 DCHECK(!browsers_->empty()); | 147 DCHECK(!browsers_->empty()); |
| 148 return browsers_->size(); | 148 return browsers_->size(); |
| 149 } | 149 } |
| 150 | 150 |
| 151 string16 UninstallView::GetItemAt(int index) { | 151 string16 UninstallView::GetItemAt(int index) { |
| 152 DCHECK_LT(index, static_cast<int>(browsers_->size())); | 152 DCHECK_LT(index, static_cast<int>(browsers_->size())); |
| 153 BrowsersMap::const_iterator it = browsers_->begin(); | 153 BrowsersMap::const_iterator it = browsers_->begin(); |
| 154 std::advance(it, index); | 154 std::advance(it, index); |
| 155 return WideToUTF16Hack((*it).first); | 155 return WideToUTF16Hack((*it).first); |
| 156 } | 156 } |
| OLD | NEW |