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 #27445 from huchengtw-moz/bug-1122360-search-app-i…
Browse files Browse the repository at this point in the history
…s-not-opened

Bug 1122360 - [Stingray][smart-system] let search app can be launched as..., r=lchang
  • Loading branch information
huchengtw-moz committed Jan 19, 2015
2 parents f062745 + 4fb8263 commit 09398ac
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 25 deletions.
15 changes: 0 additions & 15 deletions tv_apps/smart-system/js/app_chrome.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@
return;
}

if (this.isSearchApp()) {
this.app.element.classList.add('search-app');
this.title.setAttribute('data-l10n-id', 'search-or-enter-address');
} else {
this.app.element.classList.remove('search-app');
}

if (chrome.bar) {
this.app.element.classList.add('bar');
this.bar.classList.add('visible');
Expand Down Expand Up @@ -386,9 +379,6 @@
};

AppChrome.prototype.setFreshTitle = function ac_setFreshTitle(title) {
if (this.isSearchApp()) {
return;
}
this.title.textContent = title;
clearTimeout(this._titleTimeout);
this._recentTitle = true;
Expand Down Expand Up @@ -613,11 +603,6 @@
return dataset.searchURL && this._currentURL === dataset.searchURL;
};

AppChrome.prototype.isSearchApp = function() {
return this.app.config.manifest &&
this.app.config.manifest.role === 'search';
};

AppChrome.prototype.addBookmark = function ac_addBookmark() {
var dataset = this.app.config;
var favicons = this.app.favicons;
Expand Down
8 changes: 1 addition & 7 deletions tv_apps/smart-system/js/app_window_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
// uses app.launch or iac-customlaunchpath.
config.changeURL = true;
// Please no `break;` here. It's on purpose.
/* falls through */
case 'openwindow':
case 'appopenwindow':
config.timestamp = detail.timestamp;
Expand Down Expand Up @@ -183,13 +184,6 @@
return;
}

// The rocketbar currently handles the management of normal search app
// launches. Requests for the 'newtab' page will continue to filter
// through and publish the launchapp event.
if (config.manifest && config.manifest.role === 'search' &&
config.url.indexOf('newtab.html') === -1) {
return;
}
var app = AppWindowManager.getApp(config.origin, config.manifestURL);
if (app) {
if (config.evtType === 'appopenwindow' ||
Expand Down
4 changes: 1 addition & 3 deletions tv_apps/smart-system/js/wrapper_factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,7 @@
// If we already have a browser and we receive an open request,
// display it in the current browser frame.
var activeApp = AppWindowManager.getActiveApp();
var isSearchApp = (activeApp.manifest &&
activeApp.manifest.role === 'search');
if (activeApp && (activeApp.isBrowser() || isSearchApp)) {
if (activeApp && activeApp.isBrowser()) {
activeApp.navigate(url);
return;
}
Expand Down

0 comments on commit 09398ac

Please sign in to comment.