diff options
author | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 01:32:46 +0000 |
---|---|---|
committer | rbyers@chromium.org <rbyers@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-17 01:32:46 +0000 |
commit | 3fd27897d9d639558d11ee86f5e90c4d9301a4cc (patch) | |
tree | f8b5fe3fc65f85db78e5f5910c01b099eff44cc0 /chrome/browser/resources/touch_ntp | |
parent | 8c6517e5e15b7e9a3d3c95f697f674d221968acc (diff) | |
download | chromium_src-3fd27897d9d639558d11ee86f5e90c4d9301a4cc.zip chromium_src-3fd27897d9d639558d11ee86f5e90c4d9301a4cc.tar.gz chromium_src-3fd27897d9d639558d11ee86f5e90c4d9301a4cc.tar.bz2 |
Fix touch_ntp to use new app data field properties
In http://codereview.chromium.org/7779024/, 'name' and 'launch_url' properties
were removed from the app data objects, and NTP4 was updated to use 'title' and
'url' instead. This change just makes the corresponding change to the TOUCH_UI
specific NTP (which will eventually go away and be merged back into ntp4).
BUG=100437
TEST=Manual
Review URL: http://codereview.chromium.org/8292008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105762 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/resources/touch_ntp')
-rw-r--r-- | chrome/browser/resources/touch_ntp/newtab.js | 8 | ||||
-rw-r--r-- | chrome/browser/resources/touch_ntp/standalone/standalone_hack.js | 34 |
2 files changed, 21 insertions, 21 deletions
diff --git a/chrome/browser/resources/touch_ntp/newtab.js b/chrome/browser/resources/touch_ntp/newtab.js index 91df34d..293b872 100644 --- a/chrome/browser/resources/touch_ntp/newtab.js +++ b/chrome/browser/resources/touch_ntp/newtab.js @@ -296,8 +296,8 @@ var ntp = (function() { id: '', // Empty ID signifies this is a special synthesized app page_index: 0, app_launch_index: -1, // always first - name: templateData.web_store_title, - launch_url: templateData.web_store_url, + title: templateData.web_store_title, + url: templateData.web_store_url, icon_big: getThemeUrl('IDR_WEBSTORE_ICON') }; } @@ -362,7 +362,7 @@ var ntp = (function() { // Find the span element (if any) and fill it in with the app name var span = appElement.querySelector('span'); if (span) - span.textContent = app.name; + span.textContent = app.title; // Fill in the image // We use a mask of the same image so CSS rules can highlight just the image @@ -382,7 +382,7 @@ var ntp = (function() { // would be better for the back-end to just create virtual apps for such // cases. appEvents.add(appImg, 'click', function(e) { - window.location = app.launch_url; + window.location = app.url; }, false); } } diff --git a/chrome/browser/resources/touch_ntp/standalone/standalone_hack.js b/chrome/browser/resources/touch_ntp/standalone/standalone_hack.js index d636f99..67e7dfd 100644 --- a/chrome/browser/resources/touch_ntp/standalone/standalone_hack.js +++ b/chrome/browser/resources/touch_ntp/standalone/standalone_hack.js @@ -53,8 +53,8 @@ chrome.send = (function() { id: 'mcbkbpnkkkipelfledbfocopglifcfmi', launch_container: 2, launch_type: 1, - launch_url: 'http://poppit.pogo.com/hd/PoppitHD.html', - name: 'Poppit', + url: 'http://poppit.pogo.com/hd/PoppitHD.html', + title: 'Poppit', options_url: '' }, { @@ -65,8 +65,8 @@ chrome.send = (function() { id: 'pjkljhegncpnkpknbcohdijeoejaedia', launch_container: 2, launch_type: 1, - launch_url: 'https://mail.google.com/', - name: 'Gmail', + url: 'https://mail.google.com/', + title: 'Gmail', options_url: 'https://mail.google.com/mail/#settings' }, { @@ -77,8 +77,8 @@ chrome.send = (function() { id: 'mmimngoggfoobjdlefbcabngfnmieonb', launch_container: 2, launch_type: 1, - launch_url: 'http://books.google.com/ebooks?source=chrome-app', - name: 'Google Books', + url: 'http://books.google.com/ebooks?source=chrome-app', + title: 'Google Books', options_url: '' }, { @@ -90,8 +90,8 @@ chrome.send = (function() { id: 'lneaknkopdijkpnocmklfnjbeapigfbh', launch_container: 2, launch_type: 1, - launch_url: 'http://maps.google.com/', - name: 'Google Maps', + url: 'http://maps.google.com/', + title: 'Google Maps', options_url: '' }, { @@ -102,19 +102,19 @@ chrome.send = (function() { id: 'aciahcmjmecflokailenpkdchphgkefd', launch_container: 2, launch_type: 1, - launch_url: 'http://entanglement.gopherwoodstudios.com/', - name: 'Entanglement', + url: 'http://entanglement.gopherwoodstudios.com/', + title: 'Entanglement', options_url: '' }, { - name: 'NYTimes', + title: 'NYTimes', app_launch_index: 6, description: 'The New York Times App for the Chrome Web Store.', icon_big: 'standalone/nytimes-icon.png', id: 'ecmphppfkcfflgglcokcbdkofpfegoel', launch_container: 2, launch_type: 1, - launch_url: 'http://www.nytimes.com/chrome/', + url: 'http://www.nytimes.com/chrome/', options_url: '', page_index: 2 }, @@ -125,8 +125,8 @@ chrome.send = (function() { icon_big: 'standalone/youtube-icon.png', launch_container: 2, launch_type: 1, - launch_url: 'http://www.youtube.com/', - name: 'YouTube', + url: 'http://www.youtube.com/', + title: 'YouTube', options_url: '', page_index: 3 }]; @@ -243,14 +243,14 @@ chrome.send = (function() { // Replace the current tab with the app. // Pinned seems to omit the tab title, but I doubt it's // possible for us to do that here - window.location = (app.launch_url); + window.location = (app.url); break; case 2: // fullscreen case 3: // window // attempt to launch in a new window window.close(); - window.open(app.launch_url, app.name, + window.open(app.url, app.title, 'resizable=yes,scrollbars=yes,status=yes'); break; @@ -267,7 +267,7 @@ chrome.send = (function() { var i = getAppIndex(id); // This confirmation dialog doesn't look exactly the same as the // standard NTP one, but it's close enough. - if (window.confirm('Uninstall \"' + apps[i].name + '\"?')) { + if (window.confirm('Uninstall \"' + apps[i].title + '\"?')) { apps.splice(i, 1); sendGetAppsCallback(); } |