| 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 columns->AddColumn(views::GridLayout::LEADING, // Horizontal leading. | 182 columns->AddColumn(views::GridLayout::LEADING, // Horizontal leading. |
| 183 views::GridLayout::FILL, // Vertical resize. | 183 views::GridLayout::FILL, // Vertical resize. |
| 184 1, // Resize weight. | 184 1, // Resize weight. |
| 185 views::GridLayout::USE_PREF, // Size type. | 185 views::GridLayout::USE_PREF, // Size type. |
| 186 0, // Ignored for USE_PREF. | 186 0, // Ignored for USE_PREF. |
| 187 0); // Minimum size. | 187 0); // Minimum size. |
| 188 | 188 |
| 189 grid_layout->StartRow(0, 0); | 189 grid_layout->StartRow(0, 0); |
| 190 grid_layout->AddView(label); | 190 grid_layout->AddView(label); |
| 191 grid_layout->AddPaddingRow( | 191 grid_layout->AddPaddingRow( |
| 192 0, provider->GetDistanceMetric(DISTANCE_UNRELATED_CONTROL_VERTICAL)); | 192 0, |
| 193 provider->GetDistanceMetric(views::DISTANCE_UNRELATED_CONTROL_VERTICAL)); |
| 193 grid_layout->Layout(this); | 194 grid_layout->Layout(this); |
| 194 } | 195 } |
| 195 | 196 |
| 196 //////////////////////////////////////////////////////////////////////////////// | 197 //////////////////////////////////////////////////////////////////////////////// |
| 197 // Handler for certificate enrollment. | 198 // Handler for certificate enrollment. |
| 198 | 199 |
| 199 class DialogEnrollmentDelegate { | 200 class DialogEnrollmentDelegate { |
| 200 public: | 201 public: |
| 201 // |owning_window| is the window that will own the dialog. | 202 // |owning_window| is the window that will own the dialog. |
| 202 DialogEnrollmentDelegate(gfx::NativeWindow owning_window, | 203 DialogEnrollmentDelegate(gfx::NativeWindow owning_window, |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 339 | 340 |
| 340 DialogEnrollmentDelegate* enrollment = | 341 DialogEnrollmentDelegate* enrollment = |
| 341 new DialogEnrollmentDelegate(owning_window, network->name(), profile); | 342 new DialogEnrollmentDelegate(owning_window, network->name(), profile); |
| 342 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), | 343 return enrollment->Enroll(cert_config.pattern.enrollment_uri_list(), |
| 343 base::Bind(&EnrollmentComplete, network_id)); | 344 base::Bind(&EnrollmentComplete, network_id)); |
| 344 } | 345 } |
| 345 | 346 |
| 346 } // namespace enrollment | 347 } // namespace enrollment |
| 347 | 348 |
| 348 } // namespace chromeos | 349 } // namespace chromeos |
| OLD | NEW |