OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 29 matching lines...) Expand all Loading... |
40 | 40 |
41 // Creates a new UI-less extension instance. Like CreateView, but not | 41 // Creates a new UI-less extension instance. Like CreateView, but not |
42 // displayed anywhere. | 42 // displayed anywhere. |
43 ExtensionHost* CreateBackgroundHost(Extension* extension, const GURL& url); | 43 ExtensionHost* CreateBackgroundHost(Extension* extension, const GURL& url); |
44 | 44 |
45 // Returns the SiteInstance that the given URL belongs to. | 45 // Returns the SiteInstance that the given URL belongs to. |
46 SiteInstance* GetSiteInstanceForURL(const GURL& url); | 46 SiteInstance* GetSiteInstanceForURL(const GURL& url); |
47 | 47 |
48 // Register an extension process by |extension_id| and specifying which | 48 // Register an extension process by |extension_id| and specifying which |
49 // |process_id| it belongs to. | 49 // |process_id| it belongs to. |
50 void RegisterExtensionProcess(std::string extension_id, int process_id); | 50 void RegisterExtensionProcess(const std::string& extension_id, |
| 51 int process_id); |
51 | 52 |
52 // Unregister an extension process with specified |process_id|. | 53 // Unregister an extension process with specified |process_id|. |
53 void UnregisterExtensionProcess(int process_id); | 54 void UnregisterExtensionProcess(int process_id); |
54 | 55 |
55 // NotificationObserver: | 56 // NotificationObserver: |
56 virtual void Observe(NotificationType type, | 57 virtual void Observe(NotificationType type, |
57 const NotificationSource& source, | 58 const NotificationSource& source, |
58 const NotificationDetails& details); | 59 const NotificationDetails& details); |
59 | 60 |
60 typedef std::set<ExtensionHost*> ExtensionHostSet; | 61 typedef std::set<ExtensionHost*> ExtensionHostSet; |
(...skipping 18 matching lines...) Expand all Loading... |
79 scoped_refptr<BrowsingInstance> browsing_instance_; | 80 scoped_refptr<BrowsingInstance> browsing_instance_; |
80 | 81 |
81 // A map of extension ID to the render_process_id that the extension lives in. | 82 // A map of extension ID to the render_process_id that the extension lives in. |
82 typedef std::map<std::string, int> ProcessIDMap; | 83 typedef std::map<std::string, int> ProcessIDMap; |
83 ProcessIDMap process_ids_; | 84 ProcessIDMap process_ids_; |
84 | 85 |
85 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); | 86 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); |
86 }; | 87 }; |
87 | 88 |
88 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ | 89 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ |
OLD | NEW |