| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/options/exceptions_page_view.h" | 5 #include "chrome/browser/views/options/exceptions_page_view.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "chrome/browser/profile.h" | 9 #include "chrome/browser/profile.h" |
| 10 #include "chrome/common/pref_names.h" | 10 #include "chrome/common/pref_names.h" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 remove_all_button_.SetParentOwned(false); | 160 remove_all_button_.SetParentOwned(false); |
| 161 remove_all_button_.SetEnabled(false); | 161 remove_all_button_.SetEnabled(false); |
| 162 } | 162 } |
| 163 | 163 |
| 164 void ExceptionsPageView::SetupTable() { | 164 void ExceptionsPageView::SetupTable() { |
| 165 // Tell the table model we are concerned about how many rows it has. | 165 // Tell the table model we are concerned about how many rows it has. |
| 166 table_model_.set_row_count_observer(this); | 166 table_model_.set_row_count_observer(this); |
| 167 | 167 |
| 168 // Creates the different columns for the table. | 168 // Creates the different columns for the table. |
| 169 // The float resize values are the result of much tinkering. | 169 // The float resize values are the result of much tinkering. |
| 170 std::vector<views::TableColumn> columns; | 170 std::vector<TableColumn> columns; |
| 171 columns.push_back(views::TableColumn( | 171 columns.push_back(TableColumn( |
| 172 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, | 172 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, |
| 173 views::TableColumn::LEFT, -1, 0.55f)); | 173 TableColumn::LEFT, -1, 0.55f)); |
| 174 columns.back().sortable = true; | 174 columns.back().sortable = true; |
| 175 table_view_ = new views::TableView(&table_model_, columns, views::TEXT_ONLY, | 175 table_view_ = new views::TableView(&table_model_, columns, views::TEXT_ONLY, |
| 176 true, true, true); | 176 true, true, true); |
| 177 // Make the table initially sorted by host. | 177 // Make the table initially sorted by host. |
| 178 views::TableView::SortDescriptors sort; | 178 views::TableView::SortDescriptors sort; |
| 179 sort.push_back(views::TableView::SortDescriptor( | 179 sort.push_back(views::TableView::SortDescriptor( |
| 180 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, true)); | 180 IDS_PASSWORDS_PAGE_VIEW_SITE_COLUMN, true)); |
| 181 table_view_->SetSortDescriptors(sort); | 181 table_view_->SetSortDescriptors(sort); |
| 182 table_view_->SetObserver(this); | 182 table_view_->SetObserver(this); |
| 183 } | 183 } |
| OLD | NEW |