| 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 ShortcutType { |
| 33 SHORTCUT_CHROME, |
| 34 SHORTCUT_CHROME_ALTERNATE, |
| 35 SHORTCUT_APP_LAUNCHER |
| 36 }; |
| 37 |
| 38 enum Subfolder { |
| 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 localized display name of this distribution. |
| 57 virtual string16 GetAppShortCutName(); | 68 virtual string16 GetDisplayName(); |
| 58 | 69 |
| 59 virtual string16 GetAlternateApplicationName(); | 70 // Returns the localized name of the shortcut identified by |shortcut_type| |
| 71 // for this distribution. |
| 72 virtual string16 GetShortcutName(ShortcutType shortcut_type); |
| 73 |
| 74 // Returns the index of the icon for the product identified by |
| 75 // |shortcut_type|, inside the file specified by GetIconFilename(). |
| 76 virtual int GetIconIndex(ShortcutType shortcut_type); |
| 77 |
| 78 // Returns the executable filename (not path) that contains the product icon. |
| 79 virtual string16 GetIconFilename(); |
| 80 |
| 81 // Returns the localized name of the subfolder in the Start Menu identified by |
| 82 // |subfolder_type| that this distribution should create shortcuts in. For |
| 83 // SUBFOLDER_CHROME this returns GetShortcutName(SHORTCUT_CHROME). |
| 84 virtual string16 GetStartMenuShortcutSubfolder(Subfolder subfolder_type); |
| 60 | 85 |
| 61 // Returns the unsuffixed appid of this program. | 86 // Returns the unsuffixed appid of this program. |
| 62 // The AppUserModelId is a property of Windows programs. | 87 // The AppUserModelId is a property of Windows programs. |
| 63 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid | 88 // IMPORTANT: This should only be called by ShellUtil::GetAppId as the appid |
| 64 // should be suffixed in all scenarios. | 89 // should be suffixed in all scenarios. |
| 65 virtual string16 GetBaseAppId(); | 90 virtual string16 GetBaseAppId(); |
| 66 | 91 |
| 67 virtual string16 GetInstallSubDir(); | 92 virtual string16 GetInstallSubDir(); |
| 68 | 93 |
| 69 virtual string16 GetPublisherName(); | 94 virtual string16 GetPublisherName(); |
| (...skipping 19 matching lines...) Expand all Loading... |
| 89 virtual string16 GetUninstallLinkName(); | 114 virtual string16 GetUninstallLinkName(); |
| 90 | 115 |
| 91 virtual string16 GetUninstallRegPath(); | 116 virtual string16 GetUninstallRegPath(); |
| 92 | 117 |
| 93 virtual string16 GetVersionKey(); | 118 virtual string16 GetVersionKey(); |
| 94 | 119 |
| 95 virtual bool CanSetAsDefault(); | 120 virtual bool CanSetAsDefault(); |
| 96 | 121 |
| 97 virtual bool CanCreateDesktopShortcuts(); | 122 virtual bool CanCreateDesktopShortcuts(); |
| 98 | 123 |
| 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); | 124 virtual bool GetChromeChannel(string16* channel); |
| 107 | 125 |
| 108 // Returns true if this distribution includes a DelegateExecute verb handler, | 126 // Returns true if this distribution includes a DelegateExecute verb handler, |
| 109 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is | 127 // and provides the CommandExecuteImpl class UUID if |handler_class_uuid| is |
| 110 // non-NULL. | 128 // non-NULL. |
| 111 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); | 129 virtual bool GetCommandExecuteImplClsid(string16* handler_class_uuid); |
| 112 | 130 |
| 113 // Returns true if this distribution uses app_host.exe to run platform apps. | 131 // Returns true if this distribution uses app_host.exe to run platform apps. |
| 114 virtual bool AppHostIsSupported(); | 132 virtual bool AppHostIsSupported(); |
| 115 | 133 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 132 | 150 |
| 133 const Type type_; | 151 const Type type_; |
| 134 | 152 |
| 135 private: | 153 private: |
| 136 BrowserDistribution(); | 154 BrowserDistribution(); |
| 137 | 155 |
| 138 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); | 156 DISALLOW_COPY_AND_ASSIGN(BrowserDistribution); |
| 139 }; | 157 }; |
| 140 | 158 |
| 141 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ | 159 #endif // CHROME_INSTALLER_UTIL_BROWSER_DISTRIBUTION_H_ |
| OLD | NEW |