Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_RENDERER_HOST_SITE_INSTANCE_H_ | 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ | 6 #define CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "content/browser/renderer_host/render_process_host_impl.h" | 9 #include "content/browser/renderer_host/render_process_host_impl.h" |
| 10 #include "content/common/content_export.h" | 10 #include "content/common/content_export.h" |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 67 // | 67 // |
| 68 // The factory must outlive the SiteInstance; ownership is not transferred. It | 68 // The factory must outlive the SiteInstance; ownership is not transferred. It |
| 69 // may be NULL, in which case the default BrowserRenderProcessHost will be | 69 // may be NULL, in which case the default BrowserRenderProcessHost will be |
| 70 // created (this is the behavior if you don't call this function). | 70 // created (this is the behavior if you don't call this function). |
| 71 void set_render_process_host_factory( | 71 void set_render_process_host_factory( |
| 72 content::RenderProcessHostFactory* rph_factory) { | 72 content::RenderProcessHostFactory* rph_factory) { |
| 73 render_process_host_factory_ = rph_factory; | 73 render_process_host_factory_ = rph_factory; |
| 74 } | 74 } |
| 75 | 75 |
| 76 // Whether this SiteInstance has a running process associated with it. | 76 // Whether this SiteInstance has a running process associated with it. |
| 77 bool HasProcess() const; | 77 // Virtual to allow tests to extend it. |
| 78 virtual bool HasProcess() const; | |
|
awong
2012/01/12 22:56:41
It's unfortunate to have a partially-virtual inter
nasko
2012/01/13 01:34:50
I rewrote the test differently and now it doesn't
| |
| 78 | 79 |
| 79 // Returns the current process being used to render pages in this | 80 // Returns the current process being used to render pages in this |
| 80 // SiteInstance. If the process has crashed or otherwise gone away, then | 81 // SiteInstance. If the process has crashed or otherwise gone away, then |
| 81 // this method will create a new process and update our host ID accordingly. | 82 // this method will create a new process and update our host ID accordingly. |
| 82 content::RenderProcessHost* GetProcess(); | 83 content::RenderProcessHost* GetProcess(); |
| 83 | 84 |
| 84 // Set / Get the web site that this SiteInstance is rendering pages for. | 85 // Set / Get the web site that this SiteInstance is rendering pages for. |
| 85 // This includes the scheme and registered domain, but not the port. If the | 86 // This includes the scheme and registered domain, but not the port. If the |
| 86 // URL does not have a valid registered domain, then the full hostname is | 87 // URL does not have a valid registered domain, then the full hostname is |
| 87 // stored. | 88 // stored. |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 // The web site that this SiteInstance is rendering pages for. | 193 // The web site that this SiteInstance is rendering pages for. |
| 193 GURL site_; | 194 GURL site_; |
| 194 | 195 |
| 195 // Whether SetSite has been called. | 196 // Whether SetSite has been called. |
| 196 bool has_site_; | 197 bool has_site_; |
| 197 | 198 |
| 198 DISALLOW_COPY_AND_ASSIGN(SiteInstance); | 199 DISALLOW_COPY_AND_ASSIGN(SiteInstance); |
| 199 }; | 200 }; |
| 200 | 201 |
| 201 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ | 202 #endif // CONTENT_BROWSER_RENDERER_HOST_SITE_INSTANCE_H_ |
| OLD | NEW |