diff options
author | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 21:35:30 +0000 |
---|---|---|
committer | glen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-05 21:35:30 +0000 |
commit | 99deea6d3b0cf9c93351f247c5b62d3c8dea47da (patch) | |
tree | 7ecc4902afb5f5466558ef68d9915fb607fb2e7f /chrome/browser/dom_ui | |
parent | 190be391c2c420310d95eda78b5fce0e00d069bf (diff) | |
download | chromium_src-99deea6d3b0cf9c93351f247c5b62d3c8dea47da.zip chromium_src-99deea6d3b0cf9c93351f247c5b62d3c8dea47da.tar.gz chromium_src-99deea6d3b0cf9c93351f247c5b62d3c8dea47da.tar.bz2 |
More theme bits for the NTP and window frame.
BUG=12768,13352
TEST=Verify that a theme with attribution works on the NTP and a theme with an overlay shows up
Review URL: http://codereview.chromium.org/119227
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17773 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui')
-rw-r--r-- | chrome/browser/dom_ui/dom_ui_theme_source.cc | 7 | ||||
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chrome/browser/dom_ui/dom_ui_theme_source.cc b/chrome/browser/dom_ui/dom_ui_theme_source.cc index 41b3124..edf9e07 100644 --- a/chrome/browser/dom_ui/dom_ui_theme_source.cc +++ b/chrome/browser/dom_ui/dom_ui_theme_source.cc @@ -95,6 +95,10 @@ void DOMUIThemeSource::SendNewTabCSS(int request_id) { SkColor color_link = tp->GetColor(BrowserThemeProvider::COLOR_NTP_LINK); SkColor color_section = tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION); + SkColor color_section_text = + tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_TEXT); + SkColor color_section_link = + tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_LINK); // Generate the replacements. std::vector<string16> subst; @@ -110,6 +114,8 @@ void DOMUIThemeSource::SendNewTabCSS(int request_id) { subst.push_back(SkColorToRGBAString(color_text)); subst.push_back(SkColorToRGBAString(color_link)); subst.push_back(SkColorToRGBAString(color_section)); + subst.push_back(SkColorToRGBAString(color_section_text)); + subst.push_back(SkColorToRGBAString(color_section_link)); // Get our template. static const StringPiece new_tab_theme_css( @@ -169,4 +175,3 @@ std::string DOMUIThemeSource::GetNewTabBackgroundCSS(bool bar_attached) { } return BrowserThemeProvider::AlignmentToString(alignment); } - diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 24a9153..54731a2 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -252,6 +252,9 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path, localized_strings.SetString(L"bookmarkbarattached", profile_->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar) ? "true" : "false"); + localized_strings.SetString(L"hasattribution", + profile_->GetThemeProvider()->HasCustomImage(IDR_THEME_NTP_ATTRIBUTION) ? + "true" : "false"); localized_strings.SetString(L"title", title); localized_strings.SetString(L"mostvisited", most_visited); localized_strings.SetString(L"searches", @@ -285,6 +288,8 @@ void NewTabHTMLSource::StartDataRequest(const std::string& path, l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_SINGLE)); localized_strings.SetString(L"closedwindowmultiple", l10n_util::GetString(IDS_NEW_TAB_RECENTLY_CLOSED_WINDOW_MULTIPLE)); + localized_strings.SetString(L"attributionintro", + l10n_util::GetString(IDS_NEW_TAB_ATTRIBUTION_INTRO)); SetFontAndTextDirection(&localized_strings); @@ -714,7 +719,7 @@ void MostVisitedHandler::OnSegmentUsageAvailable( std::string pinned_url; std::string pinned_title; - if (MostVisitedHandler::GetPinnedURLAtIndex(j, &pinned_url, + if (MostVisitedHandler::GetPinnedURLAtIndex(j, &pinned_url, &pinned_title)) { url = GURL(pinned_url); title = UTF8ToUTF16(pinned_title); |