Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(646)

Unified Diff: chrome/browser/resources/new_new_tab.html

Issue 6183005: Merge 69758 - Do not show apps section until default apps are installed.... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/default_apps.h ('k') | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/new_new_tab.html
===================================================================
--- chrome/browser/resources/new_new_tab.html (revision 71005)
+++ chrome/browser/resources/new_new_tab.html (working copy)
@@ -151,7 +151,7 @@
<div class="maxiview" id="most-visited-maxiview"></div>
<div class="sections">
- <!-- Start disabled. We only enable if we have at least one app. -->
+ <!-- Start disabled. We only enable once we have installed default apps. -->
<div id="apps" class="section disabled" section="APPS">
<h2>
<img class="disclosure" img src="ntp/ntp_disclosure_triangle.png">
@@ -319,6 +319,20 @@
setSectionVisible(
'recently-closed', undefined,
recentlyClosedInitiallyVisible, MINIMIZED_RECENT);
+
+ // This is insane, but we use the CSS class 'disabled' for both 'minimized'
+ // sections and sections that are actually disabled, as in not accessible in
+ // any way.
+ //
+ // The above code syncs up the DOM and shownSection wrt minimized. But we
+ // don't know until we receive the apps data whether the apps section will be
+ // disabled or not. So we need to add the 'disabled' class back to the apps
+ // section here. We remove it later, once we know for sure we want it to be
+ // enabled.
+ //
+ // See also: crbug.com/67273.
+ $('apps').classList.add('disabled');
+
layoutSections();
</script>
</html>
« no previous file with comments | « chrome/browser/extensions/default_apps.h ('k') | chrome/browser/resources/ntp/apps.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698