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

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

Issue 1867543002: Enable deep-linking from notifications for recently used web apps on the Android home screen. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bulk-webappdatastorage
Patch Set: Address nits Created 4 years, 8 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 #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"
11 #include "content/public/common/manifest.h" 11 #include "content/public/common/manifest.h"
12 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h" 12 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree nOrientationLockType.h"
13 #include "url/gurl.h" 13 #include "url/gurl.h"
14 14
15 // Information needed to create a shortcut via ShortcutHelper. 15 // Information needed to create a shortcut via ShortcutHelper.
16 struct ShortcutInfo { 16 struct ShortcutInfo {
17 17
18 // This enum is used to back a UMA histogram, and must be treated as 18 // This enum is used to back a UMA histogram, and must be treated as
19 // append-only. 19 // append-only.
20 // A Java counterpart will be generated for this enum. 20 // A Java counterpart will be generated for this enum.
21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser 21 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
22 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ShortcutSource 22 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ShortcutSource
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_COUNT = 5 29 SOURCE_NOTIFICATION = 5,
30 SOURCE_COUNT = 6
30 }; 31 };
31 32
32 explicit ShortcutInfo(const GURL& shortcut_url); 33 explicit ShortcutInfo(const GURL& shortcut_url);
33 ~ShortcutInfo(); 34 ~ShortcutInfo();
34 35
35 // Updates the info based on the given |manifest|. 36 // Updates the info based on the given |manifest|.
36 void UpdateFromManifest(const content::Manifest& manifest); 37 void UpdateFromManifest(const content::Manifest& manifest);
37 38
38 // Updates the source of the shortcut. 39 // Updates the source of the shortcut.
39 void UpdateSource(const Source source); 40 void UpdateSource(const Source source);
40 41
41 GURL url; 42 GURL url;
42 base::string16 user_title; 43 base::string16 user_title;
43 base::string16 name; 44 base::string16 name;
44 base::string16 short_name; 45 base::string16 short_name;
45 blink::WebDisplayMode display; 46 blink::WebDisplayMode display;
46 blink::WebScreenOrientationLockType orientation; 47 blink::WebScreenOrientationLockType orientation;
47 Source source; 48 Source source;
48 int64_t theme_color; 49 int64_t theme_color;
49 int64_t background_color; 50 int64_t background_color;
50 bool is_icon_generated; 51 bool is_icon_generated;
51 }; 52 };
52 53
53 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_ 54 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698