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/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 "base/callback.h" | 13 #include "base/callback.h" |
14 #include "base/command_line.h" | 14 #include "base/command_line.h" |
15 #include "base/message_loop.h" | 15 #include "base/message_loop.h" |
16 #include "base/process_util.h" | 16 #include "base/process_util.h" |
17 #include "base/string_util.h" | 17 #include "base/string_util.h" |
18 #include "base/utf_string_conversions.h" | 18 #include "base/utf_string_conversions.h" |
19 #include "chrome/browser/browser_process.h" | 19 #include "chrome/browser/browser_process.h" |
20 #include "chrome/browser/chromeos/cros/cros_library.h" | 20 #include "chrome/browser/chromeos/cros/cros_library.h" |
21 #include "chrome/browser/chromeos/cros_settings.h" | |
21 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" | 22 #include "chrome/browser/chromeos/login/rounded_rect_painter.h" |
22 #include "chrome/browser/chromeos/login/textfield_with_margin.h" | 23 #include "chrome/browser/chromeos/login/textfield_with_margin.h" |
23 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" | 24 #include "chrome/browser/chromeos/login/wizard_accessibility_helper.h" |
24 #include "chrome/browser/chromeos/user_cros_settings_provider.h" | |
25 #include "chrome/browser/chromeos/views/copy_background.h" | 25 #include "chrome/browser/chromeos/views/copy_background.h" |
26 #include "chrome/browser/prefs/pref_service.h" | 26 #include "chrome/browser/prefs/pref_service.h" |
27 #include "chrome/common/pref_names.h" | 27 #include "chrome/common/pref_names.h" |
28 #include "grit/chromium_strings.h" | 28 #include "grit/chromium_strings.h" |
29 #include "grit/generated_resources.h" | 29 #include "grit/generated_resources.h" |
30 #include "grit/ui_resources.h" | 30 #include "grit/ui_resources.h" |
31 #include "ui/base/keycodes/keyboard_codes.h" | 31 #include "ui/base/keycodes/keyboard_codes.h" |
32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
33 #include "ui/base/resource/resource_bundle.h" | 33 #include "ui/base/resource/resource_bundle.h" |
34 #include "ui/gfx/font.h" | 34 #include "ui/gfx/font.h" |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
123 accel_login_off_the_record_(ui::VKEY_B, false, false, true), | 123 accel_login_off_the_record_(ui::VKEY_B, false, false, true), |
124 accel_toggle_accessibility_(WizardAccessibilityHelper::GetAccelerator()), | 124 accel_toggle_accessibility_(WizardAccessibilityHelper::GetAccelerator()), |
125 delegate_(delegate), | 125 delegate_(delegate), |
126 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)), | 126 ALLOW_THIS_IN_INITIALIZER_LIST(focus_grabber_factory_(this)), |
127 login_in_process_(false), | 127 login_in_process_(false), |
128 need_border_(need_border), | 128 need_border_(need_border), |
129 need_guest_link_(false), | 129 need_guest_link_(false), |
130 need_create_account_(false), | 130 need_create_account_(false), |
131 languages_menubutton_order_(-1), | 131 languages_menubutton_order_(-1), |
132 sign_in_button_order_(-1) { | 132 sign_in_button_order_(-1) { |
133 if (UserCrosSettingsProvider::cached_allow_guest()) { | 133 bool allow_guest = false; |
134 CrosSettings::Get()->GetBoolean(kAccountsPrefAllowGuest, &allow_guest); | |
Mattias Nissler (ping if slow)
2011/09/21 11:12:59
same comment as before regarding the problem of re
pastarmovj
2011/09/23 15:19:32
I put this todo here as well to make this class ob
| |
135 if (allow_guest) { | |
134 need_create_account_ = true; | 136 need_create_account_ = true; |
135 if (need_guest_link) | 137 if (need_guest_link) |
136 need_guest_link_ = true; | 138 need_guest_link_ = true; |
137 } | 139 } |
138 } | 140 } |
139 | 141 |
140 NewUserView::~NewUserView() { | 142 NewUserView::~NewUserView() { |
141 } | 143 } |
142 | 144 |
143 void NewUserView::Init() { | 145 void NewUserView::Init() { |
(...skipping 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
572 | 574 |
573 void NewUserView::InitLink(views::Link** link) { | 575 void NewUserView::InitLink(views::Link** link) { |
574 *link = new views::Link(std::wstring()); | 576 *link = new views::Link(std::wstring()); |
575 (*link)->set_listener(this); | 577 (*link)->set_listener(this); |
576 (*link)->SetNormalColor(login::kLinkColor); | 578 (*link)->SetNormalColor(login::kLinkColor); |
577 (*link)->SetHighlightedColor(login::kLinkColor); | 579 (*link)->SetHighlightedColor(login::kLinkColor); |
578 AddChildView(*link); | 580 AddChildView(*link); |
579 } | 581 } |
580 | 582 |
581 } // namespace chromeos | 583 } // namespace chromeos |
OLD | NEW |