| 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 19 matching lines...) Expand all Loading... |
| 30 // The promo can also be forced on with --force-apps-promo-visible. | 30 // The promo can also be forced on with --force-apps-promo-visible. |
| 31 class DefaultApps { | 31 class DefaultApps { |
| 32 public: | 32 public: |
| 33 // The maximum number of times to show the apps promo. | 33 // The maximum number of times to show the apps promo. |
| 34 static const int kAppsPromoCounterMax; | 34 static const int kAppsPromoCounterMax; |
| 35 | 35 |
| 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 | 41 |
| 41 // 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 |
| 42 // no apps need to be installed. | 43 // no apps need to be installed. |
| 43 const ExtensionIdSet* GetAppsToInstall() const; | 44 const ExtensionIdSet* GetAppsToInstall() const; |
| 44 | 45 |
| 45 // Should be called after each app is installed. Once installed_ids contains | 46 // Should be called after each app is installed. Once installed_ids contains |
| 46 // all the default apps, GetAppsToInstall() will start returning NULL. | 47 // all the default apps, GetAppsToInstall() will start returning NULL. |
| 47 void DidInstallApp(const ExtensionIdSet& installed_ids); | 48 void DidInstallApp(const ExtensionIdSet& installed_ids); |
| 48 | 49 |
| 49 // Returns true if the apps promo should be displayed in the launcher. This | 50 // Returns true if the apps promo should be displayed in the launcher. This |
| (...skipping 24 matching lines...) Expand all Loading... |
| 74 PrefService* prefs_; | 75 PrefService* prefs_; |
| 75 | 76 |
| 76 // The set of default extensions. Initialized to a static list in the | 77 // The set of default extensions. Initialized to a static list in the |
| 77 // constructor. | 78 // constructor. |
| 78 ExtensionIdSet ids_; | 79 ExtensionIdSet ids_; |
| 79 | 80 |
| 80 DISALLOW_COPY_AND_ASSIGN(DefaultApps); | 81 DISALLOW_COPY_AND_ASSIGN(DefaultApps); |
| 81 }; | 82 }; |
| 82 | 83 |
| 83 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ | 84 #endif // CHROME_BROWSER_EXTENSIONS_DEFAULT_APPS_H_ |
| OLD | NEW |