Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #26940 from huchengtw-moz/bug-1113495-hash-launch
Browse files Browse the repository at this point in the history
Bug 1113495 - [Stingray][Smart-system] Accept specified URL from home on..., r=rexboy
  • Loading branch information
huchengtw-moz committed Jan 5, 2015
2 parents 1b71c4c + bf044d3 commit bae1426
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tv_apps/smart-system/js/app_window_factory.js
Expand Up @@ -50,6 +50,7 @@
window.addEventListener('open-app', this.preHandleEvent);
window.addEventListener('openwindow', this.preHandleEvent);
window.addEventListener('appopenwindow', this.preHandleEvent);
window.addEventListener('iac-customlaunchpath', this.preHandleEvent);
window.addEventListener('applicationready', (function appReady(e) {
window.removeEventListener('applicationready', appReady);
this._handlePendingEvents();
Expand All @@ -71,6 +72,7 @@
window.removeEventListener('open-app', this.preHandleEvent);
window.removeEventListener('openwindow', this.preHandleEvent);
window.removeEventListener('appopenwindow', this.preHandleEvent);
window.removeEventListener('iac-customlaunchpath', this.preHandleEvent);
},

/**
Expand Down Expand Up @@ -111,6 +113,7 @@
case 'openwindow':
case 'appopenwindow':
case 'webapps-launch':
case 'iac-customlaunchpath':
config.timestamp = detail.timestamp;
// TODO: Look up current opened window list,
// and then create a new instance here.
Expand Down Expand Up @@ -183,7 +186,8 @@
}
var app = AppWindowManager.getApp(config.origin, config.manifestURL);
if (app) {
if (config.evtType == 'appopenwindow') {
if (config.evtType === 'appopenwindow' ||
config.evtType === 'iac-customlaunchpath') {
app.browser.element.src = config.url;
}
app.reviveBrowser();
Expand Down
6 changes: 6 additions & 0 deletions tv_apps/smart-system/manifest.webapp
Expand Up @@ -105,6 +105,12 @@
"rules": {
"minimumAccessLevel": "certified"
}
},
"customlaunchpath": {
"description": "communicate with smart-home to launch arbitrary path.",
"rules": {
"minimumAccessLevel": "certified"
}
}
},
"datastores-owned": {
Expand Down

0 comments on commit bae1426

Please sign in to comment.