| 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 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 #include "sync/api/string_ordinal.h" | 22 #include "sync/api/string_ordinal.h" |
| 23 | 23 |
| 24 class ExtensionPrefValueMap; | 24 class ExtensionPrefValueMap; |
| 25 class ExtensionSorting; | 25 class ExtensionSorting; |
| 26 class PrefService; | 26 class PrefService; |
| 27 class PrefRegistrySyncable; | 27 class PrefRegistrySyncable; |
| 28 | 28 |
| 29 namespace extensions { | 29 namespace extensions { |
| 30 class ExtensionPrefsUninstallExtension; | 30 class ExtensionPrefsUninstallExtension; |
| 31 class URLPatternSet; | 31 class URLPatternSet; |
| 32 struct ExtensionOmniboxSuggestion; | 32 |
| 33 namespace api { |
| 34 namespace omnibox { |
| 35 struct SuggestResult; |
| 36 } |
| 37 } |
| 33 | 38 |
| 34 namespace app_file_handler_util { | 39 namespace app_file_handler_util { |
| 35 struct SavedFileEntry; | 40 struct SavedFileEntry; |
| 36 } | 41 } |
| 37 | 42 |
| 38 // Class for managing global and per-extension preferences. | 43 // Class for managing global and per-extension preferences. |
| 39 // | 44 // |
| 40 // This class distinguishes the following kinds of preferences: | 45 // This class distinguishes the following kinds of preferences: |
| 41 // - global preferences: | 46 // - global preferences: |
| 42 // internal state for the extension system in general, not associated | 47 // internal state for the extension system in general, not associated |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 void AddSavedFileEntry(const std::string& extension_id, | 322 void AddSavedFileEntry(const std::string& extension_id, |
| 318 const std::string& id, | 323 const std::string& id, |
| 319 const base::FilePath& file_path, | 324 const base::FilePath& file_path, |
| 320 bool writable); | 325 bool writable); |
| 321 void ClearSavedFileEntries(const std::string& extension_id); | 326 void ClearSavedFileEntries(const std::string& extension_id); |
| 322 void GetSavedFileEntries( | 327 void GetSavedFileEntries( |
| 323 const std::string& extension_id, | 328 const std::string& extension_id, |
| 324 std::vector<app_file_handler_util::SavedFileEntry>* out); | 329 std::vector<app_file_handler_util::SavedFileEntry>* out); |
| 325 | 330 |
| 326 // Controls the omnibox default suggestion as set by the extension. | 331 // Controls the omnibox default suggestion as set by the extension. |
| 327 ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( | 332 scoped_ptr<api::omnibox::SuggestResult> GetOmniboxDefaultSuggestion( |
| 328 const std::string& extension_id); | 333 const std::string& extension_id); |
| 329 void SetOmniboxDefaultSuggestion( | 334 void SetOmniboxDefaultSuggestion( |
| 330 const std::string& extension_id, | 335 const std::string& extension_id, |
| 331 const ExtensionOmniboxSuggestion& suggestion); | 336 const api::omnibox::SuggestResult& suggestion); |
| 332 | 337 |
| 333 // Returns true if the user enabled this extension to be loaded in incognito | 338 // Returns true if the user enabled this extension to be loaded in incognito |
| 334 // mode. | 339 // mode. |
| 335 bool IsIncognitoEnabled(const std::string& extension_id); | 340 bool IsIncognitoEnabled(const std::string& extension_id); |
| 336 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); | 341 void SetIsIncognitoEnabled(const std::string& extension_id, bool enabled); |
| 337 | 342 |
| 338 // Returns true if the user has chosen to allow this extension to inject | 343 // Returns true if the user has chosen to allow this extension to inject |
| 339 // scripts into pages with file URLs. | 344 // scripts into pages with file URLs. |
| 340 bool AllowFileAccess(const std::string& extension_id); | 345 bool AllowFileAccess(const std::string& extension_id); |
| 341 void SetAllowFileAccess(const std::string& extension_id, bool allow); | 346 void SetAllowFileAccess(const std::string& extension_id, bool allow); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 scoped_refptr<ContentSettingsStore> content_settings_store_; | 658 scoped_refptr<ContentSettingsStore> content_settings_store_; |
| 654 | 659 |
| 655 scoped_ptr<TimeProvider> time_provider_; | 660 scoped_ptr<TimeProvider> time_provider_; |
| 656 | 661 |
| 657 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 662 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
| 658 }; | 663 }; |
| 659 | 664 |
| 660 } // namespace extensions | 665 } // namespace extensions |
| 661 | 666 |
| 662 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 667 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
| OLD | NEW |