deviceinfo-browser.js 1.73 KB
/*
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2017 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 */

/* globals Promise */
define('screens/player/firmware/deviceinfo/impl/deviceinfo-browser', [
    'screens/player/firmware/deviceinfo/spi/deviceinfo',
    'module'
], function(DeviceInfoSpi, mod) {
    'use strict';

    /**
     * Defines the DeviceInfoSpi Browser Implementation
     *
     * @class DeviceInfoService
     * @implements {DeviceInfoSpi}
     */
    return Object.create(DeviceInfoSpi, {

        serviceId: {
            value: mod.id
        },

        activate: {
            value: function() {
                return Promise.resolve();
            }
        },

        deactivate: {
            value: function() {
                return Promise.resolve();
            }
        },

        get: {
            value: function() {
                return Promise.resolve({
                    model: 'Browser',
                    webView: navigator.userAgent
                });
            }
        }

    });
});

require([
    'screens/player/firmware/deviceinfo/impl/deviceinfo-browser',
    'screens/player/shared/serviceadmin'
], function(Service, ServiceAdmin) {
    'use strict';
    ServiceAdmin.register(Service);
});