1bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini# Copyright 2016 The Chromium OS Authors. All rights reserved. 2bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini# Use of this source code is governed by a BSD-style license that can be 3bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini# found in the LICENSE file. 4bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 5bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavinifrom autotest_lib.client.common_lib import error 6bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavinifrom autotest_lib.client.common_lib.cros import kiosk_utils 7bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 8bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 9bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gaviniclass KioskFacadeNative(object): 10bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini """Facade to access the Kiosk functionality.""" 11bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 12bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 13bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini def __init__(self, resource): 14bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini """ 15bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini Initializes a KioskFacadeNative. 16bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 17bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini @param resource: A FacadeResource object. 18bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 19bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini """ 20bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini self._resource = resource 21bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 22bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 23bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini def config_rise_player(self, ext_id, app_config_id): 24bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini """ 25bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini Configure Rise Player app with a specific display id. 26bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 27bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini @param ext_id: extension id of the Rise Player Kiosk App. 28bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini @param app_config_id: display id for the Rise Player app. 29bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini 30bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini """ 31bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini custom_chrome_setup = {"clear_enterprise_policy": False, 32bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini "dont_override_profile": True, 33bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini "disable_gaia_services": False, 34bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini "disable_default_apps": False, 35bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini "auto_login": False} 36bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini self._resource.start_custom_chrome(custom_chrome_setup) 37bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini kiosk_utils.config_riseplayer( 38bcad9e98f39e3869c392489f8d93aa9d32ae0de7Krishna Gavini self._resource._browser, ext_id, app_config_id) 39