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_SERVICE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 15 matching lines...) Expand all Loading... |
26 #include "extensions/browser/management_policy.h" | 26 #include "extensions/browser/management_policy.h" |
27 #include "extensions/browser/process_manager.h" | 27 #include "extensions/browser/process_manager.h" |
28 #include "extensions/browser/uninstall_reason.h" | 28 #include "extensions/browser/uninstall_reason.h" |
29 #include "extensions/common/extension.h" | 29 #include "extensions/common/extension.h" |
30 #include "extensions/common/extension_set.h" | 30 #include "extensions/common/extension_set.h" |
31 #include "extensions/common/manifest.h" | 31 #include "extensions/common/manifest.h" |
32 #include "sync/api/string_ordinal.h" | 32 #include "sync/api/string_ordinal.h" |
33 | 33 |
34 class ExtensionSyncService; | 34 class ExtensionSyncService; |
35 class GURL; | 35 class GURL; |
| 36 class HostContentSettingsMap; |
36 class Profile; | 37 class Profile; |
37 | 38 |
38 namespace base { | 39 namespace base { |
39 class CommandLine; | 40 class CommandLine; |
40 class SequencedTaskRunner; | 41 class SequencedTaskRunner; |
41 class Version; | 42 class Version; |
42 } | 43 } |
43 | 44 |
44 namespace content { | 45 namespace content { |
45 class DevToolsAgentHost; | 46 class DevToolsAgentHost; |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 // NOTE: If this is ever called with high frequency, the implementation may | 359 // NOTE: If this is ever called with high frequency, the implementation may |
359 // need to be made more efficient. | 360 // need to be made more efficient. |
360 static void RecordPermissionMessagesHistogram( | 361 static void RecordPermissionMessagesHistogram( |
361 const extensions::Extension* extension, const char* histogram); | 362 const extensions::Extension* extension, const char* histogram); |
362 | 363 |
363 // Unloads the given extension and mark the extension as terminated. This | 364 // Unloads the given extension and mark the extension as terminated. This |
364 // doesn't notify the user that the extension was terminated, if such a | 365 // doesn't notify the user that the extension was terminated, if such a |
365 // notification is desired the calling code is responsible for doing that. | 366 // notification is desired the calling code is responsible for doing that. |
366 void TerminateExtension(const std::string& extension_id); | 367 void TerminateExtension(const std::string& extension_id); |
367 | 368 |
| 369 // Register self and content settings API with the specified map. |
| 370 void RegisterContentSettings( |
| 371 HostContentSettingsMap* host_content_settings_map); |
| 372 |
368 // Adds/Removes update observers. | 373 // Adds/Removes update observers. |
369 void AddUpdateObserver(extensions::UpdateObserver* observer); | 374 void AddUpdateObserver(extensions::UpdateObserver* observer); |
370 void RemoveUpdateObserver(extensions::UpdateObserver* observer); | 375 void RemoveUpdateObserver(extensions::UpdateObserver* observer); |
371 | 376 |
372 ////////////////////////////////////////////////////////////////////////////// | 377 ////////////////////////////////////////////////////////////////////////////// |
373 // Simple Accessors | 378 // Simple Accessors |
374 | 379 |
375 // Returns a WeakPtr to the ExtensionService. | 380 // Returns a WeakPtr to the ExtensionService. |
376 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } | 381 base::WeakPtr<ExtensionService> AsWeakPtr() { return base::AsWeakPtr(this); } |
377 | 382 |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 GreylistedExtensionDisabled); | 735 GreylistedExtensionDisabled); |
731 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 736 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
732 GreylistDontEnableManuallyDisabled); | 737 GreylistDontEnableManuallyDisabled); |
733 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, | 738 FRIEND_TEST_ALL_PREFIXES(ExtensionServiceTest, |
734 GreylistUnknownDontChange); | 739 GreylistUnknownDontChange); |
735 | 740 |
736 DISALLOW_COPY_AND_ASSIGN(ExtensionService); | 741 DISALLOW_COPY_AND_ASSIGN(ExtensionService); |
737 }; | 742 }; |
738 | 743 |
739 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ | 744 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_SERVICE_H_ |
OLD | NEW |