OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_EXTENSION_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 const FilePath& install_directory() const { return install_directory_; } | 200 const FilePath& install_directory() const { return install_directory_; } |
201 | 201 |
202 AppsPromo* apps_promo() { return &apps_promo_; } | 202 AppsPromo* apps_promo() { return &apps_promo_; } |
203 | 203 |
204 // Whether this extension can run in an incognito window. | 204 // Whether this extension can run in an incognito window. |
205 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; | 205 virtual bool IsIncognitoEnabled(const std::string& extension_id) const; |
206 virtual void SetIsIncognitoEnabled(const std::string& extension_id, | 206 virtual void SetIsIncognitoEnabled(const std::string& extension_id, |
207 bool enabled); | 207 bool enabled); |
208 | 208 |
| 209 // The position of App in the NTP |
| 210 virtual int32 GetAppLaunchIndex(const std::string& extension_id) const; |
| 211 virtual void SetAppLaunchIndex(const std::string& extension_id, |
| 212 int32 app_launch_index); |
| 213 virtual int32 GetPageIndex(const std::string& extension_id) const; |
| 214 virtual void SetPageIndex(const std::string& extension_id, |
| 215 int32 page_index); |
| 216 void SetAppLauncherOrder(const std::vector<std::string>& extension_ids); |
| 217 |
209 // Returns true if the given extension can see events and data from another | 218 // Returns true if the given extension can see events and data from another |
210 // sub-profile (incognito to original profile, or vice versa). | 219 // sub-profile (incognito to original profile, or vice versa). |
211 bool CanCrossIncognito(const Extension* extension); | 220 bool CanCrossIncognito(const Extension* extension); |
212 | 221 |
213 // Returns true if the given extension can be loaded in incognito. | 222 // Returns true if the given extension can be loaded in incognito. |
214 bool CanLoadInIncognito(const Extension* extension) const; | 223 bool CanLoadInIncognito(const Extension* extension) const; |
215 | 224 |
216 // Whether this extension can inject scripts into pages with file URLs. | 225 // Whether this extension can inject scripts into pages with file URLs. |
217 bool AllowFileAccess(const Extension* extension); | 226 bool AllowFileAccess(const Extension* extension); |
218 // Will reload the extension since this permission is applied at loading time | 227 // Will reload the extension since this permission is applied at loading time |
(...skipping 577 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
796 SyncBundle extension_sync_bundle_; | 805 SyncBundle extension_sync_bundle_; |
797 | 806 |
798 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 807 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
799 InstallAppsWithUnlimtedStorage); | 808 InstallAppsWithUnlimtedStorage); |
800 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 809 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
801 InstallAppsAndCheckStorageProtection); | 810 InstallAppsAndCheckStorageProtection); |
802 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 811 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
803 }; | 812 }; |
804 | 813 |
805 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 814 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |