Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / android / shortcut_info.h
blobd5db06b83ed29544cbe13277379a40c6fb7b1e13
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
6 #define CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_
8 #include "base/strings/string16.h"
9 #include "content/public/common/manifest.h"
10 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationLockType.h"
11 #include "url/gurl.h"
13 // Information needed to create a shortcut via ShortcutHelper.
14 struct ShortcutInfo {
16 // This enum is used to back a UMA histogram, and must be treated as
17 // append-only.
18 // A Java counterpart will be generated for this enum.
19 // GENERATED_JAVA_ENUM_PACKAGE: org.chromium.chrome.browser
20 // GENERATED_JAVA_CLASS_NAME_OVERRIDE: ShortcutSource
21 enum Source {
22 SOURCE_UNKNOWN = 0,
23 SOURCE_ADD_TO_HOMESCREEN = 1,
24 SOURCE_APP_BANNER = 2,
25 SOURCE_BOOKMARK_NAVIGATOR_WIDGET = 3,
26 SOURCE_BOOKMARK_SHORTCUT_WIDGET = 4,
27 SOURCE_COUNT = 5
30 explicit ShortcutInfo(const GURL& shortcut_url);
31 ~ShortcutInfo();
33 // Updates the info based on the given |manifest|.
34 void UpdateFromManifest(const content::Manifest& manifest);
36 // Updates the source of the shortcut.
37 void UpdateSource(const Source source);
39 GURL url;
40 base::string16 user_title;
41 base::string16 name;
42 base::string16 short_name;
43 blink::WebDisplayMode display;
44 blink::WebScreenOrientationLockType orientation;
45 Source source;
46 int64_t theme_color;
47 int64_t background_color;
50 #endif // CHROME_BROWSER_ANDROID_SHORTCUT_INFO_H_