summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 08:11:30 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 08:11:30 +0000
commit11a2da1a77c397d687ec142b8fe2103efa45d3f0 (patch)
treed2649fb4d02addb6c6f430fd4c76b955851e5957
parent4171f4a814ba9f7f3534f0c8554fe9e2ccaf66ec (diff)
downloadchromium_src-11a2da1a77c397d687ec142b8fe2103efa45d3f0.zip
chromium_src-11a2da1a77c397d687ec142b8fe2103efa45d3f0.tar.gz
chromium_src-11a2da1a77c397d687ec142b8fe2103efa45d3f0.tar.bz2
Reland r57473
TBR=eroman@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57492 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/app/generated_resources.grd5
-rw-r--r--chrome/app/theme/ntp_header_background.pngbin0 -> 129 bytes
-rw-r--r--chrome/app/theme/ntp_header_background_active.pngbin0 -> 784 bytes
-rw-r--r--chrome/app/theme/ntp_header_background_hover.pngbin0 -> 129 bytes
-rw-r--r--chrome/app/theme/theme_resources.grd3
-rw-r--r--chrome/browser/dom_ui/new_tab_ui.h2
-rw-r--r--chrome/browser/dom_ui/ntp_resource_cache.cc19
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.cc17
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler.h3
-rw-r--r--chrome/browser/dom_ui/shown_sections_handler_unittest.cc24
-rw-r--r--chrome/browser/resources/new_new_tab.css81
-rw-r--r--chrome/browser/resources/new_new_tab.html33
-rw-r--r--chrome/browser/resources/new_new_tab.js16
-rw-r--r--chrome/browser/resources/new_tab_theme.css33
-rw-r--r--chrome/browser/resources/ntp/apps.css3
-rw-r--r--chrome/browser/resources/ntp/apps.js20
-rw-r--r--chrome/browser/resources/ntp/ntp_disclosure_triangle.pngbin0 -> 195 bytes
-rw-r--r--chrome/browser/themes/browser_theme_provider.cc5
-rw-r--r--chrome/browser/themes/browser_theme_provider.h2
19 files changed, 106 insertions, 160 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index c2abbdb..bf3411a 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6434,8 +6434,11 @@ Keep your key file in a safe place. You will need it to create new versions of y
</message>
<!-- New Tab -->
+ <message name="IDS_NEW_TAB_APPS" desc="The 'Apps' heading on the new tab page">
+ Apps
+ </message>
<message name="IDS_NEW_TAB_TITLE"
- desc="Title of the new tab page, this is only shown while loading, then the title comes from the page">
+ desc="Title of the new tab page, this is only shown while loading, then the title comes from the page">
New Tab
</message>
<message name="IDS_NEW_TAB_MOST_VISITED"
diff --git a/chrome/app/theme/ntp_header_background.png b/chrome/app/theme/ntp_header_background.png
new file mode 100644
index 0000000..2041dff
--- /dev/null
+++ b/chrome/app/theme/ntp_header_background.png
Binary files differ
diff --git a/chrome/app/theme/ntp_header_background_active.png b/chrome/app/theme/ntp_header_background_active.png
new file mode 100644
index 0000000..71dc70d
--- /dev/null
+++ b/chrome/app/theme/ntp_header_background_active.png
Binary files differ
diff --git a/chrome/app/theme/ntp_header_background_hover.png b/chrome/app/theme/ntp_header_background_hover.png
new file mode 100644
index 0000000..5a4dfe4
--- /dev/null
+++ b/chrome/app/theme/ntp_header_background_hover.png
Binary files differ
diff --git a/chrome/app/theme/theme_resources.grd b/chrome/app/theme/theme_resources.grd
index 51f1f26..7291344 100644
--- a/chrome/app/theme/theme_resources.grd
+++ b/chrome/app/theme/theme_resources.grd
@@ -214,6 +214,9 @@
<include name="IDR_NEWTAB_OPTION" file="ntp_option.png" type="BINDATA" />
<include name="IDR_NEWTAB_OPTION_H" file="ntp_option_h.png" type="BINDATA" />
<include name="IDR_NEWTAB_OPTION_P" file="ntp_option_p.png" type="BINDATA" />
+ <include name="IDR_NEWTAB_SECTION_HEADER_BACKGROUND" file="ntp_header_background.png" type="BINDATA" />
+ <include name="IDR_NEWTAB_SECTION_HEADER_BACKGROUND_H" file="ntp_header_background_hover.png" type="BINDATA" />
+ <include name="IDR_NEWTAB_SECTION_HEADER_BACKGROUND_A" file="ntp_header_background_active.png" type="BINDATA" />
<include name="IDR_NEWTAB_THEMES_GALLERY_FAVICON" file="ntp_themes_gallery_favicon.png" type="BINDATA" />
<include name="IDR_NEWTAB_THEMES_GALLERY_THUMBNAIL" file="ntp_themes_gallery_thumb.png" type="BINDATA" />
<include name="IDR_OMNIBOX_EV_BUBBLE_BACKGROUND_C" file="ev_bubble_c.png" type="BINDATA" />
diff --git a/chrome/browser/dom_ui/new_tab_ui.h b/chrome/browser/dom_ui/new_tab_ui.h
index e091fcf..35e2a87 100644
--- a/chrome/browser/dom_ui/new_tab_ui.h
+++ b/chrome/browser/dom_ui/new_tab_ui.h
@@ -96,7 +96,7 @@ class NewTabUI : public DOMUI,
NotificationRegistrar registrar_;
// The preference version. This used for migrating prefs of the NTP.
- static const int current_pref_version_ = 2;
+ static const int current_pref_version_ = 3;
DISALLOW_COPY_AND_ASSIGN(NewTabUI);
};
diff --git a/chrome/browser/dom_ui/ntp_resource_cache.cc b/chrome/browser/dom_ui/ntp_resource_cache.cc
index e92ad6c..05868b7 100644
--- a/chrome/browser/dom_ui/ntp_resource_cache.cc
+++ b/chrome/browser/dom_ui/ntp_resource_cache.cc
@@ -224,6 +224,7 @@ void NTPResourceCache::CreateNewTabIncognitoHTML() {
void NTPResourceCache::CreateNewTabHTML() {
// Show the profile name in the title and most visited labels if the current
// profile is not the default.
+ string16 apps = l10n_util::GetStringUTF16(IDS_NEW_TAB_APPS);
string16 title = l10n_util::GetStringUTF16(IDS_NEW_TAB_TITLE);
string16 most_visited = l10n_util::GetStringUTF16(IDS_NEW_TAB_MOST_VISITED);
DictionaryValue localized_strings;
@@ -233,6 +234,7 @@ void NTPResourceCache::CreateNewTabHTML() {
localized_strings.SetString("hasattribution",
profile_->GetThemeProvider()->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION) ?
"true" : "false");
+ localized_strings.SetString("apps", apps);
localized_strings.SetString("title", title);
localized_strings.SetString("mostvisited", most_visited);
localized_strings.SetString("restorethumbnails",
@@ -396,6 +398,10 @@ void NTPResourceCache::CreateNewTabCSS() {
tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_LINK);
SkColor color_section_link_underline =
tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_LINK_UNDERLINE);
+ SkColor color_section_header_text =
+ tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_HEADER_TEXT);
+ SkColor color_section_header_text_hover =
+ tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_HEADER_TEXT_HOVER);
SkColor color_header =
tp->GetColor(BrowserThemeProvider::COLOR_NTP_HEADER);
@@ -443,6 +449,9 @@ void NTPResourceCache::CreateNewTabCSS() {
tp->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION) ? "block" : "none"); // $$5
subst2.push_back(SkColorToRGBAString(color_link_underline)); // $$6
subst2.push_back(SkColorToRGBAString(color_section_link_underline)); // $$7
+ subst2.push_back(SkColorToRGBAString(color_section_header_text)); // $$8
+ subst2.push_back(SkColorToRGBAString(
+ color_section_header_text_hover)); // $$9
// Get our template.
static const base::StringPiece new_tab_theme_css(
@@ -450,12 +459,12 @@ void NTPResourceCache::CreateNewTabCSS() {
IDR_NEW_TAB_THEME_CSS));
// Create the string from our template and the replacements.
- const std::string css_string = ReplaceStringPlaceholders(
- new_tab_theme_css, subst, NULL);
- std::string full_css = ReplaceStringPlaceholders(css_string, subst2, NULL);
+ std::string css_string;
+ css_string = ReplaceStringPlaceholders(new_tab_theme_css, subst, NULL);
+ css_string = ReplaceStringPlaceholders(css_string, subst2, NULL);
new_tab_css_ = new RefCountedBytes;
- new_tab_css_->data.resize(full_css.size());
- std::copy(full_css.begin(), full_css.end(),
+ new_tab_css_->data.resize(css_string.size());
+ std::copy(css_string.begin(), css_string.end(),
new_tab_css_->data.begin());
}
diff --git a/chrome/browser/dom_ui/shown_sections_handler.cc b/chrome/browser/dom_ui/shown_sections_handler.cc
index 2bb3d82..c46724d 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler.cc
@@ -89,7 +89,7 @@ void ShownSectionsHandler::HandleSetShownSections(const ListValue* args) {
// static
void ShownSectionsHandler::RegisterUserPrefs(PrefService* pref_service) {
pref_service->RegisterIntegerPref(prefs::kNTPShownSections,
- THUMB | RECENT | TIPS | SYNC);
+ THUMB | RECENT | TIPS | SYNC | APPS);
}
// static
@@ -99,17 +99,10 @@ void ShownSectionsHandler::MigrateUserPrefs(PrefService* pref_service,
bool changed = false;
int shown_sections = pref_service->GetInteger(prefs::kNTPShownSections);
- if (old_pref_version < 1) {
- // TIPS was used in early builds of the NNTP but since it was removed before
- // Chrome 3.0 we want to ensure that it is shown by default.
- shown_sections |= TIPS | SYNC;
- changed = true;
- }
-
- if (old_pref_version < 2) {
- // LIST is no longer used. Change to THUMB.
- shown_sections &= ~LIST;
- shown_sections |= THUMB;
+ if (old_pref_version < 3) {
+ // At version 3, we added apps. To bring attention to the feature, we start
+ // it off as the only expanded section.
+ shown_sections = APPS;
changed = true;
}
diff --git a/chrome/browser/dom_ui/shown_sections_handler.h b/chrome/browser/dom_ui/shown_sections_handler.h
index afe1e26..e097c71 100644
--- a/chrome/browser/dom_ui/shown_sections_handler.h
+++ b/chrome/browser/dom_ui/shown_sections_handler.h
@@ -20,7 +20,8 @@ enum Section {
RECENT = 4,
TIPS = 8,
SYNC = 16,
- DEBUG = 32
+ DEBUG = 32,
+ APPS = 64
};
class ShownSectionsHandler : public DOMMessageHandler,
diff --git a/chrome/browser/dom_ui/shown_sections_handler_unittest.cc b/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
index 48ca9a1..2f9e59b 100644
--- a/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
+++ b/chrome/browser/dom_ui/shown_sections_handler_unittest.cc
@@ -22,28 +22,8 @@ TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs) {
pref->RegisterIntegerPref(prefs::kNTPShownSections, 0);
pref->SetInteger(prefs::kNTPShownSections, THUMB);
- ShownSectionsHandler::MigrateUserPrefs(pref.get(), 0, 1);
+ ShownSectionsHandler::MigrateUserPrefs(pref.get(), 0, 3);
int shown_sections = pref->GetInteger(prefs::kNTPShownSections);
-
- EXPECT_TRUE(shown_sections & THUMB);
- EXPECT_FALSE(shown_sections & LIST);
- EXPECT_FALSE(shown_sections & RECENT);
- EXPECT_TRUE(shown_sections & TIPS);
- EXPECT_TRUE(shown_sections & SYNC);
-}
-
-TEST_F(ShownSectionsHandlerTest, MigrateUserPrefs1To2) {
- scoped_ptr<PrefService> pref(new TestingPrefService);
-
- // Set an *old* value
- pref->RegisterIntegerPref(prefs::kNTPShownSections, 0);
- pref->SetInteger(prefs::kNTPShownSections, LIST);
-
- ShownSectionsHandler::MigrateUserPrefs(pref.get(), 1, 2);
-
- int shown_sections = pref->GetInteger(prefs::kNTPShownSections);
-
- EXPECT_TRUE(shown_sections & THUMB);
- EXPECT_FALSE(shown_sections & LIST);
+ EXPECT_EQ(APPS, shown_sections);
}
diff --git a/chrome/browser/resources/new_new_tab.css b/chrome/browser/resources/new_new_tab.css
index 80d991c..fe76ed2 100644
--- a/chrome/browser/resources/new_new_tab.css
+++ b/chrome/browser/resources/new_new_tab.css
@@ -18,10 +18,9 @@ html[mode=app-launcher] {
#main {
-webkit-box-sizing: border-box;
-webkit-transition: width .15s;
- background: url(chrome://theme/IDR_PRODUCT_LOGO) no-repeat 0 6px;
margin: 0 auto;
min-height: 100%;
- padding-bottom: 25px; /* Make room for the bottom positioned footer. */
+ padding:10px 0 20px;
position: relative;
width: 920px;
}
@@ -215,6 +214,10 @@ html[dir=rtl] .item {
max-width: none !important;
}
+#most-visited {
+ margin-bottom: 20px;
+}
+
.nav > a {
/* no icon */
padding: 0;
@@ -245,12 +248,6 @@ html[dir=rtl] .item {
margin: 0 10px;
}
-#top-bar {
- display: -webkit-box;
- -webkit-box-align: center;
- min-height: 56px;
-}
-
.notification.hidden {
opacity: 0;
pointer-events: none;
@@ -340,11 +337,6 @@ html[dir=rtl] #option-menu > [command=hide]:before {
font-family: inherit;
}
-#apps-section {
- padding: 10px 0px;
- border-top: 0;
-}
-
#apps-launch-control {
margin-top: 10px;
}
@@ -368,29 +360,37 @@ html[dir=rtl] #option-menu > [command=hide]:before {
display: none !important;
}
-.section + :not(.hidden) {
- border-top: 0;
-}
-
.section > div {
margin-bottom: 10px;
}
.section > h2 {
- display: inline-block;
- margin: 0;
- font-size: 100%;
+ background-position: 0 center;
+ background-repeat: no-repeat;
+ -webkit-background-size: 100% 26px;
cursor: pointer;
- margin-top: 10px;
- margin-bottom: 10px;
+ display: block;
+ font-family: Helvetica, Arial, sans-serif;
+ font-size: 16px;
+ font-weight: normal;
+ margin:10px 0;
+ -webkit-margin-collapse: separate;
}
-.section > h2:hover {
- text-decoration: underline;
+.section > h2 > img {
+ margin-left:-13px;
+ padding-right:4px;
+}
+
+.section:not(.hidden) > h2 > img {
+ -webkit-transform:rotate(90deg);
+}
+
+.section > h2 > span {
+ padding-right: 4px;
}
.section.hidden {
- display: inline;
border: 0;
}
@@ -398,10 +398,6 @@ html[dir=rtl] #option-menu > [command=hide]:before {
display: none !important;
}
-.section > h2 {
- margin-right: 5px;
-}
-
.section.hidden > h2 {
margin-right: 0px;
}
@@ -410,10 +406,6 @@ html[dir=rtl] #option-menu > [command=hide]:before {
border-right: 0;
}
-.section.hidden + .hidden > h2 {
- padding-left: 5px;
-}
-
.section:last-child {
border-bottom: 0;
}
@@ -422,10 +414,6 @@ html[dir=rtl] #option-menu > [command=hide]:before {
display: inline-block;
}
-#apps {
- margin-top: 10px;
-}
-
.section > * {
font-size: 12px;
}
@@ -454,22 +442,3 @@ html[dir=rtl] #option-menu > [command=hide]:before {
margin-right: 10px;
}
}
-
-#footer {
- bottom: 0;
- padding-bottom: 5px;
- position: absolute;
- text-align: end;
- width: 100%;
-}
-
-#footer hr {
- border: 0;
- display: inline;
- margin: 0;
- padding: 0;
-}
-
-#footer hr:after {
- content: "|";
-}
diff --git a/chrome/browser/resources/new_new_tab.html b/chrome/browser/resources/new_new_tab.html
index c8a01b5..0c04940 100644
--- a/chrome/browser/resources/new_new_tab.html
+++ b/chrome/browser/resources/new_new_tab.html
@@ -71,7 +71,8 @@ var Section = {
RECENT: 4,
// TIPS is no longer used
SYNC: 16,
- DEBUG: 32
+ DEBUG: 32,
+ APPS: 64
};
var shownSections = templateData['shown_sections'];
@@ -125,11 +126,6 @@ if ('mode' in hashParams) {
<div id="main">
- <div id=top-bar>
- <input type="button" id="option-button"
- i18n-values="title:pagedisplaytooltip">
- </div>
-
<menu id="option-menu">
<div command="hide" section="THUMB" i18n-content="mostvisited"></div>
<div command="hide" section="RECENT" i18n-content="recentlyclosed"></div>
@@ -144,20 +140,25 @@ if ('mode' in hashParams) {
</div>
<div class="sections">
- <div class="section disabled" id="apps-section"></div>
+ <div class="section" section="APPS" id="apps-section">
+ <h2><img src="ntp/ntp_disclosure_triangle.png"
+ ><span i18n-content="apps"></span></h2>
+ <div id="apps-section-content"></div>
+ </div>
<div id="most-visited-section" class="section" section="THUMB">
- <h2 i18n-content="mostvisited"></h2>
+ <h2><img src="ntp/ntp_disclosure_triangle.png"
+ ><span i18n-content="mostvisited"></span></h2>
<div id="most-visited"></div>
</div>
<div id="recently-closed" class="section" section="RECENT">
- <h2 i18n-content="recentlyclosed"></h2>
+ <h2><span i18n-content="recentlyclosed"></span></h2>
<span class="nav"></span>
</div>
<div id="debug" class="section disabled" section="DEBUG">
- <h2>Debug</h2>
+ <h2><span>Debug</span></h2>
<div id="apps-launch-control">
Open apps in:<label
><input type="radio" name="launch-container-type" value=""
@@ -175,6 +176,7 @@ if ('mode' in hashParams) {
<script>
updateSimpleSection('recently-closed', Section.RECENT);
updateSimpleSection('most-visited-section', Section.THUMB);
+ updateSimpleSection('apps-section', Section.APPS);
updateSimpleSection('debug', Section.DEBUG);
</script>
@@ -188,17 +190,6 @@ if ('mode' in hashParams) {
<img id="attribution-img">
</div>
- <div id="footer">
- <a href="chrome://history"><span class="link-color"
- i18n-content="history"></span></a>
- <hr>
- <a href="chrome://downloads"><span class="link-color"
- i18n-content="downloads"></span></a>
- <hr>
- <a i18n-values="href:helpurl"><span class="link-color"
- i18n-content="help"></span></a>
- </div>
-
</div> <!-- main -->
<div class="window-menu" id="window-tooltip"></div>
diff --git a/chrome/browser/resources/new_new_tab.js b/chrome/browser/resources/new_new_tab.js
index b9404a6..c0f32bf 100644
--- a/chrome/browser/resources/new_new_tab.js
+++ b/chrome/browser/resources/new_new_tab.js
@@ -587,6 +587,9 @@ OptionMenu.prototype = {
}
};
+// TODO(aa): The 'clear-all-blacklisted' feature needs to move into a menu in
+// the most visited section.
+/*
var optionMenu = new OptionMenu($('option-button'), $('option-menu'));
optionMenu.commands = {
'clear-all-blacklisted' : function() {
@@ -604,10 +607,16 @@ optionMenu.commands = {
saveShownSections();
}
};
+*/
$('main').addEventListener('click', function(e) {
- if (e.target.tagName == 'H2') {
- var p = e.target.parentNode;
+ var p = e.target;
+ while (p && p.tagName != 'H2') {
+ p = p.parentNode;
+ }
+
+ if (p) {
+ p = p.parentNode;
var section = p.getAttribute('section');
if (section) {
if (shownSections & Section[section])
@@ -806,7 +815,8 @@ function callGetSyncMessageIfSyncIsPresent() {
}
function hideAllMenus() {
- optionMenu.hide();
+ // TODO(aa): See comment in definition of optionMenu.
+ //optionMenu.hide();
}
window.addEventListener('blur', hideAllMenus);
diff --git a/chrome/browser/resources/new_tab_theme.css b/chrome/browser/resources/new_tab_theme.css
index 150d3be..7597812 100644
--- a/chrome/browser/resources/new_tab_theme.css
+++ b/chrome/browser/resources/new_tab_theme.css
@@ -16,10 +16,8 @@ body {
overflow: auto;
}
-#main {
- background: url(chrome://theme/IDR_PRODUCT_LOGO?$1) no-repeat 0 8px;
-}
-
+/* TODO(aa): Is this still in use? The styling may be incorrect with M7 NTP
+ rework. */
#notification.first-run {
background-color: $$1; /* COLOR_NTP_SECTION */
border-color: $$2; /* COLOR_NTP_SECTION_BORDER */
@@ -107,25 +105,22 @@ body {
color: $$6; /* COLOR_NTP_LINK_UNDERLINE */
}
-#top-bar {
- border-bottom: 1px solid $$2; /* COLOR_NTP_SECTION_BORDER */
+.section > h2 {
+ color: $$8; /* COLOR_NTP_SECTION_HEADER_TEXT */
+ background-image: url(chrome://theme/IDR_NEWTAB_SECTION_HEADER_BACKGROUND);
}
-.section {
- border-top: 1px solid $$2; /* COLOR_NTP_SECTION_BORDER */
- border-bottom: 1px solid $$2; /* COLOR_NTP_SECTION_BORDER */
+.section > h2:hover {
+ color: $$9;
+ background-image: url(chrome://theme/IDR_NEWTAB_SECTION_HEADER_BACKGROUND_H);
}
-.section.hidden + :not(.hidden) {
- border-top: 1px solid $$2; /* COLOR_NTP_SECTION_BORDER */;
+.section:not(.hidden) > h2 {
+ background-image: url(chrome://theme/IDR_NEWTAB_SECTION_HEADER_BACKGROUND_A);
}
-.section.hidden + .hidden > h2 {
- border-left: 1px solid $$2; /* COLOR_NTP_SECTION_BORDER */
-}
-
-.section > h2 {
- color: $8; /* COLOR_NTP_TEXT */
+.section > h2 > span {
+ background: $2; /* COLOR_NTP_BACKGROUND */
}
#apps-section a {
@@ -137,7 +132,3 @@ body {
color: $$3; /* COLOR_NTP_SECTION_TEXT */
background-color: $$1; /* COLOR_NTP_SECTION */;
}
-
-#footer hr {
- color: $$2; /* COLOR_NTP_SECTION_BORDER */
-}
diff --git a/chrome/browser/resources/ntp/apps.css b/chrome/browser/resources/ntp/apps.css
index 67c7b70..3acaedd 100644
--- a/chrome/browser/resources/ntp/apps.css
+++ b/chrome/browser/resources/ntp/apps.css
@@ -35,7 +35,8 @@
background: rgba(255, 255, 255, 0) /* transparent white */
no-repeat center 10px;
background-size: 96px 96px;
- font-weight: bold;
+ font-family: Helvetica, Arial;
+ font-size: 14px;
overflow: hidden;
padding: 111px 10px 10px; /* 10 + 96 + 5 */
text-align: center;
diff --git a/chrome/browser/resources/ntp/apps.js b/chrome/browser/resources/ntp/apps.js
index 41c2e6e..64b490f 100644
--- a/chrome/browser/resources/ntp/apps.js
+++ b/chrome/browser/resources/ntp/apps.js
@@ -5,26 +5,14 @@
function getAppsCallback(data) {
logEvent('recieved apps');
var appsSection = $('apps-section');
- var debugSection = $('debug');
- appsSection.textContent = '';
+ var appsSectionContent = $('apps-section-content');
+ appsSectionContent.textContent = '';
data.apps.forEach(function(app) {
- appsSection.appendChild(apps.createElement(app));
+ appsSectionContent.appendChild(apps.createElement(app));
});
- // TODO(aa): Figure out what to do with the debug mode when we turn apps on
- // for everyone.
- if (appsSection.hasChildNodes()) {
- appsSection.classList.remove('disabled');
- if (data.showDebugLink) {
- debugSection.classList.remove('disabled');
- }
-
- appsSection.appendChild(apps.createWebStoreElement());
- } else {
- appsSection.classList.add('disabled');
- debugSection.classList.add('disabled');
- }
+ appsSectionContent.appendChild(apps.createWebStoreElement());
}
var apps = {
diff --git a/chrome/browser/resources/ntp/ntp_disclosure_triangle.png b/chrome/browser/resources/ntp/ntp_disclosure_triangle.png
new file mode 100644
index 0000000..6f5c016
--- /dev/null
+++ b/chrome/browser/resources/ntp/ntp_disclosure_triangle.png
Binary files differ
diff --git a/chrome/browser/themes/browser_theme_provider.cc b/chrome/browser/themes/browser_theme_provider.cc
index 74bddfa..55a1c17 100644
--- a/chrome/browser/themes/browser_theme_provider.cc
+++ b/chrome/browser/themes/browser_theme_provider.cc
@@ -79,6 +79,7 @@ const SkColor kDefaultColorNTPHeader = SkColorSetRGB(75, 140, 220);
const SkColor kDefaultColorNTPSection = SkColorSetRGB(229, 239, 254);
const SkColor kDefaultColorNTPSectionText = SK_ColorBLACK;
const SkColor kDefaultColorNTPSectionLink = SkColorSetRGB(6, 55, 116);
+const SkColor kDefaultColorNTPSectionHeaderText = SkColorSetRGB(76, 76, 76);
const SkColor kDefaultColorControlBackground = SkColorSetARGB(0, 0, 0, 0);
const SkColor kDefaultColorButtonBackground = SkColorSetARGB(0, 0, 0, 0);
#if defined(OS_MACOSX)
@@ -444,6 +445,10 @@ SkColor BrowserThemeProvider::GetDefaultColor(int id) {
return kDefaultColorNTPSectionLink;
case COLOR_NTP_SECTION_LINK_UNDERLINE:
return TintForUnderline(kDefaultColorNTPSectionLink);
+ case COLOR_NTP_SECTION_HEADER_TEXT:
+ return kDefaultColorNTPSectionHeaderText;
+ case COLOR_NTP_SECTION_HEADER_TEXT_HOVER:
+ return kDefaultColorNTPText;
case COLOR_CONTROL_BACKGROUND:
return kDefaultColorControlBackground;
case COLOR_BUTTON_BACKGROUND:
diff --git a/chrome/browser/themes/browser_theme_provider.h b/chrome/browser/themes/browser_theme_provider.h
index 565047e..32734cc 100644
--- a/chrome/browser/themes/browser_theme_provider.h
+++ b/chrome/browser/themes/browser_theme_provider.h
@@ -72,6 +72,8 @@ class BrowserThemeProvider : public NonThreadSafe,
COLOR_NTP_LINK_UNDERLINE,
COLOR_NTP_HEADER,
COLOR_NTP_SECTION,
+ COLOR_NTP_SECTION_HEADER_TEXT,
+ COLOR_NTP_SECTION_HEADER_TEXT_HOVER,
COLOR_NTP_SECTION_TEXT,
COLOR_NTP_SECTION_LINK,
COLOR_NTP_SECTION_LINK_UNDERLINE,