| 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/terms_of_service_screen_handler
.h" | 5 #include "chrome/browser/ui/webui/chromeos/login/terms_of_service_screen_handler
.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 namespace { | 31 namespace { |
| 32 | 32 |
| 33 const char kJsScreenPath[] = "login.TermsOfServiceScreen"; | 33 const char kJsScreenPath[] = "login.TermsOfServiceScreen"; |
| 34 | 34 |
| 35 } // namespace | 35 } // namespace |
| 36 | 36 |
| 37 namespace chromeos { | 37 namespace chromeos { |
| 38 | 38 |
| 39 TermsOfServiceScreenHandler::TermsOfServiceScreenHandler( | 39 TermsOfServiceScreenHandler::TermsOfServiceScreenHandler( |
| 40 CoreOobeActor* core_oobe_actor) | 40 CoreOobeActor* core_oobe_actor) |
| 41 : BaseScreenHandler(kJsScreenPath), | 41 : core_oobe_actor_(core_oobe_actor) { |
| 42 screen_(NULL), | 42 set_call_js_prefix(kJsScreenPath); |
| 43 core_oobe_actor_(core_oobe_actor), | |
| 44 show_on_init_(false), | |
| 45 load_error_(false) { | |
| 46 } | 43 } |
| 47 | 44 |
| 48 TermsOfServiceScreenHandler::~TermsOfServiceScreenHandler() { | 45 TermsOfServiceScreenHandler::~TermsOfServiceScreenHandler() { |
| 49 if (screen_) | 46 if (screen_) |
| 50 screen_->OnActorDestroyed(this); | 47 screen_->OnActorDestroyed(this); |
| 51 } | 48 } |
| 52 | 49 |
| 53 void TermsOfServiceScreenHandler::RegisterMessages() { | 50 void TermsOfServiceScreenHandler::RegisterMessages() { |
| 54 AddCallback("termsOfServiceBack", | 51 AddCallback("termsOfServiceBack", |
| 55 &TermsOfServiceScreenHandler::HandleBack); | 52 &TermsOfServiceScreenHandler::HandleBack); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 // and continue" button should not be accessible. If the user managed to | 204 // and continue" button should not be accessible. If the user managed to |
| 208 // activate it somehow anway, do not treat this as acceptance of the Terms | 205 // activate it somehow anway, do not treat this as acceptance of the Terms |
| 209 // and Conditions and end the session instead, as if the user had declined. | 206 // and Conditions and end the session instead, as if the user had declined. |
| 210 if (terms_of_service_.empty()) | 207 if (terms_of_service_.empty()) |
| 211 screen_->OnDecline(); | 208 screen_->OnDecline(); |
| 212 else | 209 else |
| 213 screen_->OnAccept(); | 210 screen_->OnAccept(); |
| 214 } | 211 } |
| 215 | 212 |
| 216 } // namespace chromeos | 213 } // namespace chromeos |
| OLD | NEW |