Index: chrome/browser/resources/app_list.js |
diff --git a/chrome/browser/resources/app_list.js b/chrome/browser/resources/app_list.js |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3b96a5a87c2d1c96347c6dc83067cd5212214759 |
--- /dev/null |
+++ b/chrome/browser/resources/app_list.js |
@@ -0,0 +1,39 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+/** |
+ * @fileoverview App list UI. |
+ * For now, most of its logic is borrowed from ntp4. |
+ */ |
+ |
+// Use an anonymous function to enable strict mode just for this file (which |
+// will be concatenated with other files when embedded in Chrome |
+cr.define('appList', function() { |
+ |
+ /** |
+ * Invoked at startup once the DOM is available to initialize the app. |
+ */ |
+ function initialize() { |
+ // Setup NTP app UI. |
+ var config = {}; |
+ config.shownPage = templateData['shown_page_type']; |
+ config.shownPageIndex = templateData['shown_page_index']; |
+ |
+ config.supportsPageSwitchers = false; |
+ config.supportsNotification = false; |
+ config.supportsRecentlyClosed = false; |
+ config.supportsMostVisited = false; |
+ config.supportsBookmarks = false; |
+ config.supportsSyncLogin = false; |
+ |
+ ntp4.setup(config); |
+ } |
+ |
+ // Return an object with all the exports |
+ return { |
+ initialize: initialize |
+ }; |
+}); |
+ |
+document.addEventListener('DOMContentLoaded', appList.initialize); |