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 <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 base::Time GetInstallTime(const std::string& extension_id) const; | 43 base::Time GetInstallTime(const std::string& extension_id) const; |
44 | 44 |
45 // Returns true if the user has allowed this extension to run in incognito | 45 // Returns true if the user has allowed this extension to run in incognito |
46 // mode. | 46 // mode. |
47 bool IsIncognitoEnabled(const std::string& extension_id) const; | 47 bool IsIncognitoEnabled(const std::string& extension_id) const; |
48 | 48 |
49 // Returns true if the given extension can see events and data from another | 49 // Returns true if the given extension can see events and data from another |
50 // sub-profile (incognito to original profile, or vice versa). | 50 // sub-profile (incognito to original profile, or vice versa). |
51 bool CanCrossIncognito(const Extension* extension); | 51 bool CanCrossIncognito(const Extension* extension); |
52 | 52 |
53 // Registers a RenderProcessHost with |host_id| as hosting an extension. | 53 // Registers a RenderProcessHost with |render_process_id| as hosting an |
54 void BindingsEnabledForProcess(int host_id); | 54 // extension. |
| 55 void BindingsEnabledForProcess(int render_process_id); |
55 | 56 |
56 // Unregisters the RenderProcessHost with |host_id|. | 57 // Unregisters the RenderProcessHost with |render_process_id|. |
57 void BindingsDisabledForProcess(int host_id); | 58 void BindingsDisabledForProcess(int render_process_id); |
58 | 59 |
59 // True if this process host is hosting an extension. | 60 // True if this process host is hosting an extension. |
60 bool AreBindingsEnabledForProcess(int host_id) const; | 61 bool AreBindingsEnabledForProcess(int render_process_id) const; |
61 | 62 |
62 private: | 63 private: |
63 // Extra dynamic data related to an extension. | 64 // Extra dynamic data related to an extension. |
64 struct ExtraData; | 65 struct ExtraData; |
65 // Map of extension_id to ExtraData. | 66 // Map of extension_id to ExtraData. |
66 typedef std::map<std::string, ExtraData> ExtraDataMap; | 67 typedef std::map<std::string, ExtraData> ExtraDataMap; |
67 | 68 |
68 ExtensionSet extensions_; | 69 ExtensionSet extensions_; |
69 ExtensionSet disabled_extensions_; | 70 ExtensionSet disabled_extensions_; |
70 | 71 |
71 // Extra data associated with enabled extensions. | 72 // Extra data associated with enabled extensions. |
72 ExtraDataMap extra_data_; | 73 ExtraDataMap extra_data_; |
73 | 74 |
74 // The set of process ids that have extension bindings enabled. | 75 // The set of process ids that have extension bindings enabled. |
75 std::set<int> extension_bindings_process_ids_; | 76 std::set<int> extension_bindings_process_ids_; |
76 }; | 77 }; |
77 | 78 |
78 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ | 79 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_INFO_MAP_H_ |
OLD | NEW |