summaryrefslogtreecommitdiffstats
path: root/chrome/common
diff options
context:
space:
mode:
authorglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 07:33:56 +0000
committerglen@chromium.org <glen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-24 07:33:56 +0000
commitece6966482dc410c602f2c7086d71cf261305530 (patch)
tree05009343e4ad2decf50ee44bdc0ff1c8c547234c /chrome/common
parentca5c4e5bd40a8f2f59c53f5a29bcde2591633ee8 (diff)
downloadchromium_src-ece6966482dc410c602f2c7086d71cf261305530.zip
chromium_src-ece6966482dc410c602f2c7086d71cf261305530.tar.gz
chromium_src-ece6966482dc410c602f2c7086d71cf261305530.tar.bz2
Let theme values that previous had to be real be specified as ints.
Also bonus update to background_tab_text naming. BUG=16892 TEST=Create and install a theme with integer values for ntp_section opacity or tint values. Review URL: http://codereview.chromium.org/160093 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21519 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common')
-rw-r--r--chrome/common/extensions/extension.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/common/extensions/extension.cc b/chrome/common/extensions/extension.cc
index fc13d3a..b0324d6 100644
--- a/chrome/common/extensions/extension.cc
+++ b/chrome/common/extensions/extension.cc
@@ -637,7 +637,9 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_id,
color_list->GetInteger(2, &color)) {
if (color_list->GetSize() == 4) {
double alpha;
- if (color_list->GetReal(3, &alpha)) {
+ int alpha_int;
+ if (color_list->GetReal(3, &alpha) ||
+ color_list->GetInteger(3, &alpha_int)) {
++iter;
continue;
}
@@ -662,12 +664,13 @@ bool Extension::InitFromValue(const DictionaryValue& source, bool require_id,
DictionaryValue::key_iterator iter = tints_value->begin_keys();
while (iter != tints_value->end_keys()) {
ListValue* tint_list;
- double hue = 0;
+ double v = 0;
+ int vi = 0;
if (!tints_value->GetList(*iter, &tint_list) ||
tint_list->GetSize() != 3 ||
- !tint_list->GetReal(0, &hue) ||
- !tint_list->GetReal(1, &hue) ||
- !tint_list->GetReal(2, &hue)) {
+ !(tint_list->GetReal(0, &v) || tint_list->GetInteger(0, &vi)) ||
+ !(tint_list->GetReal(1, &v) || tint_list->GetInteger(1, &vi)) ||
+ !(tint_list->GetReal(2, &v) || tint_list->GetInteger(2, &vi))) {
*error = errors::kInvalidThemeTints;
return false;
}