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 New tab page initialization/config. |
| 7 */ |
| 8 |
| 9 cr.define('ntp4', function() { |
| 10 'use strict'; |
| 11 |
| 12 /** |
| 13 * Invoked at startup once the DOM is available to initialize the app. |
| 14 */ |
| 15 function initialize() { |
| 16 var config = {}; |
| 17 config.shownPage = templateData['shown_page_type']; |
| 18 config.shownPageIndex = templateData['shown_page_index']; |
| 19 |
| 20 config.supportsPageSwitchers = true; |
| 21 config.supportsNotification = true; |
| 22 config.supportsRecentlyClosed = true; |
| 23 config.supportsMostVisited = true; |
| 24 config.supportsBookmarks = templateData['bookmark_features'] == 'true'; |
| 25 config.supportsSyncLogin = true; |
| 26 |
| 27 ntp4.setup(config); |
| 28 } |
| 29 |
| 30 return { |
| 31 initialize: initialize |
| 32 }; |
| 33 }); |
| 34 |
| 35 document.addEventListener('DOMContentLoaded', ntp4.initialize); |
OLD | NEW |