| 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/background_view.h" | 5 #include "chrome/browser/chromeos/login/background_view.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/string16.h" | 10 #include "base/string16.h" |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 } | 335 } |
| 336 | 336 |
| 337 void BackgroundView::InitInfoLabels() { | 337 void BackgroundView::InitInfoLabels() { |
| 338 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); | 338 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); |
| 339 | 339 |
| 340 { | 340 { |
| 341 int idx = GetIndexOf(os_version_label_); | 341 int idx = GetIndexOf(os_version_label_); |
| 342 delete os_version_label_; | 342 delete os_version_label_; |
| 343 os_version_label_ = new views::Label(); | 343 os_version_label_ = new views::Label(); |
| 344 os_version_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 344 os_version_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 345 os_version_label_->SetColor(kVersionColor); | 345 os_version_label_->SetEnabledColor(kVersionColor); |
| 346 os_version_label_->SetBackgroundColor(background()->get_color()); |
| 346 os_version_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); | 347 os_version_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); |
| 347 if (idx < 0) | 348 if (idx < 0) |
| 348 AddChildView(os_version_label_); | 349 AddChildView(os_version_label_); |
| 349 else | 350 else |
| 350 AddChildViewAt(os_version_label_, idx); | 351 AddChildViewAt(os_version_label_, idx); |
| 351 } | 352 } |
| 352 if (!is_official_build_) { | 353 if (!is_official_build_) { |
| 353 int idx = GetIndexOf(boot_times_label_); | 354 int idx = GetIndexOf(boot_times_label_); |
| 354 delete boot_times_label_; | 355 delete boot_times_label_; |
| 355 boot_times_label_ = new views::Label(); | 356 boot_times_label_ = new views::Label(); |
| 356 boot_times_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); | 357 boot_times_label_->SetHorizontalAlignment(views::Label::ALIGN_LEFT); |
| 357 boot_times_label_->SetColor(kVersionColor); | 358 boot_times_label_->SetEnabledColor(kVersionColor); |
| 359 boot_times_label_->SetBackgroundColor(background()->get_color()); |
| 358 boot_times_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); | 360 boot_times_label_->SetFont(rb.GetFont(ResourceBundle::SmallFont)); |
| 359 if (idx < 0) | 361 if (idx < 0) |
| 360 AddChildView(boot_times_label_); | 362 AddChildView(boot_times_label_); |
| 361 else | 363 else |
| 362 AddChildViewAt(boot_times_label_, idx); | 364 AddChildViewAt(boot_times_label_, idx); |
| 363 } | 365 } |
| 364 | 366 |
| 365 version_info_updater_.StartUpdate(is_official_build_); | 367 version_info_updater_.StartUpdate(is_official_build_); |
| 366 } | 368 } |
| 367 | 369 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 383 | 385 |
| 384 void BackgroundView::UpdateWindowType() { | 386 void BackgroundView::UpdateWindowType() { |
| 385 std::vector<int> params; | 387 std::vector<int> params; |
| 386 WmIpc::instance()->SetWindowType( | 388 WmIpc::instance()->SetWindowType( |
| 387 GTK_WIDGET(GetNativeWindow()), | 389 GTK_WIDGET(GetNativeWindow()), |
| 388 WM_IPC_WINDOW_LOGIN_BACKGROUND, | 390 WM_IPC_WINDOW_LOGIN_BACKGROUND, |
| 389 ¶ms); | 391 ¶ms); |
| 390 } | 392 } |
| 391 | 393 |
| 392 } // namespace chromeos | 394 } // namespace chromeos |
| OLD | NEW |