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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 const ViewSet GetAllViews() const; | 54 const ViewSet GetAllViews() const; |
55 | 55 |
56 // The typical observer interface. | 56 // The typical observer interface. |
57 void AddObserver(ProcessManagerObserver* observer); | 57 void AddObserver(ProcessManagerObserver* observer); |
58 void RemoveObserver(ProcessManagerObserver* observer); | 58 void RemoveObserver(ProcessManagerObserver* observer); |
59 | 59 |
60 // Creates a new UI-less extension instance. Like CreateViewHost, but not | 60 // Creates a new UI-less extension instance. Like CreateViewHost, but not |
61 // displayed anywhere. Returns false if no background host can be created, | 61 // displayed anywhere. Returns false if no background host can be created, |
62 // for example for hosted apps and extensions that aren't enabled in | 62 // for example for hosted apps and extensions that aren't enabled in |
63 // Incognito. | 63 // Incognito. |
64 virtual bool CreateBackgroundHost(const Extension* extension, | 64 virtual bool CreateBackgroundHost( |
65 const GURL& url); | 65 const Extension* extension, |
| 66 const GURL& url, |
| 67 const base::Closure& continuation = base::Closure()); |
66 | 68 |
67 // Gets the ExtensionHost for the background page for an extension, or NULL if | 69 // Gets the ExtensionHost for the background page for an extension, or NULL if |
68 // the extension isn't running or doesn't have a background page. | 70 // the extension isn't running or doesn't have a background page. |
69 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id); | 71 ExtensionHost* GetBackgroundHostForExtension(const std::string& extension_id); |
70 | 72 |
71 // Returns the SiteInstance that the given URL belongs to. | 73 // Returns the SiteInstance that the given URL belongs to. |
72 // TODO(aa): This only returns correct results for extensions and packaged | 74 // TODO(aa): This only returns correct results for extensions and packaged |
73 // apps, not hosted apps. | 75 // apps, not hosted apps. |
74 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); | 76 virtual content::SiteInstance* GetSiteInstanceForURL(const GURL& url); |
75 | 77 |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
247 ObserverList<ProcessManagerObserver> observer_list_; | 249 ObserverList<ProcessManagerObserver> observer_list_; |
248 | 250 |
249 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; | 251 base::WeakPtrFactory<ProcessManager> weak_ptr_factory_; |
250 | 252 |
251 DISALLOW_COPY_AND_ASSIGN(ProcessManager); | 253 DISALLOW_COPY_AND_ASSIGN(ProcessManager); |
252 }; | 254 }; |
253 | 255 |
254 } // namespace extensions | 256 } // namespace extensions |
255 | 257 |
256 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ | 258 #endif // EXTENSIONS_BROWSER_PROCESS_MANAGER_H_ |
OLD | NEW |