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/login/captcha_view.h" | 5 #include "chrome/browser/chromeos/login/captcha_view.h" |
6 | 6 |
7 #include "base/string_util.h" | 7 #include "base/string_util.h" |
8 #include "base/utf_string_conversions.h" | 8 #include "base/utf_string_conversions.h" |
9 #include "chrome/browser/chromeos/login/helper.h" | 9 #include "chrome/browser/chromeos/login/helper.h" |
10 #include "chrome/browser/chromeos/login/image_downloader.h" | 10 #include "chrome/browser/chromeos/login/image_downloader.h" |
11 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 11 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
12 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 12 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
13 #include "chrome/browser/chromeos/views/copy_background.h" | 13 #include "chrome/browser/chromeos/views/copy_background.h" |
14 #include "grit/chromium_strings.h" | 14 #include "grit/chromium_strings.h" |
15 #include "grit/generated_resources.h" | 15 #include "grit/generated_resources.h" |
16 #include "grit/locale_settings.h" | 16 #include "grit/locale_settings.h" |
17 #include "ui/base/l10n/l10n_util.h" | 17 #include "ui/base/l10n/l10n_util.h" |
| 18 #include "ui/views/background.h" |
18 #include "ui/views/controls/button/text_button.h" | 19 #include "ui/views/controls/button/text_button.h" |
19 #include "ui/views/controls/image_view.h" | 20 #include "ui/views/controls/image_view.h" |
20 #include "ui/views/controls/label.h" | 21 #include "ui/views/controls/label.h" |
21 #include "ui/views/controls/textfield/textfield.h" | 22 #include "ui/views/controls/textfield/textfield.h" |
22 #include "ui/views/layout/grid_layout.h" | 23 #include "ui/views/layout/grid_layout.h" |
23 #include "ui/views/layout/layout_constants.h" | 24 #include "ui/views/layout/layout_constants.h" |
24 #include "ui/views/widget/widget.h" | 25 #include "ui/views/widget/widget.h" |
25 #include "views/background.h" | |
26 | 26 |
27 using views::Label; | 27 using views::Label; |
28 using views::Textfield; | 28 using views::Textfield; |
29 | 29 |
30 namespace chromeos { | 30 namespace chromeos { |
31 | 31 |
32 namespace { | 32 namespace { |
33 | 33 |
34 // A Textfield for captcha input, which also sets focus to itself | 34 // A Textfield for captcha input, which also sets focus to itself |
35 // when a mouse is clicked on it. This is necessary in screen locker mode | 35 // when a mouse is clicked on it. This is necessary in screen locker mode |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 layout->AddView(ok_button_, 1, 1, | 209 layout->AddView(ok_button_, 1, 1, |
210 views::GridLayout::CENTER, views::GridLayout::CENTER); | 210 views::GridLayout::CENTER, views::GridLayout::CENTER); |
211 } | 211 } |
212 | 212 |
213 // ImageDownloader will delete itself once URL is fetched. | 213 // ImageDownloader will delete itself once URL is fetched. |
214 // TODO(nkostylev): Make sure that it works after view is deleted. | 214 // TODO(nkostylev): Make sure that it works after view is deleted. |
215 new ImageDownloader(this, GURL(captcha_url_), std::string()); | 215 new ImageDownloader(this, GURL(captcha_url_), std::string()); |
216 } | 216 } |
217 | 217 |
218 } // namespace chromeos | 218 } // namespace chromeos |
OLD | NEW |