1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "chrome/browser/ui/webui/chromeos/login/host_pairing_screen_handler.h"
7 #include "chrome/browser/ui/webui/chromeos/login/oobe_ui.h"
13 const char kJsScreenPath[] = "login.HostPairingScreen";
15 const char kMethodContextChanged[] = "contextChanged";
19 HostPairingScreenHandler::HostPairingScreenHandler()
20 : BaseScreenHandler(kJsScreenPath), delegate_(NULL), show_on_init_(false) {
23 HostPairingScreenHandler::~HostPairingScreenHandler() {
25 delegate_->OnActorDestroyed(this);
28 void HostPairingScreenHandler::Initialize() {
29 if (!page_is_ready() || !delegate_)
34 show_on_init_ = false;
38 void HostPairingScreenHandler::DeclareLocalizedValues(
39 LocalizedValuesBuilder* builder) {
42 void HostPairingScreenHandler::RegisterMessages() {
45 void HostPairingScreenHandler::Show() {
46 if (!page_is_ready()) {
50 ShowScreen(OobeUI::kScreenHostPairing, NULL);
53 void HostPairingScreenHandler::Hide() {
56 void HostPairingScreenHandler::SetDelegate(Delegate* delegate) {
62 void HostPairingScreenHandler::OnContextChanged(
63 const base::DictionaryValue& diff) {
64 CallJS(kMethodContextChanged, diff);
67 } // namespace chromeos