Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: content/browser/site_instance_impl.cc

Issue 1685213002: Propagate window coordinates to out-of-process iframes renderers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@sendscreenrects
Patch Set: fixing ordering in DepictFrameTree Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 28 matching lines...) Expand all
39 process_->RemoveObserver(this); 39 process_->RemoveObserver(this);
40 40
41 // Now that no one is referencing us, we can safely remove ourselves from 41 // Now that no one is referencing us, we can safely remove ourselves from
42 // the BrowsingInstance. Any future visits to a page from this site 42 // the BrowsingInstance. Any future visits to a page from this site
43 // (within the same BrowsingInstance) can safely create a new SiteInstance. 43 // (within the same BrowsingInstance) can safely create a new SiteInstance.
44 if (has_site_) 44 if (has_site_)
45 browsing_instance_->UnregisterSiteInstance( 45 browsing_instance_->UnregisterSiteInstance(
46 static_cast<SiteInstance*>(this)); 46 static_cast<SiteInstance*>(this));
47 } 47 }
48 48
49 int32_t SiteInstanceImpl::GetId() { 49 int32_t SiteInstanceImpl::GetId() const {
50 return id_; 50 return id_;
51 } 51 }
52 52
53 bool SiteInstanceImpl::HasProcess() const { 53 bool SiteInstanceImpl::HasProcess() const {
54 if (process_ != NULL) 54 if (process_ != NULL)
55 return true; 55 return true;
56 56
57 // If we would use process-per-site for this site, also check if there is an 57 // If we would use process-per-site for this site, also check if there is an
58 // existing process that we would use if GetProcess() were called. 58 // existing process that we would use if GetProcess() were called.
59 BrowserContext* browser_context = 59 BrowserContext* browser_context =
(...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 browsing_instance_->browser_context(), site_)) 422 browsing_instance_->browser_context(), site_))
423 return; 423 return;
424 424
425 ChildProcessSecurityPolicyImpl* policy = 425 ChildProcessSecurityPolicyImpl* policy =
426 ChildProcessSecurityPolicyImpl::GetInstance(); 426 ChildProcessSecurityPolicyImpl::GetInstance();
427 policy->LockToOrigin(process_->GetID(), site_); 427 policy->LockToOrigin(process_->GetID(), site_);
428 } 428 }
429 } 429 }
430 430
431 } // namespace content 431 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698