OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file declares a class that contains various method related to branding. | 5 // This file declares a class that contains various method related to branding. |
6 | 6 |
7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 7 #ifndef CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 8 #define CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 11 matching lines...) Expand all Loading... | |
22 class BrowserDistribution { | 22 class BrowserDistribution { |
23 public: | 23 public: |
24 enum Type { | 24 enum Type { |
25 CHROME_BROWSER, | 25 CHROME_BROWSER, |
26 CHROME_FRAME, | 26 CHROME_FRAME, |
27 CHROME_BINARIES, | 27 CHROME_BINARIES, |
28 CHROME_APP_HOST, | 28 CHROME_APP_HOST, |
29 NUM_TYPES | 29 NUM_TYPES |
30 }; | 30 }; |
31 | 31 |
32 enum ShortcutEnum { | |
grt (UTC plus 2)
2013/06/28 04:35:21
i don't think the suffix "Enum" is idiomatic. plea
calamity
2013/07/05 09:00:29
I think this name was suggested offhand in another
| |
33 SHORTCUT_CHROME, | |
34 SHORTCUT_ALTERNATE_CHROME, | |
35 SHORTCUT_APP_LAUNCHER | |
36 }; | |
37 | |
38 enum SubfolderEnum { | |
39 SUBFOLDER_CHROME, | |
40 // TODO(calamity): add SUBFOLDER_APPS when refactoring chrome app dir code. | |
41 }; | |
42 | |
32 virtual ~BrowserDistribution() {} | 43 virtual ~BrowserDistribution() {} |
33 | 44 |
34 static BrowserDistribution* GetDistribution(); | 45 static BrowserDistribution* GetDistribution(); |
35 | 46 |
36 static BrowserDistribution* GetSpecificDistribution(Type type); | 47 static BrowserDistribution* GetSpecificDistribution(Type type); |
37 | 48 |
38 Type GetType() const { return type_; } | 49 Type GetType() const { return type_; } |
39 | 50 |
40 virtual void DoPostUninstallOperations(const Version& version, | 51 virtual void DoPostUninstallOperations(const Version& version, |
41 const base::FilePath& local_data_path, | 52 const base::FilePath& local_data_path, |
42 const string16& distribution_data); | 53 const string16& distribution_data); |
43 | 54 |
44 // Returns the GUID to be used when registering for Active Setup. | 55 // Returns the GUID to be used when registering for Active Setup. |
45 virtual string16 GetActiveSetupGuid(); | 56 virtual string16 GetActiveSetupGuid(); |
46 | 57 |
47 virtual string16 GetAppGuid(); | 58 virtual string16 GetAppGuid(); |
48 | 59 |
49 // Returns the unsuffixed application name of this program. | 60 // Returns the unsuffixed application name of this program. |
50 // This is the base of the name registered with Default Programs on Windows. | 61 // This is the base of the name registered with Default Programs on Windows. |
51 // IMPORTANT: This should only be called by the installer which needs to make | 62 // IMPORTANT: This should only be called by the installer which needs to make |
52 // decisions on the suffixing of the upcoming install, not by external callers | 63 // decisions on the suffixing of the upcoming install, not by external callers |
53 // at run-time. | 64 // at run-time. |
54 virtual string16 GetBaseAppName(); | 65 virtual string16 GetBaseAppName(); |
55 | 66 |
56 // Returns the localized name of the program. | 67 // Returns the display name of this distribution. |
57 virtual string16 GetAppShortCutName(); | 68 virtual string16 GetDisplayName(); |
58 | 69 |
59 virtual string16 GetAlternateApplicationName(); | 70 virtual string16 GetShortcutName(ShortcutEnum shortcut_enum); |
gab
2013/06/27 11:49:43
Add a comment to this method too, e.g.:
// Return
grt (UTC plus 2)
2013/06/28 04:35:21
please remove _enum here and elsewhere
calamity
2013/07/05 09:00:29
Done.
| |
71 // Returns the index of the icon for the product, inside the file specified by | |
72 // GetIconFilename(). | |
gab
2013/06/27 11:49:43
Mention what is |shortcut_enum| in this comment (r
calamity
2013/07/05 09:00:29
Done.
| |
73 virtual int GetIconIndex(ShortcutEnum shortcut_enum); | |
74 // Returns the executable filename (not path) that contains the product icon. | |
75 virtual string16 GetIconFilename(); | |
76 | |
77 // Returns the name of the subfolder in the Start Menu that this distribution | |
78 // should create shortcuts in. | |
gab
2013/06/27 11:49:43
Mention what is |subfolder_enum| in this comment.
calamity
2013/07/05 09:00:29
Done.
| |
79 virtual string16 GetStartMenuShortcutSubfolder(SubfolderEnum subfolder_enum); | |
60 | 80 |
61 // Returns the unsuffixed appid of this program. | 81 // Returns the unsuffixed appid of this program. |
62 // The AppUserModelId is a property of Windows programs. | 82 // The AppUserModelId is a property of Windows programs. |
63 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid | 83 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid |
64 // should be suffixed in all scenarios. | 84 // should be suffixed in all scenarios. |
65 virtual string16 GetBaseAppId(); | 85 virtual string16 GetBaseAppId(); |
66 | 86 |
67 virtual string16 GetInstallSubDir(); | 87 virtual string16 GetInstallSubDir(); |
68 | 88 |
69 virtual string16 GetPublisherName(); | 89 virtual string16 GetPublisherName(); |
(...skipping 19 matching lines...) Expand all Loading... | |
89 virtual string16 GetUninstallLinkName(); | 109 virtual string16 GetUninstallLinkName(); |
90 | 110 |
91 virtual string16 GetUninstallRegPath(); | 111 virtual string16 GetUninstallRegPath(); |
92 | 112 |
93 virtual string16 GetVersionKey(); | 113 virtual string16 GetVersionKey(); |
94 | 114 |
95 virtual bool CanSetAsDefault(); | 115 virtual bool CanSetAsDefault(); |
96 | 116 |
97 virtual bool CanCreateDesktopShortcuts(); | 117 virtual bool CanCreateDesktopShortcuts(); |
98 | 118 |
99 // Returns the executable filename (not path) that contains the product icon. | |
100 virtual string16 GetIconFilename(); | |
101 | |
102 // Returns the index of the icon for the product, inside the file specified by | |
103 // GetIconFilename(). | |
104 virtual int GetIconIndex(); | |
105 | |
106 virtual bool GetChromeChannel(string16* channel); | 119 virtual bool GetChromeChannel(string16* channel); |
107 | 120 |
108 // Returns true if this distribution includes a DelegateExecute verb handler, | 121 // Returns true if this distribution includes a DelegateExecute verb handler, |
109 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is | 122 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is |
110 // non-NULL. | 123 // non-NULL. |
111 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); | 124 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); |
112 | 125 |
113 // Returns true if this distribution uses app_host.exe to run platform apps. | 126 // Returns true if this distribution uses app_host.exe to run platform apps. |
114 virtual bool AppHostIsSupported(); | 127 virtual bool AppHostIsSupported(); |
115 | 128 |
(...skipping 16 matching lines...) Expand all Loading... | |
132 | 145 |
133 const Type type_; | 146 const Type type_; |
134 | 147 |
135 private: | 148 private: |
136 BrowserDistribution(); | 149 BrowserDistribution(); |
137 | 150 |
138 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 151 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
139 }; | 152 }; |
140 | 153 |
141 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 154 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
OLD | NEW |