diff options
author | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 22:25:34 +0000 |
---|---|---|
committer | aa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-09-03 22:25:34 +0000 |
commit | 76aa2f684a2cdbd8b476001230d4f1e244196a69 (patch) | |
tree | 1cf3b904d5cb4f7e3ecff3ca1ae0580746c35f4a /chrome/browser/dom_ui/new_tab_ui.cc | |
parent | 2a0fef6f8968901f60e6870731da2e3adf31aabd (diff) | |
download | chromium_src-76aa2f684a2cdbd8b476001230d4f1e244196a69.zip chromium_src-76aa2f684a2cdbd8b476001230d4f1e244196a69.tar.gz chromium_src-76aa2f684a2cdbd8b476001230d4f1e244196a69.tar.bz2 |
Bring back attribution. If there is no custom attribution, fall back to the product logo.
BUG=53970
TEST=
Review URL: http://codereview.chromium.org/3336004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@58555 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/new_tab_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/new_tab_ui.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/new_tab_ui.cc b/chrome/browser/dom_ui/new_tab_ui.cc index 1183a4e..887812c 100644 --- a/chrome/browser/dom_ui/new_tab_ui.cc +++ b/chrome/browser/dom_ui/new_tab_ui.cc @@ -27,6 +27,7 @@ #include "chrome/browser/dom_ui/ntp_resource_cache.h" #include "chrome/browser/dom_ui/shown_sections_handler.h" #include "chrome/browser/metrics/user_metrics.h" +#include "chrome/browser/themes/browser_theme_provider.h" #include "chrome/browser/prefs/pref_service.h" #include "chrome/browser/profile.h" #include "chrome/browser/renderer_host/render_view_host.h" @@ -40,6 +41,7 @@ #include "chrome/common/pref_names.h" #include "chrome/common/url_constants.h" #include "grit/generated_resources.h" +#include "grit/theme_resources.h" namespace { @@ -485,7 +487,12 @@ void NewTabUI::Observe(NotificationType type, const NotificationDetails& details) { if (NotificationType::BROWSER_THEME_CHANGED == type) { InitializeCSSCaches(); - CallJavascriptFunction(L"themeChanged"); + ListValue args; + args.Append(Value::CreateStringValue( + GetProfile()->GetThemeProvider()->HasCustomImage( + IDR_THEME_NTP_ATTRIBUTION) ? + "true" : "false")); + CallJavascriptFunction(L"themeChanged", args); } else if (NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED) { if (GetProfile()->GetPrefs()->GetBoolean(prefs::kShowBookmarkBar)) CallJavascriptFunction(L"bookmarkBarAttached"); |