OLD | NEW |
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 CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 6 #define CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
7 | 7 |
8 #include "content/browser/renderer_host/render_process_host_impl.h" | 8 #include "content/browser/renderer_host/render_process_host_impl.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 #include "content/public/browser/render_process_host_observer.h" | 10 #include "content/public/browser/render_process_host_observer.h" |
11 #include "content/public/browser/site_instance.h" | 11 #include "content/public/browser/site_instance.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 namespace content { | 14 namespace content { |
15 class BrowsingInstance; | 15 class BrowsingInstance; |
16 class RenderProcessHostFactory; | 16 class RenderProcessHostFactory; |
17 | 17 |
18 class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance, | 18 class CONTENT_EXPORT SiteInstanceImpl : public SiteInstance, |
19 public RenderProcessHostObserver { | 19 public RenderProcessHostObserver { |
20 public: | 20 public: |
21 // SiteInstance interface overrides. | 21 // SiteInstance interface overrides. |
22 int32 GetId() override; | 22 int32 GetId() override; |
23 bool HasProcess() const override; | 23 bool HasProcess() const override; |
24 RenderProcessHost* GetProcess() override; | 24 RenderProcessHost* GetProcess() override; |
25 BrowserContext* GetBrowserContext() const override; | 25 BrowserContext* GetBrowserContext() const override; |
26 const GURL& GetSiteURL() const override; | 26 const GURL& GetSiteURL() const override; |
27 SiteInstance* GetRelatedSiteInstance(const GURL& url) override; | 27 SiteInstance* GetRelatedSiteInstance(const GURL& url) override; |
28 bool IsRelatedSiteInstance(const SiteInstance* instance) override; | 28 bool IsRelatedSiteInstance(const SiteInstance* instance) override; |
29 size_t GetRelatedActiveContentsCount() override; | 29 size_t GetRelatedActiveContentsCount() override; |
| 30 bool RequiresDedicatedProcess() override; |
30 | 31 |
31 // Set the web site that this SiteInstance is rendering pages for. | 32 // Set the web site that this SiteInstance is rendering pages for. |
32 // This includes the scheme and registered domain, but not the port. If the | 33 // This includes the scheme and registered domain, but not the port. If the |
33 // URL does not have a valid registered domain, then the full hostname is | 34 // URL does not have a valid registered domain, then the full hostname is |
34 // stored. | 35 // stored. |
35 void SetSite(const GURL& url); | 36 void SetSite(const GURL& url); |
36 bool HasSite() const; | 37 bool HasSite() const; |
37 | 38 |
38 // Returns whether there is currently a related SiteInstance (registered with | 39 // Returns whether there is currently a related SiteInstance (registered with |
39 // BrowsingInstance) for the site of the given url. If so, we should try to | 40 // BrowsingInstance) for the site of the given url. If so, we should try to |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 130 |
130 // Whether SetSite has been called. | 131 // Whether SetSite has been called. |
131 bool has_site_; | 132 bool has_site_; |
132 | 133 |
133 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); | 134 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); |
134 }; | 135 }; |
135 | 136 |
136 } // namespace content | 137 } // namespace content |
137 | 138 |
138 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 139 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
OLD | NEW |