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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 this.updateSliderCards(); | 337 this.updateSliderCards(); |
338 | 338 |
339 if (highlightApp) | 339 if (highlightApp) |
340 this.appAdded(highlightApp, true); | 340 this.appAdded(highlightApp, true); |
341 | 341 |
342 // Mark the current page. | 342 // Mark the current page. |
343 this.cardSlider.currentCardValue.navigationDot.classList.add('selected'); | 343 this.cardSlider.currentCardValue.navigationDot.classList.add('selected'); |
344 logEvent('apps.layout: ' + (Date.now() - startTime)); | 344 logEvent('apps.layout: ' + (Date.now() - startTime)); |
345 | 345 |
346 document.documentElement.classList.remove('starting-up'); | 346 document.documentElement.classList.remove('starting-up'); |
| 347 |
| 348 cr.dispatchSimpleEvent(document, 'sectionready', true, true); |
347 }, | 349 }, |
348 | 350 |
349 /** | 351 /** |
350 * Called by chrome when a new app has been added to chrome or has been | 352 * Called by chrome when a new app has been added to chrome or has been |
351 * enabled if previously disabled. | 353 * enabled if previously disabled. |
352 * @param {Object} appData A data structure full of relevant information for | 354 * @param {Object} appData A data structure full of relevant information for |
353 * the app. | 355 * the app. |
354 */ | 356 */ |
355 appAdded: function(appData, opt_highlight) { | 357 appAdded: function(appData, opt_highlight) { |
356 if (appData.id == this.highlightAppId) { | 358 if (appData.id == this.highlightAppId) { |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
647 if (page.navigationDot) | 649 if (page.navigationDot) |
648 page.navigationDot.remove(opt_animate); | 650 page.navigationDot.remove(opt_animate); |
649 this.cardSlider.removeCard(page); | 651 this.cardSlider.removeCard(page); |
650 }, | 652 }, |
651 }; | 653 }; |
652 | 654 |
653 return { | 655 return { |
654 PageListView: PageListView | 656 PageListView: PageListView |
655 }; | 657 }; |
656 }); | 658 }); |
OLD | NEW |