Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(956)

Side by Side Diff: chrome/browser/extensions/extension_prefs.h

Issue 10533086: Action box menu (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Action box menu Created 8 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // the extension, this will return false. Generally you should use 103 // the extension, this will return false. Generally you should use
104 // ExtensionService::IsExtensionEnabled instead. 104 // ExtensionService::IsExtensionEnabled instead.
105 bool IsExtensionDisabled(const std::string& id) const; 105 bool IsExtensionDisabled(const std::string& id) const;
106 106
107 // Get the order that the browser actions appear in the toolbar. 107 // Get the order that the browser actions appear in the toolbar.
108 std::vector<std::string> GetToolbarOrder(); 108 std::vector<std::string> GetToolbarOrder();
109 109
110 // Set the order that the browser actions appear in the toolbar. 110 // Set the order that the browser actions appear in the toolbar.
111 void SetToolbarOrder(const std::vector<std::string>& extension_ids); 111 void SetToolbarOrder(const std::vector<std::string>& extension_ids);
112 112
113 // Get/Set the order that the browser actions appear in the action box.
114 std::vector<std::string> GetActionBoxOrder();
115 void SetActionBoxOrder(const std::vector<std::string>& extension_ids);
116
113 // Called when an extension is installed, so that prefs get created. 117 // Called when an extension is installed, so that prefs get created.
114 // If |page_ordinal| is an invalid ordinal, then a page will be found 118 // If |page_ordinal| is an invalid ordinal, then a page will be found
115 // for the App. 119 // for the App.
116 void OnExtensionInstalled(const extensions::Extension* extension, 120 void OnExtensionInstalled(const extensions::Extension* extension,
117 extensions::Extension::State initial_state, 121 extensions::Extension::State initial_state,
118 bool from_webstore, 122 bool from_webstore,
119 const StringOrdinal& page_ordinal); 123 const StringOrdinal& page_ordinal);
120 124
121 // Called when an extension is uninstalled, so that prefs get cleaned up. 125 // Called when an extension is uninstalled, so that prefs get cleaned up.
122 void OnExtensionUninstalled(const std::string& extension_id, 126 void OnExtensionUninstalled(const std::string& extension_id,
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 void InitPrefStore(bool extensions_disabled); 535 void InitPrefStore(bool extensions_disabled);
532 536
533 // Migrates the permissions data in the pref store. 537 // Migrates the permissions data in the pref store.
534 void MigratePermissions(const ExtensionIdSet& extension_ids); 538 void MigratePermissions(const ExtensionIdSet& extension_ids);
535 539
536 // Checks whether there is a state pref for the extension and if so, whether 540 // Checks whether there is a state pref for the extension and if so, whether
537 // it matches |check_state|. 541 // it matches |check_state|.
538 bool DoesExtensionHaveState(const std::string& id, 542 bool DoesExtensionHaveState(const std::string& id,
539 extensions::Extension::State check_state) const; 543 extensions::Extension::State check_state) const;
540 544
545 // Helper function to Get/Set array of strings from/to prefs
546 std::vector<std::string> GetExtensionsOrder(const char* pref);
Aaron Boodman 2012/07/02 22:41:34 If it's really just getting an array of strings, t
yefimt 2012/07/11 22:34:34 Done.
547 void SetExtensionsOrder(const char* pref,
548 const std::vector<std::string>& extension_ids);
549
541 // The pref service specific to this set of extension prefs. Owned by profile. 550 // The pref service specific to this set of extension prefs. Owned by profile.
542 PrefService* prefs_; 551 PrefService* prefs_;
543 552
544 // Base extensions install directory. 553 // Base extensions install directory.
545 FilePath install_directory_; 554 FilePath install_directory_;
546 555
547 // Weak pointer, owned by Profile. 556 // Weak pointer, owned by Profile.
548 ExtensionPrefValueMap* extension_pref_value_map_; 557 ExtensionPrefValueMap* extension_pref_value_map_;
549 558
550 // Contains all the logic for handling the order for various extension 559 // Contains all the logic for handling the order for various extension
551 // properties. 560 // properties.
552 scoped_ptr<ExtensionSorting> extension_sorting_; 561 scoped_ptr<ExtensionSorting> extension_sorting_;
553 562
554 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; 563 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_;
555 564
556 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 565 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
557 }; 566 };
558 567
559 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 568 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/extension_prefs.cc » ('j') | chrome/browser/extensions/extension_prefs.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698