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

Side by Side Diff: chrome/browser/android/shortcut_info.cc

Issue 2453423002: Send all of the icon URLs listed in Web Manifest to WebAPK Server. (Closed)
Patch Set: Created 4 years, 1 month 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 unified diff | Download patch
OLDNEW
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
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 on the manifest, if any.
pkotwicz 2016/11/01 00:29:49 Nit: "on the manifest" -> "in the manifest"
Xi Han 2016/11/07 16:51:43 Done.
68 icon_urls.clear();
69 for (const auto& icon : manifest.icons)
pkotwicz 2016/11/01 00:29:49 Nit: "const auto& icon" -> "const Icon& icon"
Xi Han 2016/11/07 16:51:43 content::Manifest::Icon, personally I would prefer
pkotwicz 2016/11/11 21:04:18 This is the official guideline for using auto: htt
Xi Han 2016/11/14 19:36:09 Done.
70 icon_urls.push_back(icon.src);
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698