diff options
author | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-20 23:00:05 +0000 |
---|---|---|
committer | kuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-03-20 23:00:05 +0000 |
commit | 5189fa10b6361b23f9a1ce0d68f66ac46ad5f544 (patch) | |
tree | f19f37a5b949a00ad6e1bb24d977ae92b48baf54 /chrome/renderer | |
parent | 379ce3eaf5e9623cb73e6ef074208d6d0f7e890b (diff) | |
download | chromium_src-5189fa10b6361b23f9a1ce0d68f66ac46ad5f544.zip chromium_src-5189fa10b6361b23f9a1ce0d68f66ac46ad5f544.tar.gz chromium_src-5189fa10b6361b23f9a1ce0d68f66ac46ad5f544.tar.bz2 |
alternate ntp: add attribution url to ThemeBackgroundInfo
BUG=221961
TEST=verify per bug rpt
Review URL: https://chromiumcodereview.appspot.com/12892006
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@189446 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer')
-rw-r--r-- | chrome/renderer/searchbox/searchbox_extension.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/chrome/renderer/searchbox/searchbox_extension.cc b/chrome/renderer/searchbox/searchbox_extension.cc index bed2567..7606a19 100644 --- a/chrome/renderer/searchbox/searchbox_extension.cc +++ b/chrome/renderer/searchbox/searchbox_extension.cc @@ -40,6 +40,9 @@ const char kCSSBackgroundRepeatX[] = "repeat-x"; const char kCSSBackgroundRepeatY[] = "repeat-y"; const char kCSSBackgroundRepeat[] = "repeat"; +const char kThemeAttributionUrl[] = + "chrome-search://theme/IDR_THEME_NTP_ATTRIBUTION"; + const char kLTRHtmlTextDirection[] = "ltr"; const char kRTLHtmlTextDirection[] = "rtl"; @@ -709,6 +712,12 @@ v8::Handle<v8::Value> SearchBoxExtensionWrapper::GetThemeBackgroundInfo( // The theme background image height is only valid if |imageUrl| is valid. info->Set(v8::String::New("imageHeight"), v8::Int32::New(theme_info.image_height)); + + // The attribution URL is only valid if the theme has attribution logo. + if (theme_info.has_attribution) { + info->Set(v8::String::New("attributionUrl"), + UTF8ToV8String(kThemeAttributionUrl)); + } } return info; |