OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 /** |
| 6 * @fileoverview App list UI. |
| 7 * For now, most of its logic is borrowed from ntp4. |
| 8 */ |
| 9 |
| 10 // Use an anonymous function to enable strict mode just for this file (which |
| 11 // will be concatenated with other files when embedded in Chrome |
| 12 cr.define('appList', function() { |
| 13 |
| 14 /** |
| 15 * Invoked at startup once the DOM is available to initialize the app. |
| 16 */ |
| 17 function initialize() { |
| 18 // Setup NTP app UI. |
| 19 var config = {}; |
| 20 config.shownPage = templateData['shown_page_type']; |
| 21 config.shownPageIndex = templateData['shown_page_index']; |
| 22 |
| 23 config.supportsPageSwitchers = false; |
| 24 config.supportsNotification = false; |
| 25 config.supportsRecentlyClosed = false; |
| 26 config.supportsMostVisited = false; |
| 27 config.supportsBookmarks = false; |
| 28 config.supportsSyncLogin = false; |
| 29 |
| 30 ntp4.setup(config); |
| 31 } |
| 32 |
| 33 // Return an object with all the exports |
| 34 return { |
| 35 initialize: initialize |
| 36 }; |
| 37 }); |
| 38 |
| 39 document.addEventListener('DOMContentLoaded', appList.initialize); |
OLD | NEW |