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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // process-per-site and ServiceWorkers proactively join a process that already | 57 // process-per-site and ServiceWorkers proactively join a process that already |
58 // contains the site. | 58 // contains the site. |
59 enum class ProcessReusePolicy { | 59 enum class ProcessReusePolicy { |
60 // In this mode, all instances of the site will be hosted in the same | 60 // In this mode, all instances of the site will be hosted in the same |
61 // RenderProcessHost. | 61 // RenderProcessHost. |
62 PROCESS_PER_SITE, | 62 PROCESS_PER_SITE, |
63 | 63 |
64 // In this mode, subframes will be hosted in a designated RenderProcessHost. | 64 // In this mode, subframes will be hosted in a designated RenderProcessHost. |
65 USE_DEFAULT_SUBFRAME_PROCESS, | 65 USE_DEFAULT_SUBFRAME_PROCESS, |
66 | 66 |
| 67 // In this mode, the site will be rendered in a RenderProcessHost that is |
| 68 // already in use for the site, either for a pending navigation or a |
| 69 // committed navigation. If none exists, a new process will be created. If |
| 70 // multiple such processes exist, ones that have foreground frames are given |
| 71 // priority, and otherwise one is selected randomly. |
| 72 REUSE_PENDING_OR_COMMITTED_SITE, |
| 73 |
67 // By default, a new RenderProcessHost will be created unless the process | 74 // By default, a new RenderProcessHost will be created unless the process |
68 // limit has been reached. The RenderProcessHost reused will be chosen | 75 // limit has been reached. The RenderProcessHost reused will be chosen |
69 // randomly and not based on the site. | 76 // randomly and not based on the site. |
70 DEFAULT, | 77 DEFAULT, |
71 }; | 78 }; |
72 | 79 |
73 void set_process_reuse_policy(ProcessReusePolicy policy) { | 80 void set_process_reuse_policy(ProcessReusePolicy policy) { |
74 process_reuse_policy_ = policy; | 81 process_reuse_policy_ = policy; |
75 } | 82 } |
76 ProcessReusePolicy process_reuse_policy() const { | 83 ProcessReusePolicy process_reuse_policy() const { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 ProcessReusePolicy process_reuse_policy_; | 207 ProcessReusePolicy process_reuse_policy_; |
201 | 208 |
202 base::ObserverList<Observer, true> observers_; | 209 base::ObserverList<Observer, true> observers_; |
203 | 210 |
204 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); | 211 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); |
205 }; | 212 }; |
206 | 213 |
207 } // namespace content | 214 } // namespace content |
208 | 215 |
209 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 216 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
OLD | NEW |