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

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: Oops 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 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
700 if (::logging::GetMinLogLevel() <= resolved_level && 700 if (::logging::GetMinLogLevel() <= resolved_level &&
701 (is_web_ui || 701 (is_web_ui ||
702 !GetSiteInstance()->GetBrowserContext()->IsOffTheRecord())) { 702 !GetSiteInstance()->GetBrowserContext()->IsOffTheRecord())) {
703 logging::LogMessage("CONSOLE", line_no, resolved_level).stream() 703 logging::LogMessage("CONSOLE", line_no, resolved_level).stream()
704 << "\"" << message << "\", source: " << source_id << " (" << line_no 704 << "\"" << message << "\", source: " << source_id << " (" << line_no
705 << ")"; 705 << ")";
706 } 706 }
707 } 707 }
708 708
709 void RenderFrameHostImpl::OnCreateChildFrame(int new_routing_id, 709 void RenderFrameHostImpl::OnCreateChildFrame(int new_routing_id,
710 blink::WebTreeScopeType scope,
710 const std::string& frame_name, 711 const std::string& frame_name,
711 SandboxFlags sandbox_flags) { 712 SandboxFlags sandbox_flags) {
712 // It is possible that while a new RenderFrameHost was committed, the 713 // It is possible that while a new RenderFrameHost was committed, the
713 // RenderFrame corresponding to this host sent an IPC message to create a 714 // RenderFrame corresponding to this host sent an IPC message to create a
714 // frame and it is delivered after this host is swapped out. 715 // frame and it is delivered after this host is swapped out.
715 // Ignore such messages, as we know this RenderFrameHost is going away. 716 // Ignore such messages, as we know this RenderFrameHost is going away.
716 if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT) 717 if (rfh_state_ != RenderFrameHostImpl::STATE_DEFAULT)
717 return; 718 return;
718 719
719 RenderFrameHostImpl* new_frame = 720 RenderFrameHostImpl* new_frame =
720 frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(), 721 frame_tree_->AddFrame(frame_tree_node_, GetProcess()->GetID(),
721 new_routing_id, frame_name, sandbox_flags); 722 new_routing_id, scope, frame_name, sandbox_flags);
722 if (!new_frame) 723 if (!new_frame)
723 return; 724 return;
724 725
725 // We know that the RenderFrame has been created in this case, immediately 726 // We know that the RenderFrame has been created in this case, immediately
726 // after the CreateChildFrame IPC was sent. 727 // after the CreateChildFrame IPC was sent.
727 new_frame->SetRenderFrameCreated(true); 728 new_frame->SetRenderFrameCreated(true);
728 } 729 }
729 730
730 void RenderFrameHostImpl::OnDetach() { 731 void RenderFrameHostImpl::OnDetach() {
731 frame_tree_->RemoveFrame(frame_tree_node_); 732 frame_tree_->RemoveFrame(frame_tree_node_);
(...skipping 1361 matching lines...) Expand 10 before | Expand all | Expand 10 after
2093 // We may be returning to an existing NavigationEntry that had been granted 2094 // We may be returning to an existing NavigationEntry that had been granted
2094 // file access. If this is a different process, we will need to grant the 2095 // file access. If this is a different process, we will need to grant the
2095 // access again. The files listed in the page state are validated when they 2096 // access again. The files listed in the page state are validated when they
2096 // are received from the renderer to prevent abuse. 2097 // are received from the renderer to prevent abuse.
2097 if (request_params.page_state.IsValid()) { 2098 if (request_params.page_state.IsValid()) {
2098 render_view_host_->GrantFileAccessFromPageState(request_params.page_state); 2099 render_view_host_->GrantFileAccessFromPageState(request_params.page_state);
2099 } 2100 }
2100 } 2101 }
2101 2102
2102 } // namespace content 2103 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698