| 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/chromeos/options/network_config_view.h" | 5 #include "chrome/browser/chromeos/options/network_config_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
| (...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 | 126 |
| 127 void NetworkConfigView::ShowAdvancedView() { | 127 void NetworkConfigView::ShowAdvancedView() { |
| 128 // Clear out the old widgets and build new ones. | 128 // Clear out the old widgets and build new ones. |
| 129 RemoveChildView(child_config_view_); | 129 RemoveChildView(child_config_view_); |
| 130 delete child_config_view_; | 130 delete child_config_view_; |
| 131 // For now, there is only an advanced view for Wi-Fi 802.1X. | 131 // For now, there is only an advanced view for Wi-Fi 802.1X. |
| 132 child_config_view_ = new WifiConfigView(this, true /* show_8021x */); | 132 child_config_view_ = new WifiConfigView(this, true /* show_8021x */); |
| 133 AddChildView(child_config_view_); | 133 AddChildView(child_config_view_); |
| 134 // Resize the window to be able to hold the new widgets. | 134 // Resize the window to be able to hold the new widgets. |
| 135 gfx::Size size = views::Window::GetLocalizedContentsSize( | 135 gfx::Size size = views::Window::GetLocalizedContentsSize( |
| 136 IDS_JOIN_WIFI_NETWORK_DIALOG_WIDTH_CHARS, | 136 IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_WIDTH_CHARS, |
| 137 IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_MINIMUM_HEIGHT_LINES); | 137 IDS_JOIN_WIFI_NETWORK_DIALOG_ADVANCED_MINIMUM_HEIGHT_LINES); |
| 138 gfx::Rect bounds(size.width(), size.height()); | 138 gfx::Rect bounds(size.width(), size.height()); |
| 139 // Window is automatically centered. | 139 // Window is automatically centered. |
| 140 window()->SetWindowBounds(bounds, GetNativeWindow()); | 140 window()->SetWindowBounds(bounds, GetNativeWindow()); |
| 141 Layout(); | 141 Layout(); |
| 142 child_config_view_->InitFocus(); | 142 child_config_view_->InitFocus(); |
| 143 } | 143 } |
| 144 | 144 |
| 145 void NetworkConfigView::Layout() { | 145 void NetworkConfigView::Layout() { |
| 146 child_config_view_->SetBounds(0, 0, width(), height()); | 146 child_config_view_->SetBounds(0, 0, width(), height()); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 | 179 |
| 180 int column_set_id = 0; | 180 int column_set_id = 0; |
| 181 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); | 181 views::ColumnSet* column_set = layout->AddColumnSet(column_set_id); |
| 182 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, | 182 column_set->AddColumn(views::GridLayout::LEADING, views::GridLayout::LEADING, |
| 183 0, views::GridLayout::USE_PREF, 0, 0); | 183 0, views::GridLayout::USE_PREF, 0, 0); |
| 184 layout->StartRow(0, column_set_id); | 184 layout->StartRow(0, column_set_id); |
| 185 layout->AddView(advanced_button_); | 185 layout->AddView(advanced_button_); |
| 186 } | 186 } |
| 187 | 187 |
| 188 } // namespace chromeos | 188 } // namespace chromeos |
| OLD | NEW |