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

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

Issue 14699002: Move BrowserAction references from ExtensionPrefs to ExtensionActionAPI (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 7 years, 7 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
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 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 bool extensions_disabled, 142 bool extensions_disabled,
143 scoped_ptr<TimeProvider> time_provider); 143 scoped_ptr<TimeProvider> time_provider);
144 144
145 virtual ~ExtensionPrefs(); 145 virtual ~ExtensionPrefs();
146 146
147 // Returns all installed extensions from extension preferences provided by 147 // Returns all installed extensions from extension preferences provided by
148 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs 148 // |pref_service|. This is exposed for ProtectedPrefsWatcher because it needs
149 // access to the extension ID list before the ExtensionService is initialized. 149 // access to the extension ID list before the ExtensionService is initialized.
150 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service); 150 static ExtensionIdList GetExtensionsFrom(const PrefService* pref_service);
151 151
152 // Returns a copy of the Extensions prefs.
153 // TODO(erikkay) Remove this so that external consumers don't need to be
154 // aware of the internal structure of the preferences.
155 base::DictionaryValue* CopyCurrentExtensions();
156
157 // Returns true if the specified external extension was uninstalled by the 152 // Returns true if the specified external extension was uninstalled by the
158 // user. 153 // user.
159 bool IsExternalExtensionUninstalled(const std::string& id) const; 154 bool IsExternalExtensionUninstalled(const std::string& id) const;
160 155
161 // Checks whether |extension_id| is disabled. If there's no state pref for 156 // Checks whether |extension_id| is disabled. If there's no state pref for
162 // the extension, this will return false. Generally you should use 157 // the extension, this will return false. Generally you should use
163 // ExtensionService::IsExtensionEnabled instead. 158 // ExtensionService::IsExtensionEnabled instead.
164 bool IsExtensionDisabled(const std::string& id) const; 159 bool IsExtensionDisabled(const std::string& id) const;
165 160
166 // Get/Set the order that the browser actions appear in the toolbar. 161 // Get/Set the order that the browser actions appear in the toolbar.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 201
207 virtual bool ReadPrefAsList(const std::string& extension_id, 202 virtual bool ReadPrefAsList(const std::string& extension_id,
208 const std::string& pref_key, 203 const std::string& pref_key,
209 const base::ListValue** out_value) const OVERRIDE; 204 const base::ListValue** out_value) const OVERRIDE;
210 205
211 virtual bool ReadPrefAsDictionary( 206 virtual bool ReadPrefAsDictionary(
212 const std::string& extension_id, 207 const std::string& extension_id,
213 const std::string& pref_key, 208 const std::string& pref_key,
214 const base::DictionaryValue** out_value) const OVERRIDE; 209 const base::DictionaryValue** out_value) const OVERRIDE;
215 210
216 // Getter and setter for browser action visibility.
217 bool GetBrowserActionVisibility(const Extension* extension);
218 void SetBrowserActionVisibility(const Extension* extension,
219 bool visible);
220
221 // Did the extension ask to escalate its permission during an upgrade? 211 // Did the extension ask to escalate its permission during an upgrade?
222 bool DidExtensionEscalatePermissions(const std::string& id); 212 bool DidExtensionEscalatePermissions(const std::string& id);
223 213
224 // If |did_escalate| is true, the preferences for |extension| will be set to 214 // If |did_escalate| is true, the preferences for |extension| will be set to
225 // require the install warning when the user tries to enable. 215 // require the install warning when the user tries to enable.
226 void SetDidExtensionEscalatePermissions( 216 void SetDidExtensionEscalatePermissions(
227 const Extension* extension, 217 const Extension* extension,
228 bool did_escalate); 218 bool did_escalate);
229 219
230 // Getter and setters for disabled reason. 220 // Getter and setters for disabled reason.
(...skipping 447 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 scoped_refptr<ContentSettingsStore> content_settings_store_; 668 scoped_refptr<ContentSettingsStore> content_settings_store_;
679 669
680 scoped_ptr<TimeProvider> time_provider_; 670 scoped_ptr<TimeProvider> time_provider_;
681 671
682 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); 672 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs);
683 }; 673 };
684 674
685 } // namespace extensions 675 } // namespace extensions
686 676
687 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ 677 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_context_menu_model.cc ('k') | chrome/browser/extensions/extension_prefs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698