| 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/options/advanced_page_view.h" | 5 #include "chrome/browser/ui/views/options/advanced_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 "base/utf_string_conversions.h" | 9 #include "base/utf_string_conversions.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 // AdvancedPageView, OptionsPageView implementation: | 122 // AdvancedPageView, OptionsPageView implementation: |
| 123 | 123 |
| 124 void AdvancedPageView::InitControlLayout() { | 124 void AdvancedPageView::InitControlLayout() { |
| 125 reset_to_default_button_ = new views::NativeButton( | 125 reset_to_default_button_ = new views::NativeButton( |
| 126 this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_RESET))); | 126 this, UTF16ToWide(l10n_util::GetStringUTF16(IDS_OPTIONS_RESET))); |
| 127 advanced_scroll_view_ = new AdvancedScrollViewContainer(profile()); | 127 advanced_scroll_view_ = new AdvancedScrollViewContainer(profile()); |
| 128 | 128 |
| 129 using views::GridLayout; | 129 using views::GridLayout; |
| 130 using views::ColumnSet; | 130 using views::ColumnSet; |
| 131 | 131 |
| 132 GridLayout* layout = CreatePanelGridLayout(this); | 132 GridLayout* layout = GridLayout::CreatePanel(this); |
| 133 SetLayoutManager(layout); | 133 SetLayoutManager(layout); |
| 134 | 134 |
| 135 const int single_column_view_set_id = 0; | 135 const int single_column_view_set_id = 0; |
| 136 ColumnSet* column_set = layout->AddColumnSet(single_column_view_set_id); | 136 ColumnSet* column_set = layout->AddColumnSet(single_column_view_set_id); |
| 137 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, | 137 column_set->AddColumn(GridLayout::FILL, GridLayout::FILL, 1, |
| 138 GridLayout::USE_PREF, 0, 0); | 138 GridLayout::USE_PREF, 0, 0); |
| 139 layout->StartRow(0, single_column_view_set_id); | 139 layout->StartRow(0, single_column_view_set_id); |
| 140 layout->AddView( | 140 layout->AddView( |
| 141 new ManagedPrefsBannerView(profile()->GetPrefs(), OPTIONS_PAGE_ADVANCED)); | 141 new ManagedPrefsBannerView(profile()->GetPrefs(), OPTIONS_PAGE_ADVANCED)); |
| 142 | 142 |
| 143 layout->StartRow(1, single_column_view_set_id); | 143 layout->StartRow(1, single_column_view_set_id); |
| 144 layout->AddView(advanced_scroll_view_); | 144 layout->AddView(advanced_scroll_view_); |
| 145 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); | 145 layout->AddPaddingRow(0, kRelatedControlVerticalSpacing); |
| 146 | 146 |
| 147 layout->StartRow(0, single_column_view_set_id); | 147 layout->StartRow(0, single_column_view_set_id); |
| 148 layout->AddView(reset_to_default_button_, 1, 1, | 148 layout->AddView(reset_to_default_button_, 1, 1, |
| 149 GridLayout::TRAILING, GridLayout::CENTER); | 149 GridLayout::TRAILING, GridLayout::CENTER); |
| 150 } | 150 } |
| OLD | NEW |