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_PROCESS_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
10 #include <set> | 10 #include <set> |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 void RegisterExtensionSiteInstance(SiteInstance* site_instance, | 156 void RegisterExtensionSiteInstance(SiteInstance* site_instance, |
157 const Extension* extension); | 157 const Extension* extension); |
158 | 158 |
159 // Unregisters the extension associated with |site_instance|. | 159 // Unregisters the extension associated with |site_instance|. |
160 void UnregisterExtensionSiteInstance(SiteInstance* site_instance); | 160 void UnregisterExtensionSiteInstance(SiteInstance* site_instance); |
161 | 161 |
162 // Contains all extension-related RenderViewHost instances for all extensions. | 162 // Contains all extension-related RenderViewHost instances for all extensions. |
163 typedef std::set<RenderViewHost*> RenderViewHostSet; | 163 typedef std::set<RenderViewHost*> RenderViewHostSet; |
164 RenderViewHostSet all_extension_views_; | 164 RenderViewHostSet all_extension_views_; |
165 | 165 |
166 private: | |
167 // Close the given |host| iff it's a background page. | 166 // Close the given |host| iff it's a background page. |
168 void CloseBackgroundHost(ExtensionHost* host); | 167 void CloseBackgroundHost(ExtensionHost* host); |
169 | 168 |
170 // Excludes background page. | 169 // Excludes background page. |
171 bool HasVisibleViews(const std::string& extension_id); | 170 bool HasVisibleViews(const std::string& extension_id); |
172 | 171 |
173 // Clears the mapping for the specified site instance. Returns the process the | 172 // Clears the mapping for the specified site instance. Returns the process the |
174 // site was mapped to, or -1 if it wasn't found. | 173 // site was mapped to, or -1 if it wasn't found. |
175 int ClearSiteInstanceID(int site_instance_id); | 174 int ClearSiteInstanceID(int site_instance_id); |
176 | 175 |
177 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); | 176 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); |
178 }; | 177 }; |
179 | 178 |
180 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 179 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
OLD | NEW |