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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
101 // the extension, this will return false. Generally you should use | 101 // the extension, this will return false. Generally you should use |
102 // ExtensionService::IsExtensionEnabled instead. | 102 // ExtensionService::IsExtensionEnabled instead. |
103 bool IsExtensionDisabled(const std::string& id) const; | 103 bool IsExtensionDisabled(const std::string& id) const; |
104 | 104 |
105 // Get the order that the browser actions appear in the toolbar. | 105 // Get the order that the browser actions appear in the toolbar. |
106 std::vector<std::string> GetToolbarOrder(); | 106 std::vector<std::string> GetToolbarOrder(); |
107 | 107 |
108 // Set the order that the browser actions appear in the toolbar. | 108 // Set the order that the browser actions appear in the toolbar. |
109 void SetToolbarOrder(const std::vector<std::string>& extension_ids); | 109 void SetToolbarOrder(const std::vector<std::string>& extension_ids); |
110 | 110 |
111 // Get/Set the order that the browser actions appear in the action box. | |
112 std::vector<std::string> GetActionboxOrder(); | |
Aaron Boodman
2012/06/12 05:53:44
Nit: I think we should use 'ActionBox', not 'Actio
yefimt
2012/06/13 01:24:21
Done.
| |
113 void SetActionboxOrder(const std::vector<std::string>& extension_ids); | |
114 | |
111 // Called when an extension is installed, so that prefs get created. | 115 // Called when an extension is installed, so that prefs get created. |
112 // If |page_ordinal| is an invalid ordinal, then a page will be found | 116 // If |page_ordinal| is an invalid ordinal, then a page will be found |
113 // for the App. | 117 // for the App. |
114 void OnExtensionInstalled(const extensions::Extension* extension, | 118 void OnExtensionInstalled(const extensions::Extension* extension, |
115 extensions::Extension::State initial_state, | 119 extensions::Extension::State initial_state, |
116 bool from_webstore, | 120 bool from_webstore, |
117 const StringOrdinal& page_ordinal); | 121 const StringOrdinal& page_ordinal); |
118 | 122 |
119 // Called when an extension is uninstalled, so that prefs get cleaned up. | 123 // Called when an extension is uninstalled, so that prefs get cleaned up. |
120 void OnExtensionUninstalled(const std::string& extension_id, | 124 void OnExtensionUninstalled(const std::string& extension_id, |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
528 void InitPrefStore(bool extensions_disabled); | 532 void InitPrefStore(bool extensions_disabled); |
529 | 533 |
530 // Migrates the permissions data in the pref store. | 534 // Migrates the permissions data in the pref store. |
531 void MigratePermissions(const ExtensionIdSet& extension_ids); | 535 void MigratePermissions(const ExtensionIdSet& extension_ids); |
532 | 536 |
533 // Checks whether there is a state pref for the extension and if so, whether | 537 // Checks whether there is a state pref for the extension and if so, whether |
534 // it matches |check_state|. | 538 // it matches |check_state|. |
535 bool DoesExtensionHaveState(const std::string& id, | 539 bool DoesExtensionHaveState(const std::string& id, |
536 extensions::Extension::State check_state) const; | 540 extensions::Extension::State check_state) const; |
537 | 541 |
542 std::vector<std::string> GetExtensionsOrder(const char* pref); | |
543 void SetExtensionsOrder(const char* pref, | |
544 const std::vector<std::string>& extension_ids); | |
545 | |
538 // The pref service specific to this set of extension prefs. Owned by profile. | 546 // The pref service specific to this set of extension prefs. Owned by profile. |
539 PrefService* prefs_; | 547 PrefService* prefs_; |
540 | 548 |
541 // Base extensions install directory. | 549 // Base extensions install directory. |
542 FilePath install_directory_; | 550 FilePath install_directory_; |
543 | 551 |
544 // Weak pointer, owned by Profile. | 552 // Weak pointer, owned by Profile. |
545 ExtensionPrefValueMap* extension_pref_value_map_; | 553 ExtensionPrefValueMap* extension_pref_value_map_; |
546 | 554 |
547 // Contains all the logic for handling the order for various extension | 555 // Contains all the logic for handling the order for various extension |
548 // properties. | 556 // properties. |
549 scoped_ptr<ExtensionSorting> extension_sorting_; | 557 scoped_ptr<ExtensionSorting> extension_sorting_; |
550 | 558 |
551 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; | 559 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; |
552 | 560 |
553 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 561 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
554 }; | 562 }; |
555 | 563 |
556 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 564 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |