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

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

Issue 1958523002: Make WebAPK naming consistent 1/2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 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 scope(shortcut_url.GetOrigin()), 9 scope(shortcut_url.GetOrigin()),
10 display(blink::WebDisplayModeBrowser), 10 display(blink::WebDisplayModeBrowser),
11 orientation(blink::WebScreenOrientationLockDefault), 11 orientation(blink::WebScreenOrientationLockDefault),
12 source(SOURCE_ADD_TO_HOMESCREEN), 12 source(SOURCE_ADD_TO_HOMESCREEN),
13 theme_color(content::Manifest::kInvalidOrMissingColor), 13 theme_color(content::Manifest::kInvalidOrMissingColor),
14 background_color(content::Manifest::kInvalidOrMissingColor), 14 background_color(content::Manifest::kInvalidOrMissingColor),
15 is_icon_generated(false), 15 is_icon_generated(false),
16 is_web_apk(false) { 16 is_webapk(false) {
17 } 17 }
18 18
19 ShortcutInfo::ShortcutInfo(const ShortcutInfo& other) = default; 19 ShortcutInfo::ShortcutInfo(const ShortcutInfo& other) = default;
20 20
21 ShortcutInfo::~ShortcutInfo() { 21 ShortcutInfo::~ShortcutInfo() {
22 } 22 }
23 23
24 void ShortcutInfo::UpdateFromManifest(const content::Manifest& manifest) { 24 void ShortcutInfo::UpdateFromManifest(const content::Manifest& manifest) {
25 if (!manifest.short_name.is_null()) 25 if (!manifest.short_name.is_null())
26 short_name = manifest.short_name.string(); 26 short_name = manifest.short_name.string();
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 theme_color = manifest.theme_color; 67 theme_color = manifest.theme_color;
68 68
69 // Set the background color based on the manifest value, if any. 69 // Set the background color based on the manifest value, if any.
70 if (manifest.background_color != content::Manifest::kInvalidOrMissingColor) 70 if (manifest.background_color != content::Manifest::kInvalidOrMissingColor)
71 background_color = manifest.background_color; 71 background_color = manifest.background_color;
72 } 72 }
73 73
74 void ShortcutInfo::UpdateSource(const Source new_source) { 74 void ShortcutInfo::UpdateSource(const Source new_source) {
75 source = new_source; 75 source = new_source;
76 } 76 }
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_info.h ('k') | chrome/browser/android/webapps/add_to_homescreen_data_fetcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698