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

Side by Side Diff: content/browser/frame_host/render_frame_host_impl.cc

Issue 1141283002: Replicate whether a frame is in a document or shadow tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix typo Created 5 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/frame_host/render_frame_host_impl.h" 5 #include "content/browser/frame_host/render_frame_host_impl.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/containers/hash_tables.h" 9 #include "base/containers/hash_tables.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 if (::logging::GetMinLogLevel() <= resolved_level && 699 if (::logging::GetMinLogLevel() <= resolved_level &&
700 (is_web_ui || 700 (is_web_ui ||
701 !GetSiteInstance()->GetBrowserContext()->IsOffTheRecord())) { 701 !GetSiteInstance()->GetBrowserContext()->IsOffTheRecord())) {
702 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() 702 logging::LogMessage("CONSOLE", line_no, resolved_level).stream()
703 << "\"" << message << "\", source: " << source_id << " (" << line_no 703 << "\"" << message << "\", source: " << source_id << " (" << line_no
704 << ")"; 704 << ")";
705 } 705 }
706 } 706 }
707 707
708 void RenderFrameHostImpl::OnCreateChildFrame(int new_routing_id, 708 void RenderFrameHostImpl::OnCreateChildFrame(int new_routing_id,
709 blink::WebTreeScopeType scope,
709 const std::string& frame_name, 710 const std::string& frame_name,
710 SandboxFlags sandbox_flags) { 711 SandboxFlags sandbox_flags) {
711 // It is possible that while a new RenderFrameHost was committed, the 712 // It is possible that while a new RenderFrameHost was committed, the
712 // RenderFrame corresponding to this host sent an IPC message to create a 713 // RenderFrame corresponding to this host sent an IPC message to create a
713 // frame and it is delivered after this host is swapped out. 714 // frame and it is delivered after this host is swapped out.
714 // Ignore such messages, as we know this RenderFrameHost is going away. 715 // Ignore such messages, as we know this RenderFrameHost is going away.
715 if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT) 716 if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT)
716 return; 717 return;
717 718
718 RenderFrameHostImpl* new_frame = 719 RenderFrameHostImpl* new_frame =
719 frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(), 720 frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(),
720 new_routing_id, frame_name, sandbox_flags); 721 new_routing_id, scope, frame_name, sandbox_flags);
721 if (!new_frame) 722 if (!new_frame)
722 return; 723 return;
723 724
724 // We know that the RenderFrame has been created in this case, immediately 725 // We know that the RenderFrame has been created in this case, immediately
725 // after the CreateChildFrame IPC was sent. 726 // after the CreateChildFrame IPC was sent.
726 new_frame->SetRenderFrameCreated(true); 727 new_frame->SetRenderFrameCreated(true);
727 } 728 }
728 729
729 void RenderFrameHostImpl::OnDetach() { 730 void RenderFrameHostImpl::OnDetach() {
730 frame_tree_->RemoveFrame(frame_tree_node_); 731 frame_tree_->RemoveFrame(frame_tree_node_);
(...skipping 1336 matching lines...) Expand 10 before | Expand all | Expand 10 after
2067 // We may be returning to an existing NavigationEntry that had been granted 2068 // We may be returning to an existing NavigationEntry that had been granted
2068 // file access. If this is a different process, we will need to grant the 2069 // file access. If this is a different process, we will need to grant the
2069 // access again. The files listed in the page state are validated when they 2070 // access again. The files listed in the page state are validated when they
2070 // are received from the renderer to prevent abuse. 2071 // are received from the renderer to prevent abuse.
2071 if (request_params.page_state.IsValid()) { 2072 if (request_params.page_state.IsValid()) {
2072 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); 2073 render_view_host_->GrantFileAccessFromPageState(request_params.page_state);
2073 } 2074 }
2074 } 2075 }
2075 2076
2076 } // namespace content 2077 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698