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/notification_observer.h" | 10 #include "content/public/browser/notification_observer.h" |
11 #include "content/public/browser/notification_registrar.h" | 11 #include "content/public/browser/notification_registrar.h" |
12 #include "content/public/browser/site_instance.h" | 12 #include "content/public/browser/site_instance.h" |
13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
14 | 14 |
15 namespace content { | 15 namespace content { |
16 class RenderProcessHostFactory; | 16 class RenderProcessHostFactory; |
17 } | 17 } |
18 | 18 |
19 class CONTENT_EXPORT SiteInstanceImpl : public content::SiteInstance, | 19 class CONTENT_EXPORT SiteInstanceImpl : public content::SiteInstance, |
20 public content::NotificationObserver { | 20 public content::NotificationObserver { |
21 public: | 21 public: |
22 // content::SiteInstance interface overrides. | 22 // content::SiteInstance interface overrides. |
23 virtual int32 GetId() OVERRIDE; | 23 virtual int32 GetId() OVERRIDE; |
24 virtual bool HasProcess() const OVERRIDE; | 24 virtual bool HasProcess() const OVERRIDE; |
25 virtual content::RenderProcessHost* GetProcess() OVERRIDE; | 25 virtual content::RenderProcessHost* GetProcess() OVERRIDE; |
26 virtual const GURL& GetSite() const OVERRIDE; | 26 virtual const GURL& GetSiteURL() const OVERRIDE; |
27 virtual SiteInstance* GetRelatedSiteInstance(const GURL& url) OVERRIDE; | 27 virtual SiteInstance* GetRelatedSiteInstance(const GURL& url) OVERRIDE; |
28 virtual bool IsRelatedSiteInstance(const SiteInstance* instance) OVERRIDE; | 28 virtual bool IsRelatedSiteInstance(const SiteInstance* instance) OVERRIDE; |
29 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; | 29 virtual content::BrowserContext* GetBrowserContext() const OVERRIDE; |
30 | 30 |
31 // Set the web site that this SiteInstance is rendering pages for. | 31 // 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 | 32 // 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 | 33 // URL does not have a valid registered domain, then the full hostname is |
34 // stored. | 34 // stored. |
35 void SetSite(const GURL& url); | 35 void SetSite(const GURL& url); |
36 bool HasSite() const; | 36 bool HasSite() const; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 // The web site that this SiteInstance is rendering pages for. | 108 // The web site that this SiteInstance is rendering pages for. |
109 GURL site_; | 109 GURL site_; |
110 | 110 |
111 // Whether SetSite has been called. | 111 // Whether SetSite has been called. |
112 bool has_site_; | 112 bool has_site_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); | 114 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); |
115 }; | 115 }; |
116 | 116 |
117 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 117 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
OLD | NEW |