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; | |
32 struct ExtensionOmniboxSuggestion; | 31 struct ExtensionOmniboxSuggestion; |
33 } | 32 } |
34 | 33 |
35 // Class for managing global and per-extension preferences. | 34 // Class for managing global and per-extension preferences. |
36 // | 35 // |
37 // This class distinguishes the following kinds of preferences: | 36 // This class distinguishes the following kinds of preferences: |
38 // - global preferences: | 37 // - global preferences: |
39 // internal state for the extension system in general, not associated | 38 // internal state for the extension system in general, not associated |
40 // with an individual extension, such as lastUpdateTime. | 39 // with an individual extension, such as lastUpdateTime. |
41 // - per-extension preferences: | 40 // - per-extension preferences: |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 | 268 |
270 // Sets the active |permissions| for the extension with |extension_id|. | 269 // Sets the active |permissions| for the extension with |extension_id|. |
271 void SetActivePermissions(const std::string& extension_id, | 270 void SetActivePermissions(const std::string& extension_id, |
272 const ExtensionPermissionSet* permissions); | 271 const ExtensionPermissionSet* permissions); |
273 | 272 |
274 // Returns the list of events that the given extension has registered for. | 273 // Returns the list of events that the given extension has registered for. |
275 std::set<std::string> GetRegisteredEvents(const std::string& extension_id); | 274 std::set<std::string> GetRegisteredEvents(const std::string& extension_id); |
276 void SetRegisteredEvents(const std::string& extension_id, | 275 void SetRegisteredEvents(const std::string& extension_id, |
277 const std::set<std::string>& events); | 276 const std::set<std::string>& events); |
278 | 277 |
279 // Controls a list of alarms for this extension, including the next time they | |
280 // should run. | |
281 std::vector<extensions::AlarmPref> GetRegisteredAlarms( | |
282 const std::string& extension_id); | |
283 void SetRegisteredAlarms(const std::string& extension_id, | |
284 const std::vector<extensions::AlarmPref>& alarms); | |
285 | |
286 // Controls the omnibox default suggestion as set by the extension. | 278 // Controls the omnibox default suggestion as set by the extension. |
287 extensions::ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( | 279 extensions::ExtensionOmniboxSuggestion GetOmniboxDefaultSuggestion( |
288 const std::string& extension_id); | 280 const std::string& extension_id); |
289 void SetOmniboxDefaultSuggestion( | 281 void SetOmniboxDefaultSuggestion( |
290 const std::string& extension_id, | 282 const std::string& extension_id, |
291 const extensions::ExtensionOmniboxSuggestion& suggestion); | 283 const extensions::ExtensionOmniboxSuggestion& suggestion); |
292 | 284 |
293 // Controls the context menu items for this extension. | 285 // Controls the context menu items for this extension. |
294 ExtensionMenuItem::List GetContextMenuItems(const std::string& extension_id); | 286 ExtensionMenuItem::List GetContextMenuItems(const std::string& extension_id); |
295 void SetContextMenuItems(const std::string& extension_id, | 287 void SetContextMenuItems(const std::string& extension_id, |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
557 // Contains all the logic for handling the order for various extension | 549 // Contains all the logic for handling the order for various extension |
558 // properties. | 550 // properties. |
559 scoped_ptr<ExtensionSorting> extension_sorting_; | 551 scoped_ptr<ExtensionSorting> extension_sorting_; |
560 | 552 |
561 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; | 553 scoped_refptr<extensions::ContentSettingsStore> content_settings_store_; |
562 | 554 |
563 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); | 555 DISALLOW_COPY_AND_ASSIGN(ExtensionPrefs); |
564 }; | 556 }; |
565 | 557 |
566 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ | 558 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PREFS_H_ |
OLD | NEW |