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/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/cros/network_library.h" | 9 #include "chrome/browser/chromeos/cros/network_library.h" |
10 #include "chrome/browser/extensions/extension_host.h" | 10 #include "chrome/browser/extensions/extension_host.h" |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 } | 150 } |
151 | 151 |
152 void EnrollmentDialogView::InitDialog() { | 152 void EnrollmentDialogView::InitDialog() { |
153 added_cert_ = false; | 153 added_cert_ = false; |
154 // Create the views and layout manager and set them up. | 154 // Create the views and layout manager and set them up. |
155 views::Label* label = new views::Label( | 155 views::Label* label = new views::Label( |
156 l10n_util::GetStringFUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_INSTRUCTIONS, | 156 l10n_util::GetStringFUTF16(IDS_NETWORK_ENROLLMENT_HANDLER_INSTRUCTIONS, |
157 UTF8ToUTF16(network_name_))); | 157 UTF8ToUTF16(network_name_))); |
158 label->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( | 158 label->SetFont(ui::ResourceBundle::GetSharedInstance().GetFont( |
159 ui::ResourceBundle::BaseFont)); | 159 ui::ResourceBundle::BaseFont)); |
160 label->SetHorizontalAlignment(views::Label::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); | 165 SetLayoutManager(grid_layout); |
166 | 166 |
167 views::ColumnSet* columns = grid_layout->AddColumnSet(0); | 167 views::ColumnSet* columns = grid_layout->AddColumnSet(0); |
168 columns->AddColumn(views::GridLayout::FILL, // Horizontal resize. | 168 columns->AddColumn(views::GridLayout::FILL, // Horizontal resize. |
169 views::GridLayout::FILL, // Vertical resize. | 169 views::GridLayout::FILL, // Vertical resize. |
170 1, // Resize weight. | 170 1, // Resize weight. |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 //////////////////////////////////////////////////////////////////////////////// | 253 //////////////////////////////////////////////////////////////////////////////// |
254 // Factory function. | 254 // Factory function. |
255 | 255 |
256 EnrollmentDelegate* CreateEnrollmentDelegate(gfx::NativeWindow owning_window, | 256 EnrollmentDelegate* CreateEnrollmentDelegate(gfx::NativeWindow owning_window, |
257 const std::string& network_name, | 257 const std::string& network_name, |
258 Profile* profile) { | 258 Profile* profile) { |
259 return new DialogEnrollmentDelegate(owning_window, network_name, profile); | 259 return new DialogEnrollmentDelegate(owning_window, network_name, profile); |
260 } | 260 } |
261 | 261 |
262 } // namespace chromeos | 262 } // namespace chromeos |
OLD | NEW |