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_PROCESS_MANAGER_H_ | 5 #ifndef EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 6 #define EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 // for example for hosted apps and extensions that aren't enabled in | 66 // for example for hosted apps and extensions that aren't enabled in |
67 // Incognito. | 67 // Incognito. |
68 virtual bool CreateBackgroundHost(const Extension* extension, | 68 virtual bool CreateBackgroundHost(const Extension* extension, |
69 const GURL& url); | 69 const GURL& url); |
70 | 70 |
71 // Gets the ExtensionHost for the background page for an extension, or NULL if | 71 // Gets the ExtensionHost for the background page for an extension, or NULL if |
72 // the extension isn't running or doesn't have a background page. | 72 // the extension isn't running or doesn't have a background page. |
73 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id); | 73 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id); |
74 | 74 |
75 // Returns the SiteInstance that the given URL belongs to. | 75 // Returns the SiteInstance that the given URL belongs to. |
| 76 // Callers should wrap the result in a scoped_refptr to ensure the |
| 77 // SiteInstance becomes refcounted. |
| 78 // TODO(devlin): The above comment clearly indicates that this should just |
| 79 // return a refptr. Update callers. |
76 // TODO(aa): This only returns correct results for extensions and packaged | 80 // TODO(aa): This only returns correct results for extensions and packaged |
77 // apps, not hosted apps. | 81 // apps, not hosted apps. |
78 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); | 82 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); |
79 | 83 |
80 // If the view isn't keeping the lazy background page alive, increments the | 84 // If the view isn't keeping the lazy background page alive, increments the |
81 // keepalive count to do so. | 85 // keepalive count to do so. |
82 void AcquireLazyKeepaliveCountForView( | 86 void AcquireLazyKeepaliveCountForView( |
83 content::RenderViewHost* render_view_host); | 87 content::RenderViewHost* render_view_host); |
84 | 88 |
85 // If the view is keeping the lazy background page alive, decrements the | 89 // If the view is keeping the lazy background page alive, decrements the |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 | 303 |
300 // Must be last member, see doc on WeakPtrFactory. | 304 // Must be last member, see doc on WeakPtrFactory. |
301 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; | 305 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; |
302 | 306 |
303 DISALLOW_COPY_AND_ASSIGN(ProcessManager); | 307 DISALLOW_COPY_AND_ASSIGN(ProcessManager); |
304 }; | 308 }; |
305 | 309 |
306 } // namespace extensions | 310 } // namespace extensions |
307 | 311 |
308 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 312 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
OLD | NEW |