OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 /** | 5 /** |
6 * @fileoverview PageListView implementation. | 6 * @fileoverview PageListView implementation. |
7 * PageListView manages page list, dot list, switcher buttons and handles apps | 7 * PageListView manages page list, dot list, switcher buttons and handles apps |
8 * pages callbacks from backend. | 8 * pages callbacks from backend. |
9 * | 9 * |
10 * Note that you need to have AppLauncherHandler in your WebUI to use this code. | 10 * Note that you need to have AppLauncherHandler in your WebUI to use this code. |
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
343 * @private | 343 * @private |
344 */ | 344 */ |
345 appsLoaded_: false, | 345 appsLoaded_: false, |
346 | 346 |
347 /** | 347 /** |
348 * Callback invoked by chrome with the apps available. | 348 * Callback invoked by chrome with the apps available. |
349 * | 349 * |
350 * Note that calls to this function can occur at any time, not just in | 350 * Note that calls to this function can occur at any time, not just in |
351 * response to a getApps request. For example, when a user | 351 * response to a getApps request. For example, when a user |
352 * installs/uninstalls an app on another synchronized devices. | 352 * installs/uninstalls an app on another synchronized devices. |
353 * @param {{apps: Array.<AppInfo>, appPageNames: Array.<string>}} data | 353 * @param {{apps: Array<AppInfo>, appPageNames: Array<string>}} data |
354 * An object with all the data on available applications. | 354 * An object with all the data on available applications. |
355 */ | 355 */ |
356 getAppsCallback: function(data) { | 356 getAppsCallback: function(data) { |
357 assert(loadTimeData.getBoolean('showApps')); | 357 assert(loadTimeData.getBoolean('showApps')); |
358 | 358 |
359 var startTime = Date.now(); | 359 var startTime = Date.now(); |
360 | 360 |
361 // Remember this to select the correct card when done rebuilding. | 361 // Remember this to select the correct card when done rebuilding. |
362 var prevCurrentCard = this.cardSlider.currentCard; | 362 var prevCurrentCard = this.cardSlider.currentCard; |
363 | 363 |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 if (page.navigationDot) | 837 if (page.navigationDot) |
838 page.navigationDot.remove(opt_animate); | 838 page.navigationDot.remove(opt_animate); |
839 this.cardSlider.removeCard(page); | 839 this.cardSlider.removeCard(page); |
840 }, | 840 }, |
841 }; | 841 }; |
842 | 842 |
843 return { | 843 return { |
844 PageListView: PageListView | 844 PageListView: PageListView |
845 }; | 845 }; |
846 }); | 846 }); |
OLD | NEW |