Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: chrome/browser/extensions/extension_process_manager.h

Issue 9221017: Hide BrowsingInstance from all but SiteInstance, as intended by design. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make all methods non-public to help ensure BrowsingInstance design is preserved in future. Created 8 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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>
11 #include <string> 11 #include <string>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "content/public/common/view_type.h" 15 #include "content/public/common/view_type.h"
16 #include "content/public/browser/notification_observer.h" 16 #include "content/public/browser/notification_observer.h"
17 #include "content/public/browser/notification_registrar.h" 17 #include "content/public/browser/notification_registrar.h"
18 18
19 class Browser; 19 class Browser;
20 class BrowsingInstance;
21 class Extension; 20 class Extension;
22 class ExtensionHost; 21 class ExtensionHost;
23 class GURL; 22 class GURL;
24 class Profile; 23 class Profile;
25 class RenderViewHost; 24 class RenderViewHost;
26 class SiteInstance; 25 class SiteInstance;
27 26
28 // Manages dynamic state of running Chromium extensions. There is one instance 27 // Manages dynamic state of running Chromium extensions. There is one instance
29 // of this class per Profile. OTR Profiles have a separate instance that keeps 28 // of this class per Profile. OTR Profiles have a separate instance that keeps
30 // track of split-mode extensions only. 29 // track of split-mode extensions only.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 const content::NotificationDetails& details) OVERRIDE; 110 const content::NotificationDetails& details) OVERRIDE;
112 111
113 content::NotificationRegistrar registrar_; 112 content::NotificationRegistrar registrar_;
114 113
115 // The set of all ExtensionHosts managed by this process manager. 114 // The set of all ExtensionHosts managed by this process manager.
116 ExtensionHostSet all_hosts_; 115 ExtensionHostSet all_hosts_;
117 116
118 // The set of running viewless background extensions. 117 // The set of running viewless background extensions.
119 ExtensionHostSet background_hosts_; 118 ExtensionHostSet background_hosts_;
120 119
121 // The BrowsingInstance shared by all extensions in this profile. This 120 // A SiteInstance related to the SiteInstance for all extensions in
122 // controls process grouping. 121 // this profile. We create it in such a way that a new
123 scoped_refptr<BrowsingInstance> browsing_instance_; 122 // browsing instance is created. This controls process grouping.
123 scoped_refptr<SiteInstance> site_instance_;
124 124
125 private: 125 private:
126 // Contains all extension-related RenderViewHost instances for all extensions. 126 // Contains all extension-related RenderViewHost instances for all extensions.
127 typedef std::set<RenderViewHost*> RenderViewHostSet; 127 typedef std::set<RenderViewHost*> RenderViewHostSet;
128 RenderViewHostSet all_extension_views_; 128 RenderViewHostSet all_extension_views_;
129 129
130 // Close the given |host| iff it's a background page. 130 // Close the given |host| iff it's a background page.
131 void CloseBackgroundHost(ExtensionHost* host); 131 void CloseBackgroundHost(ExtensionHost* host);
132 132
133 // Excludes background page. 133 // Excludes background page.
134 bool HasVisibleViews(const std::string& extension_id); 134 bool HasVisibleViews(const std::string& extension_id);
135 135
136 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager); 136 DISALLOW_COPY_AND_ASSIGN(ExtensionProcessManager);
137 }; 137 };
138 138
139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_ 139 #endif // CHROME_BROWSER_EXTENSIONS_EXTENSION_PROCESS_MANAGER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698