Chromium Code Reviews| Index: chrome/browser/android/shortcut_info.cc |
| diff --git a/chrome/browser/android/shortcut_info.cc b/chrome/browser/android/shortcut_info.cc |
| index 67e0c5549c344667fdc39db4fc854bd8da65ea7d..ca896cc34fb86de1d72cf699f3a81c852805fd4f 100644 |
| --- a/chrome/browser/android/shortcut_info.cc |
| +++ b/chrome/browser/android/shortcut_info.cc |
| @@ -7,6 +7,7 @@ |
| ShortcutInfo::ShortcutInfo() |
| : display(content::Manifest::DISPLAY_MODE_BROWSER), |
| orientation(blink::WebScreenOrientationLockDefault), |
| + theme_color(content::Manifest::kInvalidOrMissingThemeColor), |
| source(SOURCE_ADD_TO_HOMESCREEN) { |
| } |
| @@ -14,6 +15,7 @@ ShortcutInfo::ShortcutInfo(const GURL& shortcut_url) |
| : url(shortcut_url), |
| display(content::Manifest::DISPLAY_MODE_BROWSER), |
| orientation(blink::WebScreenOrientationLockDefault), |
| + theme_color(content::Manifest::kInvalidOrMissingThemeColor), |
|
mlamouri (slow - plz ping)
2015/07/20 13:29:45
I think you can try to use a C++11 new feature: de
Lalit Maganti
2015/07/20 13:56:13
Done.
Bernhard Bauer
2015/07/20 17:11:35
Is it?
Lalit Maganti
2015/07/20 17:17:04
I did try it but since Android uses GCC and not Cl
Bernhard Bauer
2015/08/11 09:40:47
:(
OTOH, the style guide actually does allow defa
|
| source(SOURCE_ADD_TO_HOMESCREEN) { |
| } |
| @@ -46,6 +48,10 @@ void ShortcutInfo::UpdateFromManifest(const content::Manifest& manifest) { |
| if (display == content::Manifest::DISPLAY_MODE_STANDALONE) |
| orientation = manifest.orientation; |
| } |
| + |
| + // Set the theme color based on the manifest value, if any |
|
mlamouri (slow - plz ping)
2015/07/20 13:29:45
nit: finish the sentence with a period.
Lalit Maganti
2015/07/20 13:56:13
Done.
|
| + if (manifest.theme_color != content::Manifest::kInvalidOrMissingThemeColor) |
| + theme_color = manifest.theme_color; |
| } |
| void ShortcutInfo::UpdateSource(const Source new_source) { |