| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_EXTENSIONS_DEFAULT_APPS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 // Register our preferences. | 36 // Register our preferences. |
| 37 static void RegisterUserPrefs(PrefService* prefs); | 37 static void RegisterUserPrefs(PrefService* prefs); |
| 38 | 38 |
| 39 explicit DefaultApps(PrefService* prefs); | 39 explicit DefaultApps(PrefService* prefs); |
| 40 ~DefaultApps(); | 40 ~DefaultApps(); |
| 41 | 41 |
| 42 // Gets the list of default apps that should be installed. Can return NULL if | 42 // Gets the list of default apps that should be installed. Can return NULL if |
| 43 // no apps need to be installed. | 43 // no apps need to be installed. |
| 44 const ExtensionIdSet* GetAppsToInstall() const; | 44 const ExtensionIdSet* GetAppsToInstall() const; |
| 45 | 45 |
| 46 // Gets the list of default apps. |
| 47 const ExtensionIdSet* GetDefaultApps() const; |
| 48 |
| 46 // Should be called after each app is installed. Once installed_ids contains | 49 // Should be called after each app is installed. Once installed_ids contains |
| 47 // all the default apps, GetAppsToInstall() will start returning NULL. | 50 // all the default apps, GetAppsToInstall() will start returning NULL. |
| 48 void DidInstallApp(const ExtensionIdSet& installed_ids); | 51 void DidInstallApp(const ExtensionIdSet& installed_ids); |
| 49 | 52 |
| 50 // Returns true if the apps promo should be displayed in the launcher. This | 53 // Returns true if the apps promo should be displayed in the launcher. This |
| 51 // starts returning true once the default apps have all been installed and | 54 // starts returning true once the default apps have all been installed and |
| 52 // stops after the promo expires. | 55 // stops after the promo expires. |
| 53 bool ShouldShowPromo(const ExtensionIdSet& installed_ids); | 56 bool ShouldShowPromo(const ExtensionIdSet& installed_ids); |
| 54 | 57 |
| 55 // Should be called after each time the promo is installed. | 58 // Should be called after each time the promo is installed. |
| (...skipping 19 matching lines...) Expand all Loading... |
| 75 PrefService* prefs_; | 78 PrefService* prefs_; |
| 76 | 79 |
| 77 // The set of default extensions. Initialized to a static list in the | 80 // The set of default extensions. Initialized to a static list in the |
| 78 // constructor. | 81 // constructor. |
| 79 ExtensionIdSet ids_; | 82 ExtensionIdSet ids_; |
| 80 | 83 |
| 81 DISALLOW_COPY_AND_ASSIGN(DefaultApps); | 84 DISALLOW_COPY_AND_ASSIGN(DefaultApps); |
| 82 }; | 85 }; |
| 83 | 86 |
| 84 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ | 87 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| OLD | NEW |