| 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 #include "content/browser/site_instance_impl.h" | 5 #include "content/browser/site_instance_impl.h" |
| 6 | 6 |
| 7 #include "content/browser/browsing_instance.h" | 7 #include "content/browser/browsing_instance.h" |
| 8 #include "content/browser/child_process_security_policy_impl.h" | 8 #include "content/browser/child_process_security_policy_impl.h" |
| 9 #include "content/browser/frame_host/debug_urls.h" | 9 #include "content/browser/frame_host/debug_urls.h" |
| 10 #include "content/browser/frame_host/frame_tree_node.h" | 10 #include "content/browser/frame_host/frame_tree_node.h" |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 return browsing_instance_->GetDefaultSubframeSiteInstance(); | 232 return browsing_instance_->GetDefaultSubframeSiteInstance(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 bool SiteInstanceImpl::RequiresDedicatedProcess() { | 235 bool SiteInstanceImpl::RequiresDedicatedProcess() { |
| 236 if (!has_site_) | 236 if (!has_site_) |
| 237 return false; | 237 return false; |
| 238 | 238 |
| 239 return DoesSiteRequireDedicatedProcess(GetBrowserContext(), site_); | 239 return DoesSiteRequireDedicatedProcess(GetBrowserContext(), site_); |
| 240 } | 240 } |
| 241 | 241 |
| 242 bool SiteInstanceImpl::IsDefaultSubframeSiteInstance() const { |
| 243 return is_default_subframe_site_instance_; |
| 244 } |
| 245 |
| 242 void SiteInstanceImpl::IncrementActiveFrameCount() { | 246 void SiteInstanceImpl::IncrementActiveFrameCount() { |
| 243 active_frame_count_++; | 247 active_frame_count_++; |
| 244 } | 248 } |
| 245 | 249 |
| 246 void SiteInstanceImpl::DecrementActiveFrameCount() { | 250 void SiteInstanceImpl::DecrementActiveFrameCount() { |
| 247 if (--active_frame_count_ == 0) { | 251 if (--active_frame_count_ == 0) { |
| 248 for (auto& observer : observers_) | 252 for (auto& observer : observers_) |
| 249 observer.ActiveFrameCountIsZero(this); | 253 observer.ActiveFrameCountIsZero(this); |
| 250 } | 254 } |
| 251 } | 255 } |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 436 browsing_instance_->browser_context(), site_)) | 440 browsing_instance_->browser_context(), site_)) |
| 437 return; | 441 return; |
| 438 | 442 |
| 439 ChildProcessSecurityPolicyImpl* policy = | 443 ChildProcessSecurityPolicyImpl* policy = |
| 440 ChildProcessSecurityPolicyImpl::GetInstance(); | 444 ChildProcessSecurityPolicyImpl::GetInstance(); |
| 441 policy->LockToOrigin(process_->GetID(), site_); | 445 policy->LockToOrigin(process_->GetID(), site_); |
| 442 } | 446 } |
| 443 } | 447 } |
| 444 | 448 |
| 445 } // namespace content | 449 } // namespace content |
| OLD | NEW |