OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 EXTENSIONS_BROWSER_INFO_MAP_H_ | 5 #ifndef EXTENSIONS_BROWSER_INFO_MAP_H_ |
6 #define EXTENSIONS_BROWSER_INFO_MAP_H_ | 6 #define EXTENSIONS_BROWSER_INFO_MAP_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 void RegisterExtensionProcess(const std::string& extension_id, | 64 void RegisterExtensionProcess(const std::string& extension_id, |
65 int process_id, | 65 int process_id, |
66 int site_instance_id); | 66 int site_instance_id); |
67 | 67 |
68 // Removes an entry from process_map_. | 68 // Removes an entry from process_map_. |
69 void UnregisterExtensionProcess(const std::string& extension_id, | 69 void UnregisterExtensionProcess(const std::string& extension_id, |
70 int process_id, | 70 int process_id, |
71 int site_instance_id); | 71 int site_instance_id); |
72 void UnregisterAllExtensionsInProcess(int process_id); | 72 void UnregisterAllExtensionsInProcess(int process_id); |
73 | 73 |
74 // Returns the subset of extensions which has the same |origin| in | |
75 // |process_id| with the specified |permission|. | |
76 void GetExtensionsWithAPIPermissionForSecurityOrigin( | |
77 const GURL& origin, | |
78 int process_id, | |
79 extensions::APIPermission::ID permission, | |
80 ExtensionSet* extensions) const; | |
81 | |
82 // Returns true if there is exists an extension with the same origin as | 74 // Returns true if there is exists an extension with the same origin as |
83 // |origin| in |process_id| with |permission|. | 75 // |origin| in |process_id| with |permission|. |
84 bool SecurityOriginHasAPIPermission(const GURL& origin, | 76 bool SecurityOriginHasAPIPermission(const GURL& origin, |
85 int process_id, | 77 int process_id, |
86 extensions::APIPermission::ID permission) | 78 extensions::APIPermission::ID permission) |
87 const; | 79 const; |
88 | 80 |
89 // Maps a |file_url| to a |file_path| on the local filesystem, including | 81 // Maps a |file_url| to a |file_path| on the local filesystem, including |
90 // resources in extensions. Returns true on success. See NaClBrowserDelegate | 82 // resources in extensions. Returns true on success. See NaClBrowserDelegate |
91 // for full details. | 83 // for full details. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 | 119 |
128 // Assignment of extensions to renderer processes. | 120 // Assignment of extensions to renderer processes. |
129 extensions::ProcessMap process_map_; | 121 extensions::ProcessMap process_map_; |
130 | 122 |
131 scoped_refptr<ContentVerifier> content_verifier_; | 123 scoped_refptr<ContentVerifier> content_verifier_; |
132 }; | 124 }; |
133 | 125 |
134 } // namespace extensions | 126 } // namespace extensions |
135 | 127 |
136 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ | 128 #endif // EXTENSIONS_BROWSER_INFO_MAP_H_ |
OLD | NEW |