| 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> |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 splitter->set_background(views::Background::CreateSolidBackground(color)); | 258 splitter->set_background(views::Background::CreateSolidBackground(color)); |
| 259 AddChildView(splitter); | 259 AddChildView(splitter); |
| 260 return splitter; | 260 return splitter; |
| 261 } | 261 } |
| 262 | 262 |
| 263 void NewUserView::AddChildView(View* view) { | 263 void NewUserView::AddChildView(View* view) { |
| 264 // languages_menubutton_ and sign_in_button_ are recreated on text change, | 264 // languages_menubutton_ and sign_in_button_ are recreated on text change, |
| 265 // so we restore their original position in layout. | 265 // so we restore their original position in layout. |
| 266 if (view == languages_menubutton_) { | 266 if (view == languages_menubutton_) { |
| 267 if (languages_menubutton_order_ < 0) { | 267 if (languages_menubutton_order_ < 0) { |
| 268 languages_menubutton_order_ = GetChildViewCount(); | 268 languages_menubutton_order_ = child_count(); |
| 269 } | 269 } |
| 270 views::View::AddChildView(languages_menubutton_order_, view); | 270 views::View::AddChildViewAt(view, languages_menubutton_order_); |
| 271 } else if (view == sign_in_button_) { | 271 } else if (view == sign_in_button_) { |
| 272 if (sign_in_button_order_ < 0) { | 272 if (sign_in_button_order_ < 0) { |
| 273 sign_in_button_order_ = GetChildViewCount(); | 273 sign_in_button_order_ = child_count(); |
| 274 } | 274 } |
| 275 views::View::AddChildView(sign_in_button_order_, view); | 275 views::View::AddChildViewAt(view, sign_in_button_order_); |
| 276 } else { | 276 } else { |
| 277 views::View::AddChildView(view); | 277 views::View::AddChildView(view); |
| 278 } | 278 } |
| 279 } | 279 } |
| 280 | 280 |
| 281 void NewUserView::UpdateLocalizedStrings() { | 281 void NewUserView::UpdateLocalizedStrings() { |
| 282 title_label_->SetText(UTF16ToWide( | 282 title_label_->SetText(UTF16ToWide( |
| 283 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE))); | 283 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE))); |
| 284 title_hint_label_->SetText(UTF16ToWide( | 284 title_hint_label_->SetText(UTF16ToWide( |
| 285 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE_HINT))); | 285 l10n_util::GetStringUTF16(IDS_LOGIN_TITLE_HINT))); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 | 549 |
| 550 void NewUserView::InitLink(views::Link** link) { | 550 void NewUserView::InitLink(views::Link** link) { |
| 551 *link = new views::Link(std::wstring()); | 551 *link = new views::Link(std::wstring()); |
| 552 (*link)->SetController(this); | 552 (*link)->SetController(this); |
| 553 (*link)->SetNormalColor(login::kLinkColor); | 553 (*link)->SetNormalColor(login::kLinkColor); |
| 554 (*link)->SetHighlightedColor(login::kLinkColor); | 554 (*link)->SetHighlightedColor(login::kLinkColor); |
| 555 AddChildView(*link); | 555 AddChildView(*link); |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace chromeos | 558 } // namespace chromeos |
| OLD | NEW |