OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/new_user_view.h" | 5 #include "chrome/browser/chromeos/login/new_user_view.h" |
6 | 6 |
7 #include <signal.h> | 7 #include <signal.h> |
8 #include <sys/types.h> | 8 #include <sys/types.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "app/keyboard_codes.h" | 13 #include "app/keyboard_codes.h" |
14 #include "app/l10n_util.h" | 14 #include "app/l10n_util.h" |
15 #include "app/resource_bundle.h" | 15 #include "app/resource_bundle.h" |
16 #include "base/callback.h" | 16 #include "base/callback.h" |
17 #include "base/command_line.h" | 17 #include "base/command_line.h" |
18 #include "base/logging.h" | 18 #include "base/logging.h" |
19 #include "base/message_loop.h" | 19 #include "base/message_loop.h" |
20 #include "base/process_util.h" | 20 #include "base/process_util.h" |
21 #include "base/string_util.h" | 21 #include "base/string_util.h" |
22 #include "base/utf_string_conversions.h" | 22 #include "base/utf_string_conversions.h" |
23 #include "chrome/browser/chromeos/cros/cros_library.h" | 23 #include "chrome/browser/chromeos/cros/cros_library.h" |
24 #include "chrome/browser/chromeos/login/helper.h" | 24 #include "chrome/browser/chromeos/login/helper.h" |
25 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 25 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
| 26 #include "grit/app_resources.h" |
26 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
27 #include "views/controls/button/native_button.h" | 28 #include "views/controls/button/native_button.h" |
28 #include "views/controls/label.h" | 29 #include "views/controls/label.h" |
29 #include "views/controls/throbber.h" | 30 #include "views/controls/throbber.h" |
30 #include "views/widget/widget_gtk.h" | 31 #include "views/widget/widget_gtk.h" |
31 | 32 |
32 using views::Label; | 33 using views::Label; |
33 using views::Textfield; | 34 using views::Textfield; |
34 using views::View; | 35 using views::View; |
35 using views::WidgetGtk; | 36 using views::WidgetGtk; |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 if (need_create_account_) { | 129 if (need_create_account_) { |
129 InitLink(&create_account_link_); | 130 InitLink(&create_account_link_); |
130 } | 131 } |
131 if (need_browse_without_signin_) { | 132 if (need_browse_without_signin_) { |
132 InitLink(&browse_without_signin_link_); | 133 InitLink(&browse_without_signin_link_); |
133 } | 134 } |
134 | 135 |
135 language_switch_menu_.InitLanguageMenu(); | 136 language_switch_menu_.InitLanguageMenu(); |
136 languages_menubutton_ = new views::MenuButton( | 137 languages_menubutton_ = new views::MenuButton( |
137 NULL, std::wstring(), &language_switch_menu_, true); | 138 NULL, std::wstring(), &language_switch_menu_, true); |
| 139 languages_menubutton_->set_menu_marker( |
| 140 ResourceBundle::GetSharedInstance().GetBitmapNamed( |
| 141 IDR_MENU_DROPARROW_SHARP)); |
138 languages_menubutton_->SetFocusable(true); | 142 languages_menubutton_->SetFocusable(true); |
139 AddChildView(languages_menubutton_); | 143 AddChildView(languages_menubutton_); |
140 | 144 |
141 AddAccelerator(accel_focus_user_); | 145 AddAccelerator(accel_focus_user_); |
142 AddAccelerator(accel_focus_pass_); | 146 AddAccelerator(accel_focus_pass_); |
143 | 147 |
144 UpdateLocalizedStrings(); | 148 UpdateLocalizedStrings(); |
145 RequestFocus(); | 149 RequestFocus(); |
146 | 150 |
147 // Controller to handle events from textfields | 151 // Controller to handle events from textfields |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 } | 428 } |
425 } | 429 } |
426 | 430 |
427 void NewUserView::InitLink(views::Link** link) { | 431 void NewUserView::InitLink(views::Link** link) { |
428 *link = new views::Link(std::wstring()); | 432 *link = new views::Link(std::wstring()); |
429 (*link)->SetController(this); | 433 (*link)->SetController(this); |
430 AddChildView(*link); | 434 AddChildView(*link); |
431 } | 435 } |
432 | 436 |
433 } // namespace chromeos | 437 } // namespace chromeos |
OLD | NEW |