blob: 99a4decfe50fa764c7c68d1d35d497131f033eed [file] [log] [blame]
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "base/macros.h"
#include "chrome/browser/chromeos/login/enrollment/enterprise_enrollment_helper.h"
#include "chrome/browser/chromeos/login/oobe_screen.h"
namespace base {
class DictionaryValue;
class GoogleServiceAuthError;
namespace policy {
class EnrollmentStatus;
namespace chromeos {
namespace host_pairing {
// Keep these constants synced with corresponding constants defined in
// oobe_screen_host_pairing.js.
// Conxtext keys.
extern const char kContextKeyPage[];
extern const char kContextKeyDeviceName[];
extern const char kContextKeyConfirmationCode[];
extern const char kContextKeyEnrollmentDomain[];
extern const char kContextKeyUpdateProgress[];
extern const char kContextKeyEnrollmentError[];
// Pages names.
extern const char kPageWelcome[];
extern const char kPageIntializationError[];
extern const char kPageCodeConfirmation[];
extern const char kPageConnectionError[];
extern const char kPageSetupBasicConfiguration[];
extern const char kPageSetupNetworkError[];
extern const char kPageUpdate[];
extern const char kPageEnrollmentIntroduction[];
extern const char kPageEnrollment[];
extern const char kPageEnrollmentError[];
extern const char kPagePairingDone[];
} // namespace host_pairing
class HostPairingScreenView {
class Delegate {
virtual ~Delegate() {}
virtual void OnViewDestroyed(HostPairingScreenView* view) = 0;
constexpr static OobeScreen kScreenId = OobeScreen::SCREEN_OOBE_HOST_PAIRING;
virtual ~HostPairingScreenView();
virtual void Show() = 0;
virtual void Hide() = 0;
virtual void SetDelegate(Delegate* delegate) = 0;
virtual void OnContextChanged(const base::DictionaryValue& diff) = 0;
virtual std::string GetErrorStringFromAuthError(
const GoogleServiceAuthError& error) = 0;
virtual std::string GetErrorStringFromEnrollmentError(
policy::EnrollmentStatus status) = 0;
virtual std::string GetErrorStringFromOtherError(
EnterpriseEnrollmentHelper::OtherError error) = 0;
} // namespace chromeos