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/wizard_controller.h" | 5 #include "chrome/browser/chromeos/login/wizard_controller.h" |
6 | 6 |
7 #include <gdk/gdk.h> | 7 #include <gdk/gdk.h> |
8 #include <signal.h> | 8 #include <signal.h> |
9 #include <sys/types.h> | 9 #include <sys/types.h> |
10 | 10 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 "/mnt/partner_partition/etc/chromeos/startup_manifest.json"; | 62 "/mnt/partner_partition/etc/chromeos/startup_manifest.json"; |
63 | 63 |
64 // Path to flag file indicating that OOBE was completed successfully. | 64 // Path to flag file indicating that OOBE was completed successfully. |
65 const char kOobeCompleteFlagFilePath[] = | 65 const char kOobeCompleteFlagFilePath[] = |
66 "/home/chronos/.oobe_completed"; | 66 "/home/chronos/.oobe_completed"; |
67 | 67 |
68 // Default size of the OOBE screen. | 68 // Default size of the OOBE screen. |
69 const int kWizardScreenWidth = 700; | 69 const int kWizardScreenWidth = 700; |
70 const int kWizardScreenHeight = 416; | 70 const int kWizardScreenHeight = 416; |
71 | 71 |
| 72 // Update window should appear for at least kMinimalUpdateTimeSec seconds. |
| 73 const int kMinimalUpdateTimeSec = 3; |
| 74 |
| 75 // Time in seconds that we wait for the device to reboot. |
| 76 // If reboot didn't happen, ask user to reboot device manually. |
| 77 const int kWaitForRebootTimeSec = 3; |
| 78 |
72 // RootView of the Widget WizardController creates. Contains the contents of the | 79 // RootView of the Widget WizardController creates. Contains the contents of the |
73 // WizardController. | 80 // WizardController. |
74 class ContentView : public views::View { | 81 class ContentView : public views::View { |
75 public: | 82 public: |
76 ContentView(int window_x, int window_y, int screen_w, int screen_h) | 83 ContentView(int window_x, int window_y, int screen_w, int screen_h) |
77 : window_x_(window_x), | 84 : window_x_(window_x), |
78 window_y_(window_y), | 85 window_y_(window_y), |
79 screen_w_(screen_w), | 86 screen_w_(screen_w), |
80 screen_h_(screen_h), | 87 screen_h_(screen_h), |
81 accel_account_screen_(views::Accelerator(base::VKEY_A, | 88 accel_account_screen_(views::Accelerator(base::VKEY_A, |
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return login_screen_.get(); | 344 return login_screen_.get(); |
338 } | 345 } |
339 | 346 |
340 chromeos::AccountScreen* WizardController::GetAccountScreen() { | 347 chromeos::AccountScreen* WizardController::GetAccountScreen() { |
341 if (!account_screen_.get()) | 348 if (!account_screen_.get()) |
342 account_screen_.reset(new chromeos::AccountScreen(this)); | 349 account_screen_.reset(new chromeos::AccountScreen(this)); |
343 return account_screen_.get(); | 350 return account_screen_.get(); |
344 } | 351 } |
345 | 352 |
346 chromeos::UpdateScreen* WizardController::GetUpdateScreen() { | 353 chromeos::UpdateScreen* WizardController::GetUpdateScreen() { |
347 if (!update_screen_.get()) | 354 if (!update_screen_.get()) { |
348 update_screen_.reset(new chromeos::UpdateScreen(this)); | 355 update_screen_.reset(new chromeos::UpdateScreen(this)); |
| 356 update_screen_->SetMinimalUpdateTime(kMinimalUpdateTimeSec); |
| 357 update_screen_->SetRebootCheckDelay(kWaitForRebootTimeSec); |
| 358 } |
349 return update_screen_.get(); | 359 return update_screen_.get(); |
350 } | 360 } |
351 | 361 |
352 chromeos::UserImageScreen* WizardController::GetUserImageScreen() { | 362 chromeos::UserImageScreen* WizardController::GetUserImageScreen() { |
353 if (!user_image_screen_.get()) | 363 if (!user_image_screen_.get()) |
354 user_image_screen_.reset(new chromeos::UserImageScreen(this)); | 364 user_image_screen_.reset(new chromeos::UserImageScreen(this)); |
355 return user_image_screen_.get(); | 365 return user_image_screen_.get(); |
356 } | 366 } |
357 | 367 |
358 chromeos::EulaScreen* WizardController::GetEulaScreen() { | 368 chromeos::EulaScreen* WizardController::GetEulaScreen() { |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
862 // user has changed to during OOBE. | 872 // user has changed to during OOBE. |
863 if (!timezone_name.empty()) { | 873 if (!timezone_name.empty()) { |
864 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( | 874 icu::TimeZone* timezone = icu::TimeZone::createTimeZone( |
865 icu::UnicodeString::fromUTF8(timezone_name)); | 875 icu::UnicodeString::fromUTF8(timezone_name)); |
866 chromeos::CrosLibrary::Get()->GetSystemLibrary()->SetTimezone(timezone); | 876 chromeos::CrosLibrary::Get()->GetSystemLibrary()->SetTimezone(timezone); |
867 } | 877 } |
868 } | 878 } |
869 } | 879 } |
870 | 880 |
871 } // namespace browser | 881 } // namespace browser |
OLD | NEW |