Chromium Code Reviews

Side by Side Diff: chrome/browser/tab_contents/site_instance.h

Issue 126002: Group renderer processes by privilige when we hit the max process count.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_TAB_CONTENTS_SITE_INSTANCE_H_ 5 #ifndef CHROME_BROWSER_TAB_CONTENTS_SITE_INSTANCE_H_
6 #define CHROME_BROWSER_TAB_CONTENTS_SITE_INSTANCE_H_ 6 #define CHROME_BROWSER_TAB_CONTENTS_SITE_INSTANCE_H_
7 7
8 #include "chrome/browser/browsing_instance.h" 8 #include "chrome/browser/browsing_instance.h"
9 #include "chrome/browser/renderer_host/render_process_host.h" 9 #include "chrome/browser/renderer_host/render_process_host.h"
10 #include "chrome/common/notification_registrar.h" 10 #include "chrome/common/notification_registrar.h"
(...skipping 120 matching lines...)
131 static bool IsSameWebSite(const GURL& url1, const GURL& url2); 131 static bool IsSameWebSite(const GURL& url1, const GURL& url2);
132 132
133 protected: 133 protected:
134 friend class BrowsingInstance; 134 friend class BrowsingInstance;
135 135
136 // Create a new SiteInstance. Protected to give access to BrowsingInstance 136 // Create a new SiteInstance. Protected to give access to BrowsingInstance
137 // and tests; most callers should use CreateSiteInstance or 137 // and tests; most callers should use CreateSiteInstance or
138 // GetRelatedSiteInstance instead. 138 // GetRelatedSiteInstance instead.
139 SiteInstance(BrowsingInstance* browsing_instance); 139 SiteInstance(BrowsingInstance* browsing_instance);
140 140
141 // Returns the type of renderer process this instance belongs in, for grouping
142 // purposes.
143 RenderProcessHost::Type GetRendererType();
144
141 private: 145 private:
142 // NotificationObserver implementation. 146 // NotificationObserver implementation.
143 void Observe(NotificationType type, 147 void Observe(NotificationType type,
144 const NotificationSource& source, 148 const NotificationSource& source,
145 const NotificationDetails& details); 149 const NotificationDetails& details);
146 150
147 NotificationRegistrar registrar_; 151 NotificationRegistrar registrar_;
148 152
149 // BrowsingInstance to which this SiteInstance belongs. 153 // BrowsingInstance to which this SiteInstance belongs.
150 scoped_refptr<BrowsingInstance> browsing_instance_; 154 scoped_refptr<BrowsingInstance> browsing_instance_;
(...skipping 16 matching lines...)
167 // The web site that this SiteInstance is rendering pages for. 171 // The web site that this SiteInstance is rendering pages for.
168 GURL site_; 172 GURL site_;
169 173
170 // Whether SetSite has been called. 174 // Whether SetSite has been called.
171 bool has_site_; 175 bool has_site_;
172 176
173 DISALLOW_EVIL_CONSTRUCTORS(SiteInstance); 177 DISALLOW_EVIL_CONSTRUCTORS(SiteInstance);
174 }; 178 };
175 179
176 #endif // CHROME_BROWSER_TAB_CONTENTS_SITE_INSTANCE_H_ 180 #endif // CHROME_BROWSER_TAB_CONTENTS_SITE_INSTANCE_H_
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/render_process_host.cc ('k') | chrome/browser/tab_contents/site_instance.cc » ('j') | no next file with comments »

Powered by Google App Engine