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 suitable RenderProcessHost | |
68 // in priority, and a new RenderProcessHost will be created if none exist. A | |
69 // suitable RenderProcessHost is one that has a frame rendering the site, or | |
70 // that is expecting a navigation to the site. | |
71 REUSE_CHECKING_FRAMES_AND_NAVIGATIONS, | |
Charlie Reis
2017/05/15 03:41:52
I'll suggest REUSE_PENDING_OR_COMMITTED_SITE. Tha
clamy
2017/05/16 14:50:46
Done.
| |
72 | |
67 // By default, a new RenderProcessHost will be created unless the process | 73 // By default, a new RenderProcessHost will be created unless the process |
68 // limit has been reached. The RenderProcessHost reused will be chosen | 74 // limit has been reached. The RenderProcessHost reused will be chosen |
69 // randomly and not based on the site. | 75 // randomly and not based on the site. |
70 DEFAULT, | 76 DEFAULT, |
71 }; | 77 }; |
72 | 78 |
73 void set_process_reuse_policy(ProcessReusePolicy policy) { | 79 void set_process_reuse_policy(ProcessReusePolicy policy) { |
74 process_reuse_policy_ = policy; | 80 process_reuse_policy_ = policy; |
75 } | 81 } |
76 ProcessReusePolicy process_reuse_policy() const { | 82 ProcessReusePolicy process_reuse_policy() const { |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 ProcessReusePolicy process_reuse_policy_; | 206 ProcessReusePolicy process_reuse_policy_; |
201 | 207 |
202 base::ObserverList<Observer, true> observers_; | 208 base::ObserverList<Observer, true> observers_; |
203 | 209 |
204 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); | 210 DISALLOW_COPY_AND_ASSIGN(SiteInstanceImpl); |
205 }; | 211 }; |
206 | 212 |
207 } // namespace content | 213 } // namespace content |
208 | 214 |
209 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ | 215 #endif // CONTENT_BROWSER_SITE_INSTANCE_IMPL_H_ |
OLD | NEW |