Chromium Code Reviews| 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 { | |
| 33 SHORTCUT_CHROME, | |
| 34 SHORTCUT_ALTERNATE_CHROME, | |
| 35 SHORTCUT_APP_LAUNCHER | |
| 36 }; | |
| 37 | |
| 38 enum SubfolderEnum { | |
| 39 SUBFOLDER_CHROME, | |
| 40 SUBFOLDER_APPS | |
|
gab
2013/06/18 19:50:29
SUBFOLDER_APPS is unused yet, only include it in t
calamity
2013/06/27 01:27:44
Done.
| |
| 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); |
| 71 virtual int GetIconIndex(ShortcutEnum shortcut_enum); | |
| 72 virtual string16 GetIconFilename(); | |
| 73 | |
| 74 // Returns the name of the subfolder in the Start Menu that this distribution | |
| 75 // should create shortcuts in. | |
| 76 virtual string16 GetStartMenuShortcutSubfolder(SubfolderEnum subfolder_enum); | |
| 60 | 77 |
| 61 // Returns the unsuffixed appid of this program. | 78 // Returns the unsuffixed appid of this program. |
| 62 // The AppUserModelId is a property of Windows programs. | 79 // The AppUserModelId is a property of Windows programs. |
| 63 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid | 80 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid |
| 64 // should be suffixed in all scenarios. | 81 // should be suffixed in all scenarios. |
| 65 virtual string16 GetBaseAppId(); | 82 virtual string16 GetBaseAppId(); |
| 66 | 83 |
| 67 virtual string16 GetInstallSubDir(); | 84 virtual string16 GetInstallSubDir(); |
| 68 | 85 |
| 69 virtual string16 GetPublisherName(); | 86 virtual string16 GetPublisherName(); |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 89 virtual string16 GetUninstallLinkName(); | 106 virtual string16 GetUninstallLinkName(); |
| 90 | 107 |
| 91 virtual string16 GetUninstallRegPath(); | 108 virtual string16 GetUninstallRegPath(); |
| 92 | 109 |
| 93 virtual string16 GetVersionKey(); | 110 virtual string16 GetVersionKey(); |
| 94 | 111 |
| 95 virtual bool CanSetAsDefault(); | 112 virtual bool CanSetAsDefault(); |
| 96 | 113 |
| 97 virtual bool CanCreateDesktopShortcuts(); | 114 virtual bool CanCreateDesktopShortcuts(); |
| 98 | 115 |
| 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 | |
|
gab
2013/06/18 19:50:29
Keep these 2 method comments.
calamity
2013/06/27 01:27:44
Done.
| |
| 103 // GetIconFilename(). | |
| 104 virtual int GetIconIndex(); | |
| 105 | |
| 106 virtual bool GetChromeChannel(string16* channel); | 116 virtual bool GetChromeChannel(string16* channel); |
| 107 | 117 |
| 108 // Returns true if this distribution includes a DelegateExecute verb handler, | 118 // Returns true if this distribution includes a DelegateExecute verb handler, |
| 109 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is | 119 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is |
| 110 // non-NULL. | 120 // non-NULL. |
| 111 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); | 121 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); |
| 112 | 122 |
| 113 // Returns true if this distribution uses app_host.exe to run platform apps. | 123 // Returns true if this distribution uses app_host.exe to run platform apps. |
| 114 virtual bool AppHostIsSupported(); | 124 virtual bool AppHostIsSupported(); |
| 115 | 125 |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 132 | 142 |
| 133 const Type type_; | 143 const Type type_; |
| 134 | 144 |
| 135 private: | 145 private: |
| 136 BrowserDistribution(); | 146 BrowserDistribution(); |
| 137 | 147 |
| 138 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 148 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 139 }; | 149 }; |
| 140 | 150 |
| 141 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 151 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |