1# Copyright 2016 The Chromium OS 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.
4
5from autotest_lib.client.common_lib import error
6from autotest_lib.client.common_lib.cros import kiosk_utils
7
8
9class KioskFacadeNative(object):
10    """Facade to access the Kiosk functionality."""
11
12
13    def __init__(self, resource):
14        """
15        Initializes a KioskFacadeNative.
16
17        @param resource: A FacadeResource object.
18
19        """
20        self._resource = resource
21
22
23    def config_rise_player(self, ext_id, app_config_id):
24        """
25        Configure Rise Player app with a specific display id.
26
27        @param ext_id: extension id of the Rise Player Kiosk App.
28        @param app_config_id: display id for the Rise Player app.
29
30        """
31        custom_chrome_setup = {"clear_enterprise_policy": False,
32                               "dont_override_profile": True,
33                               "disable_gaia_services": False,
34                               "disable_default_apps": False,
35                               "auto_login": False}
36        self._resource.start_custom_chrome(custom_chrome_setup)
37        kiosk_utils.config_riseplayer(
38                self._resource._browser, ext_id, app_config_id)
39