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

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

Issue 2050933002: Upstream: Add additional checks before creating a WebAPK after clicking "Add to Homescreen" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'create_webapk_requirements_enum_class' into create_webapk_requirements2 Created 4 years, 5 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
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/android/shortcut_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
6 #define CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 6 #define CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
(...skipping 12 matching lines...) Expand all
23 enum Source { 23 enum Source {
24 SOURCE_UNKNOWN = 0, 24 SOURCE_UNKNOWN = 0,
25 SOURCE_ADD_TO_HOMESCREEN = 1, 25 SOURCE_ADD_TO_HOMESCREEN = 1,
26 SOURCE_APP_BANNER = 2, 26 SOURCE_APP_BANNER = 2,
27 SOURCE_BOOKMARK_NAVIGATOR_WIDGET = 3, 27 SOURCE_BOOKMARK_NAVIGATOR_WIDGET = 3,
28 SOURCE_BOOKMARK_SHORTCUT_WIDGET = 4, 28 SOURCE_BOOKMARK_SHORTCUT_WIDGET = 4,
29 SOURCE_NOTIFICATION = 5, 29 SOURCE_NOTIFICATION = 5,
30 SOURCE_COUNT = 6 30 SOURCE_COUNT = 6
31 }; 31 };
32 32
33 // The shortcut type.
34 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
35 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ShortcutType
36 enum class Type {
37 // Dedicated APK should be created for the shortcut so that the shortcut is
38 // present in the app list and on the home screen. Shortcut opens Chrome in
39 // fullscreen.
40 WEBAPK,
41 // Shortcut is present on home screen but not in app list. Shortcut opens
42 // Chrome in fullscreen.
43 WEBAPP,
44 OTHER,
45 };
46
33 explicit ShortcutInfo(const GURL& shortcut_url); 47 explicit ShortcutInfo(const GURL& shortcut_url);
34 ShortcutInfo(const ShortcutInfo& other); 48 ShortcutInfo(const ShortcutInfo& other);
35 ~ShortcutInfo(); 49 ~ShortcutInfo();
36 50
37 // Updates the info based on the given |manifest|. 51 // Updates the info based on the given |manifest|.
38 void UpdateFromManifest(const content::Manifest& manifest); 52 void UpdateFromManifest(const content::Manifest& manifest);
39 53
40 // Updates the source of the shortcut. 54 // Updates the source of the shortcut.
41 void UpdateSource(const Source source); 55 void UpdateSource(const Source source);
42 56
43 GURL manifest_url; 57 GURL manifest_url;
44 GURL url; 58 GURL url;
45 base::string16 user_title; 59 base::string16 user_title;
46 base::string16 name; 60 base::string16 name;
47 base::string16 short_name; 61 base::string16 short_name;
48 blink::WebDisplayMode display; 62 blink::WebDisplayMode display;
49 blink::WebScreenOrientationLockType orientation; 63 blink::WebScreenOrientationLockType orientation;
50 Source source; 64 Source source;
51 int64_t theme_color; 65 int64_t theme_color;
52 int64_t background_color; 66 int64_t background_color;
53 GURL icon_url; 67 GURL icon_url;
68 Type type;
54 }; 69 };
55 70
56 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 71 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
OLDNEW
« no previous file with comments | « chrome/browser/android/shortcut_helper.cc ('k') | chrome/browser/android/shortcut_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698