Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Unified Diff: chrome/browser/android/shortcut_info.cc

Issue 1234653004: webapps: utilize manifest theme colors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing include Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/android/shortcut_info.h ('k') | content/browser/manifest/manifest_manager_host.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_info.cc
diff --git a/chrome/browser/android/shortcut_info.cc b/chrome/browser/android/shortcut_info.cc
index f1da10a3c96b040df9bcb95d144b54acd05b3d40..e0947ef87aad4bc20d235d0b20b4e8385e640e16 100644
--- a/chrome/browser/android/shortcut_info.cc
+++ b/chrome/browser/android/shortcut_info.cc
@@ -7,14 +7,16 @@
ShortcutInfo::ShortcutInfo()
: display(content::Manifest::DISPLAY_MODE_BROWSER),
orientation(blink::WebScreenOrientationLockDefault),
- source(SOURCE_ADD_TO_HOMESCREEN) {
+ source(SOURCE_ADD_TO_HOMESCREEN),
+ theme_color(content::Manifest::kInvalidOrMissingThemeColor) {
}
ShortcutInfo::ShortcutInfo(const GURL& shortcut_url)
: url(shortcut_url),
display(content::Manifest::DISPLAY_MODE_BROWSER),
orientation(blink::WebScreenOrientationLockDefault),
- source(SOURCE_ADD_TO_HOMESCREEN) {
+ source(SOURCE_ADD_TO_HOMESCREEN),
+ theme_color(content::Manifest::kInvalidOrMissingThemeColor) {
}
ShortcutInfo::~ShortcutInfo() {
@@ -56,6 +58,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.
+ if (manifest.theme_color != content::Manifest::kInvalidOrMissingThemeColor)
+ theme_color = manifest.theme_color;
}
void ShortcutInfo::UpdateSource(const Source new_source) {
« no previous file with comments | « chrome/browser/android/shortcut_info.h ('k') | content/browser/manifest/manifest_manager_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698