| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/wrong_hwid_screen_handler.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/wrong_hwid_screen_handler.h" |
| 6 | 6 |
| 7 #include "chrome/browser/chromeos/login/oobe_screen.h" | 7 #include "chrome/browser/chromeos/login/oobe_screen.h" |
| 8 #include "chrome/grit/generated_resources.h" | 8 #include "chrome/grit/generated_resources.h" |
| 9 #include "components/login/localized_values_builder.h" | 9 #include "components/login/localized_values_builder.h" |
| 10 | 10 |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 const char kJsScreenPath[] = "login.WrongHWIDScreen"; | 13 const char kJsScreenPath[] = "login.WrongHWIDScreen"; |
| 14 | 14 |
| 15 } // namespace | 15 } // namespace |
| 16 | 16 |
| 17 namespace chromeos { | 17 namespace chromeos { |
| 18 | 18 |
| 19 WrongHWIDScreenHandler::WrongHWIDScreenHandler() | 19 WrongHWIDScreenHandler::WrongHWIDScreenHandler() { |
| 20 : BaseScreenHandler(kJsScreenPath), | 20 set_call_js_prefix(kJsScreenPath); |
| 21 delegate_(NULL), | |
| 22 show_on_init_(false) { | |
| 23 } | 21 } |
| 24 | 22 |
| 25 WrongHWIDScreenHandler::~WrongHWIDScreenHandler() { | 23 WrongHWIDScreenHandler::~WrongHWIDScreenHandler() { |
| 26 if (delegate_) | 24 if (delegate_) |
| 27 delegate_->OnActorDestroyed(this); | 25 delegate_->OnActorDestroyed(this); |
| 28 } | 26 } |
| 29 | 27 |
| 30 void WrongHWIDScreenHandler::Show() { | 28 void WrongHWIDScreenHandler::Show() { |
| 31 if (!page_is_ready()) { | 29 if (!page_is_ready()) { |
| 32 show_on_init_ = true; | 30 show_on_init_ = true; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 void WrongHWIDScreenHandler::RegisterMessages() { | 66 void WrongHWIDScreenHandler::RegisterMessages() { |
| 69 AddCallback("wrongHWIDOnSkip", &WrongHWIDScreenHandler::HandleOnSkip); | 67 AddCallback("wrongHWIDOnSkip", &WrongHWIDScreenHandler::HandleOnSkip); |
| 70 } | 68 } |
| 71 | 69 |
| 72 void WrongHWIDScreenHandler::HandleOnSkip() { | 70 void WrongHWIDScreenHandler::HandleOnSkip() { |
| 73 if (delegate_) | 71 if (delegate_) |
| 74 delegate_->OnExit(); | 72 delegate_->OnExit(); |
| 75 } | 73 } |
| 76 | 74 |
| 77 } // namespace chromeos | 75 } // namespace chromeos |
| OLD | NEW |