| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ui/webui/chromeos/login/update_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/update_screen_handler.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 #include "chrome/browser/chromeos/login/screens/update_model.h" | 10 #include "chrome/browser/chromeos/login/screens/update_model.h" |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 58 builder->Add("updatingScreenTitle", IDS_UPDATING_SCREEN_TITLE); | 58 builder->Add("updatingScreenTitle", IDS_UPDATING_SCREEN_TITLE); |
| 59 } | 59 } |
| 60 | 60 |
| 61 void UpdateScreenHandler::Initialize() { | 61 void UpdateScreenHandler::Initialize() { |
| 62 if (show_on_init_) { | 62 if (show_on_init_) { |
| 63 Show(); | 63 Show(); |
| 64 show_on_init_ = false; | 64 show_on_init_ = false; |
| 65 } | 65 } |
| 66 } | 66 } |
| 67 | 67 |
| 68 void UpdateScreenHandler::PrepareToShow() { | |
| 69 } | |
| 70 | |
| 71 void UpdateScreenHandler::Show() { | 68 void UpdateScreenHandler::Show() { |
| 72 if (!page_is_ready()) { | 69 if (!page_is_ready()) { |
| 73 show_on_init_ = true; | 70 show_on_init_ = true; |
| 74 return; | 71 return; |
| 75 } | 72 } |
| 76 ShowScreen(OobeScreen::SCREEN_OOBE_UPDATE); | 73 ShowScreen(OobeScreen::SCREEN_OOBE_UPDATE); |
| 77 } | 74 } |
| 78 | 75 |
| 79 void UpdateScreenHandler::Hide() { | 76 void UpdateScreenHandler::Hide() { |
| 80 } | 77 } |
| 81 | 78 |
| 82 void UpdateScreenHandler::Bind(UpdateModel& model) { | 79 void UpdateScreenHandler::Bind(UpdateModel& model) { |
| 83 model_ = &model; | 80 model_ = &model; |
| 84 BaseScreenHandler::SetBaseScreen(model_); | 81 BaseScreenHandler::SetBaseScreen(model_); |
| 85 } | 82 } |
| 86 | 83 |
| 87 void UpdateScreenHandler::Unbind() { | 84 void UpdateScreenHandler::Unbind() { |
| 88 model_ = nullptr; | 85 model_ = nullptr; |
| 89 BaseScreenHandler::SetBaseScreen(nullptr); | 86 BaseScreenHandler::SetBaseScreen(nullptr); |
| 90 } | 87 } |
| 91 | 88 |
| 92 } // namespace chromeos | 89 } // namespace chromeos |
| OLD | NEW |