| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/enrollment_dialog_view.h" | 5 #include "chrome/browser/chromeos/enrollment_dialog_view.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/callback.h" | 8 #include "base/callback.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 added_cert_ = false; | 155 added_cert_ = false; |
| 156 // Create the views and layout manager and set them up. | 156 // Create the views and layout manager and set them up. |
| 157 views::Label* label = new views::Label( | 157 views::Label* label = new views::Label( |
| 158 l10n_util::GetStringFUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_INSTRUCTIONS, | 158 l10n_util::GetStringFUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_INSTRUCTIONS, |
| 159 base::UTF8ToUTF16(network_name_))); | 159 base::UTF8ToUTF16(network_name_))); |
| 160 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); | 160 label->SetHorizontalAlignment(gfx::ALIGN_LEFT); |
| 161 label->SetMultiLine(true); | 161 label->SetMultiLine(true); |
| 162 label->SetAllowCharacterBreak(true); | 162 label->SetAllowCharacterBreak(true); |
| 163 | 163 |
| 164 views::GridLayout* grid_layout = views::GridLayout::CreatePanel(this); | 164 views::GridLayout* grid_layout = views::GridLayout::CreatePanel(this); |
| 165 SetLayoutManager(grid_layout); | |
| 166 | 165 |
| 167 views::ColumnSet* columns = grid_layout->AddColumnSet(0); | 166 views::ColumnSet* columns = grid_layout->AddColumnSet(0); |
| 168 columns->AddColumn(views::GridLayout::FILL, // Horizontal resize. | 167 columns->AddColumn(views::GridLayout::FILL, // Horizontal resize. |
| 169 views::GridLayout::FILL, // Vertical resize. | 168 views::GridLayout::FILL, // Vertical resize. |
| 170 1, // Resize weight. | 169 1, // Resize weight. |
| 171 views::GridLayout::USE_PREF, // Size type. | 170 views::GridLayout::USE_PREF, // Size type. |
| 172 0, // Ignored for USE_PREF. | 171 0, // Ignored for USE_PREF. |
| 173 0); // Minimum size. | 172 0); // Minimum size. |
| 174 columns = grid_layout->AddColumnSet(1); | 173 columns = grid_layout->AddColumnSet(1); |
| 175 columns->AddPaddingColumn( | 174 columns->AddPaddingColumn( |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 302 |
| 304 DialogEnrollmentDelegate* enrollment = | 303 DialogEnrollmentDelegate* enrollment = |
| 305 new DialogEnrollmentDelegate(owning_window, network->name(), profile); | 304 new DialogEnrollmentDelegate(owning_window, network->name(), profile); |
| 306 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), | 305 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), |
| 307 base::Bind(&EnrollmentComplete, network_id)); | 306 base::Bind(&EnrollmentComplete, network_id)); |
| 308 } | 307 } |
| 309 | 308 |
| 310 } // namespace enrollment | 309 } // namespace enrollment |
| 311 | 310 |
| 312 } // namespace chromeos | 311 } // namespace chromeos |
| OLD | NEW |