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 10 matching lines...) Expand all Loading... |
21 #include "chrome/common/extensions/extension.h" | 21 #include "chrome/common/extensions/extension.h" |
22 #include "chrome/common/extensions/url_pattern_set.h" | 22 #include "chrome/common/extensions/url_pattern_set.h" |
23 #include "chrome/common/string_ordinal.h" | 23 #include "chrome/common/string_ordinal.h" |
24 | 24 |
25 class ExtensionPrefValueMap; | 25 class ExtensionPrefValueMap; |
26 class ExtensionSorting; | 26 class ExtensionSorting; |
27 class PrefService; | 27 class PrefService; |
28 class URLPatternSet; | 28 class URLPatternSet; |
29 | 29 |
30 namespace extensions { | 30 namespace extensions { |
31 struct AlarmPref; | 31 struct Alarm; |
32 struct ExtensionOmniboxSuggestion; | 32 struct ExtensionOmniboxSuggestion; |
33 } | 33 } |
34 | 34 |
35 // Class for managing global and per-extension preferences. | 35 // Class for managing global and per-extension preferences. |
36 // | 36 // |
37 // This class distinguishes the following kinds of preferences: | 37 // This class distinguishes the following kinds of preferences: |
38 // - global preferences: | 38 // - global preferences: |
39 // internal state for the extension system in general, not associated | 39 // internal state for the extension system in general, not associated |
40 // with an individual extension, such as lastUpdateTime. | 40 // with an individual extension, such as lastUpdateTime. |
41 // - per-extension preferences: | 41 // - per-extension preferences: |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 void SetActivePermissions(const std::string& extension_id, | 271 void SetActivePermissions(const std::string& extension_id, |
272 const ExtensionPermissionSet* permissions); | 272 const ExtensionPermissionSet* permissions); |
273 | 273 |
274 // Returns the list of events that the given extension has registered for. | 274 // Returns the list of events that the given extension has registered for. |
275 std::set<std::string> GetRegisteredEvents(const std::string& extension_id); | 275 std::set<std::string> GetRegisteredEvents(const std::string& extension_id); |
276 void SetRegisteredEvents(const std::string& extension_id, | 276 void SetRegisteredEvents(const std::string& extension_id, |
277 const std::set<std::string>& events); | 277 const std::set<std::string>& events); |
278 | 278 |
279 // Controls a list of alarms for this extension, including the next time they | 279 // Controls a list of alarms for this extension, including the next time they |
280 // should run. | 280 // should run. |
281 std::vector<extensions::AlarmPref> GetRegisteredAlarms( | 281 std::vector<extensions::Alarm> GetRegisteredAlarms( |
282 const std::string& extension_id); | 282 const std::string& extension_id); |
283 void SetRegisteredAlarms(const std::string& extension_id, | 283 void SetRegisteredAlarms(const std::string& extension_id, |
284 const std::vector<extensions::AlarmPref>& alarms); | 284 const std::vector<extensions::Alarm>& alarms); |
285 | 285 |
286 // Controls the omnibox default suggestion as set by the extension. | 286 // Controls the omnibox default suggestion as set by the extension. |
287 extensions::ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( | 287 extensions::ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( |
288 const std::string& extension_id); | 288 const std::string& extension_id); |
289 void SetOmniboxDefaultSuggestion( | 289 void SetOmniboxDefaultSuggestion( |
290 const std::string& extension_id, | 290 const std::string& extension_id, |
291 const extensions::ExtensionOmniboxSuggestion& suggestion); | 291 const extensions::ExtensionOmniboxSuggestion& suggestion); |
292 | 292 |
293 // Controls the context menu items for this extension. | 293 // Controls the context menu items for this extension. |
294 ExtensionMenuItem::List GetContextMenuItems(const std::string& extension_id); | 294 ExtensionMenuItem::List GetContextMenuItems(const std::string& extension_id); |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // Contains all the logic for handling the order for various extension | 557 // Contains all the logic for handling the order for various extension |
558 // properties. | 558 // properties. |
559 scoped_ptr<ExtensionSorting> extension_sorting_; | 559 scoped_ptr<ExtensionSorting> extension_sorting_; |
560 | 560 |
561 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; | 561 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; |
562 | 562 |
563 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 563 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
564 }; | 564 }; |
565 | 565 |
566 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 566 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |