| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/android/shortcut_info.h" | 5 #include "chrome/browser/android/shortcut_info.h" |
| 6 | 6 |
| 7 ShortcutInfo::ShortcutInfo(const GURL& shortcut_url) | 7 ShortcutInfo::ShortcutInfo(const GURL& shortcut_url) |
| 8 : url(shortcut_url), | 8 : url(shortcut_url), |
| 9 display(blink::WebDisplayModeBrowser), | 9 display(blink::WebDisplayModeBrowser), |
| 10 orientation(blink::WebScreenOrientationLockDefault), | 10 orientation(blink::WebScreenOrientationLockDefault), |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 orientation = manifest.orientation; | 56 orientation = manifest.orientation; |
| 57 } | 57 } |
| 58 | 58 |
| 59 // Set the theme color based on the manifest value, if any. | 59 // Set the theme color based on the manifest value, if any. |
| 60 if (manifest.theme_color != content::Manifest::kInvalidOrMissingColor) | 60 if (manifest.theme_color != content::Manifest::kInvalidOrMissingColor) |
| 61 theme_color = manifest.theme_color; | 61 theme_color = manifest.theme_color; |
| 62 | 62 |
| 63 // Set the background color based on the manifest value, if any. | 63 // Set the background color based on the manifest value, if any. |
| 64 if (manifest.background_color != content::Manifest::kInvalidOrMissingColor) | 64 if (manifest.background_color != content::Manifest::kInvalidOrMissingColor) |
| 65 background_color = manifest.background_color; | 65 background_color = manifest.background_color; |
| 66 |
| 67 // Set the icon urls based on the icons in the manifest, if any. |
| 68 icon_urls.clear(); |
| 69 for (const content::Manifest::Icon& icon : manifest.icons) |
| 70 icon_urls.push_back(icon.src.spec()); |
| 66 } | 71 } |
| 67 | 72 |
| 68 void ShortcutInfo::UpdateSource(const Source new_source) { | 73 void ShortcutInfo::UpdateSource(const Source new_source) { |
| 69 source = new_source; | 74 source = new_source; |
| 70 } | 75 } |
| OLD | NEW |