OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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_COMMON_EXTENSIONS_EXTENSION_H_ | 5 #ifndef CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 6 #define CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
7 | 7 |
8 #include <algorithm> | 8 #include <algorithm> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <map> | 10 #include <map> |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 | 44 |
45 namespace gfx { | 45 namespace gfx { |
46 class ImageSkia; | 46 class ImageSkia; |
47 } | 47 } |
48 | 48 |
49 namespace extensions { | 49 namespace extensions { |
50 class APIPermissionSet; | 50 class APIPermissionSet; |
51 class PermissionSet; | 51 class PermissionSet; |
52 | 52 |
53 // Represents a Chrome extension. | 53 // Represents a Chrome extension. |
| 54 // Once created, an Extension object is immutable, with the exception of its |
| 55 // RuntimeData. This makes it safe to use on any thread, since access to the |
| 56 // RuntimeData is protected by a lock. |
54 class Extension : public base::RefCountedThreadSafe<Extension> { | 57 class Extension : public base::RefCountedThreadSafe<Extension> { |
55 public: | 58 public: |
56 struct ManifestData; | 59 struct ManifestData; |
57 | 60 |
58 typedef std::vector<std::string> ScriptingWhitelist; | 61 typedef std::vector<std::string> ScriptingWhitelist; |
59 typedef std::map<const std::string, linked_ptr<ManifestData> > | 62 typedef std::map<const std::string, linked_ptr<ManifestData> > |
60 ManifestDataMap; | 63 ManifestDataMap; |
61 | 64 |
62 enum State { | 65 enum State { |
63 DISABLED = 0, | 66 DISABLED = 0, |
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
736 | 739 |
737 UpdatedExtensionPermissionsInfo( | 740 UpdatedExtensionPermissionsInfo( |
738 const Extension* extension, | 741 const Extension* extension, |
739 const PermissionSet* permissions, | 742 const PermissionSet* permissions, |
740 Reason reason); | 743 Reason reason); |
741 }; | 744 }; |
742 | 745 |
743 } // namespace extensions | 746 } // namespace extensions |
744 | 747 |
745 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ | 748 #endif // CHROME_COMMON_EXTENSIONS_EXTENSION_H_ |
OLD | NEW |