~ubuntu-branches/ubuntu/vivid/unity-webapps-qml/vivid

« back to all changes in this revision

Viewing changes to src/Ubuntu/UnityWebApps/UnityWebApps.js

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release, Ubuntu daily release, Alexandre Abreu
  • Date: 2014-05-06 17:27:01 UTC
  • mfrom: (1.1.29)
  • Revision ID: package-import@ubuntu.com-20140506172701-mmffqu27v3s2y500
Tags: 0.1+14.10.20140506.1-0ubuntu1
[ Ubuntu daily release ]
* New rebuild forced

[ Alexandre Abreu ]
* Add UA override capabilities to webapps; clean some code and tests,
  (LP: #1245465)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
     * \param backends
37
37
     * \param userscriptContent
38
38
     */
39
 
    function _UnityWebApps(parentItem, bindeeProxies, backends, userscripts) {
 
39
    function _UnityWebApps(parentItem, bindeeProxies) {
40
40
        this._injected_unity_api_path = Qt.resolvedUrl('unity-webapps-api.js');
41
41
        this._bindeeProxies = bindeeProxies;
42
 
        this._backends = backends;
43
 
        this._userscripts = userscripts || [];
 
42
        this._backends = null;
 
43
        this._userscripts = [];
44
44
 
45
45
        this._bind();
46
46
    };
56
56
            return this._bindeeProxies;
57
57
        },
58
58
 
 
59
        setUserScriptsToInject: function(userscripts) {
 
60
            this._userscripts = userscripts;
 
61
        },
 
62
 
 
63
        setBackends: function(backends) {
 
64
            this._backends = backends;
 
65
        },
 
66
 
59
67
        /**
60
68
         * \internal
61
69
         *
168
176
         *
169
177
         */
170
178
        _dispatchApiCall: function (name, args) {
 
179
            if ( ! this._backends)
 
180
                return;
 
181
 
171
182
            var names = name.split('.');
172
183
            var reducetarget = this._backends;
173
184
            try {