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

Unified Diff: content/browser/site_instance_impl.h

Issue 166533002: [wip] Introduce SiteInstanceKeepAlive. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/site_instance_impl.h
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index edaeb3e702d75910effe7b4064ba20a3396ad84e..8377f539ae841f35af242fa9b42228cb6b8bce64 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -13,6 +13,7 @@
namespace content {
class RenderProcessHostFactory;
+class SiteInstanceKeepAlive;
class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
public RenderProcessHostObserver {
@@ -26,6 +27,8 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
virtual bool IsRelatedSiteInstance(const SiteInstance* instance) OVERRIDE;
virtual BrowserContext* GetBrowserContext() const OVERRIDE;
+ scoped_ptr<SiteInstanceKeepAlive> AcquireKeepAlive();
+
// Set the web site that this SiteInstance is rendering pages for.
// This includes the scheme and registered domain, but not the port. If the
// URL does not have a valid registered domain, then the full hostname is
@@ -124,6 +127,17 @@ class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance,
DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl);
};
+class CONTENT_EXPORT SiteInstanceKeepAlive {
+ public:
+ explicit SiteInstanceKeepAlive(scoped_refptr<SiteInstanceImpl> instance);
mfomitchev 2014/02/14 16:21:36 Perhaps we should make this constructor non-puibli
+ ~SiteInstanceKeepAlive();
+
+ private:
+ scoped_refptr<SiteInstanceImpl> instance_;
+
+ DISALLOW_COPY_AND_ASSIGN(SiteInstanceKeepAlive);
+};
+
} // namespace content
#endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698