OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_INFO_MAP_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
48 // Returns true if the user has allowed this extension to run in incognito | 48 // Returns true if the user has allowed this extension to run in incognito |
49 // mode. | 49 // mode. |
50 bool IsIncognitoEnabled(const std::string& extension_id) const; | 50 bool IsIncognitoEnabled(const std::string& extension_id) const; |
51 | 51 |
52 // Returns true if the given extension can see events and data from another | 52 // Returns true if the given extension can see events and data from another |
53 // sub-profile (incognito to original profile, or vice versa). | 53 // sub-profile (incognito to original profile, or vice versa). |
54 bool CanCrossIncognito(const Extension* extension); | 54 bool CanCrossIncognito(const Extension* extension); |
55 | 55 |
56 // Adds an entry to process_map_. | 56 // Adds an entry to process_map_. |
57 void RegisterExtensionProcess(const std::string& extension_id, | 57 void RegisterExtensionProcess(const std::string& extension_id, |
58 int process_id); | 58 int process_id, |
59 int site_instance_id); | |
Charlie Reis
2011/12/02 00:45:11
Conceptually I kind of view it as a map of (extens
Aaron Boodman
2011/12/02 05:32:45
Meh.
| |
59 | 60 |
60 // Removes an entry from process_map_. | 61 // Removes an entry from process_map_. |
61 void UnregisterExtensionProcess(const std::string& extension_id, | 62 void UnregisterExtensionProcess(const std::string& extension_id, |
62 int process_id); | 63 int process_id, |
64 int site_instance_id); | |
63 void UnregisterAllExtensionsInProcess(int process_id); | 65 void UnregisterAllExtensionsInProcess(int process_id); |
64 | 66 |
65 // Returns true if there is exists an extension with the same origin as | 67 // Returns true if there is exists an extension with the same origin as |
66 // |origin| in |process_id| with |permission|. | 68 // |origin| in |process_id| with |permission|. |
67 bool SecurityOriginHasAPIPermission( | 69 bool SecurityOriginHasAPIPermission( |
68 const GURL& origin, int process_id, | 70 const GURL& origin, int process_id, |
69 ExtensionAPIPermission::ID permission) const; | 71 ExtensionAPIPermission::ID permission) const; |
70 | 72 |
71 ExtensionsQuotaService* quota_service() { return "a_service_; } | 73 ExtensionsQuotaService* quota_service() { return "a_service_; } |
72 | 74 |
(...skipping 10 matching lines...) Expand all Loading... | |
83 ExtraDataMap extra_data_; | 85 ExtraDataMap extra_data_; |
84 | 86 |
85 // Used by dispatchers to limit API quota for individual extensions. | 87 // Used by dispatchers to limit API quota for individual extensions. |
86 ExtensionsQuotaService quota_service_; | 88 ExtensionsQuotaService quota_service_; |
87 | 89 |
88 // Assignment of extensions to processes. | 90 // Assignment of extensions to processes. |
89 extensions::ProcessMap process_map_; | 91 extensions::ProcessMap process_map_; |
90 }; | 92 }; |
91 | 93 |
92 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 94 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
OLD | NEW |