| 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/url_picker.h" | 5 #include "chrome/browser/ui/views/url_picker.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 std::vector<ui::TableColumn> cols; | 59 std::vector<ui::TableColumn> cols; |
| 60 cols.push_back(col1); | 60 cols.push_back(col1); |
| 61 cols.push_back(col2); | 61 cols.push_back(col2); |
| 62 | 62 |
| 63 url_table_ = new views::TableView(url_table_model_.get(), cols, | 63 url_table_ = new views::TableView(url_table_model_.get(), cols, |
| 64 views::ICON_AND_TEXT, true, true, | 64 views::ICON_AND_TEXT, true, true, |
| 65 true); | 65 true); |
| 66 url_table_->SetObserver(this); | 66 url_table_->SetObserver(this); |
| 67 | 67 |
| 68 // Yummy layout code. | 68 // Yummy layout code. |
| 69 GridLayout* layout = CreatePanelGridLayout(this); | 69 GridLayout* layout = GridLayout::CreatePanel(this); |
| 70 SetLayoutManager(layout); | 70 SetLayoutManager(layout); |
| 71 | 71 |
| 72 const int labels_column_set_id = 0; | 72 const int labels_column_set_id = 0; |
| 73 const int single_column_view_set_id = 1; | 73 const int single_column_view_set_id = 1; |
| 74 | 74 |
| 75 ColumnSet* column_set = layout->AddColumnSet(labels_column_set_id); | 75 ColumnSet* column_set = layout->AddColumnSet(labels_column_set_id); |
| 76 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, | 76 column_set->AddColumn(GridLayout::LEADING, GridLayout::CENTER, 0, |
| 77 GridLayout::USE_PREF, 0, 0); | 77 GridLayout::USE_PREF, 0, 0); |
| 78 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); | 78 column_set->AddPaddingColumn(0, kRelatedControlHorizontalSpacing); |
| 79 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, | 79 column_set->AddColumn(GridLayout::FILL, GridLayout::CENTER, 1, |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 PerformModelChange(); | 238 PerformModelChange(); |
| 239 if (window()) | 239 if (window()) |
| 240 window()->Close(); | 240 window()->Close(); |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 GURL UrlPicker::GetInputURL() const { | 244 GURL UrlPicker::GetInputURL() const { |
| 245 return URLFixerUpper::FixupURL(UTF16ToUTF8(url_field_->text()), | 245 return URLFixerUpper::FixupURL(UTF16ToUTF8(url_field_->text()), |
| 246 std::string()); | 246 std::string()); |
| 247 } | 247 } |
| OLD | NEW |