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

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

Issue 2729253005: Fix PlatformAppBrowserTest.AppWindowIframe. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 void RenderFrameHostImpl::OnCreateChildFrame( 1011 void RenderFrameHostImpl::OnCreateChildFrame(
1012 int new_routing_id, 1012 int new_routing_id,
1013 blink::WebTreeScopeType scope, 1013 blink::WebTreeScopeType scope,
1014 const std::string& frame_name, 1014 const std::string& frame_name,
1015 const std::string& frame_unique_name, 1015 const std::string& frame_unique_name,
1016 blink::WebSandboxFlags sandbox_flags, 1016 blink::WebSandboxFlags sandbox_flags,
1017 const FrameOwnerProperties& frame_owner_properties) { 1017 const FrameOwnerProperties& frame_owner_properties) {
1018 // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty. 1018 // TODO(lukasza): Call ReceivedBadMessage when |frame_unique_name| is empty.
1019 DCHECK(!frame_unique_name.empty()); 1019 DCHECK(!frame_unique_name.empty());
1020 1020
1021 // It is possible that while a new RenderFrameHost was committed, the 1021 // The RenderFrame corresponding to this host sent an IPC message to create a
1022 // RenderFrame corresponding to this host sent an IPC message to create a 1022 // child, but by the time we get here, it's possible for the host to have been
1023 // frame and it is delivered after this host is swapped out. 1023 // swapped out, or for its process to have disconnected (maybe due to browser
1024 // Ignore such messages, as we know this RenderFrameHost is going away. 1024 // shutdown). Ignore such messages.
1025 if (!is_active() || frame_tree_node_->current_frame_host() != this) 1025 if (!is_active() || frame_tree_node_->current_frame_host() != this ||
1026 !render_frame_created_)
1026 return; 1027 return;
1027 1028
1028 frame_tree_->AddFrame( 1029 frame_tree_->AddFrame(
1029 frame_tree_node_, GetProcess()->GetID(), new_routing_id, scope, 1030 frame_tree_node_, GetProcess()->GetID(), new_routing_id, scope,
1030 frame_name, frame_unique_name, sandbox_flags, frame_owner_properties); 1031 frame_name, frame_unique_name, sandbox_flags, frame_owner_properties);
1031 } 1032 }
1032 1033
1033 void RenderFrameHostImpl::OnCreateNewWindow( 1034 void RenderFrameHostImpl::OnCreateNewWindow(
1034 int32_t render_view_route_id, 1035 int32_t render_view_route_id,
1035 int32_t main_frame_route_id, 1036 int32_t main_frame_route_id,
(...skipping 2456 matching lines...) Expand 10 before | Expand all | Expand 10 after
3492 // There is no pending NavigationEntry in these cases, so pass 0 as the 3493 // There is no pending NavigationEntry in these cases, so pass 0 as the
3493 // pending_nav_entry_id. If the previous handle was a prematurely aborted 3494 // pending_nav_entry_id. If the previous handle was a prematurely aborted
3494 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. 3495 // navigation loaded via LoadDataWithBaseURL, propagate the entry id.
3495 return NavigationHandleImpl::Create( 3496 return NavigationHandleImpl::Create(
3496 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, 3497 params.url, params.redirects, frame_tree_node_, is_renderer_initiated,
3497 params.was_within_same_page, base::TimeTicks::Now(), 3498 params.was_within_same_page, base::TimeTicks::Now(),
3498 entry_id_for_data_nav, false); // started_from_context_menu 3499 entry_id_for_data_nav, false); // started_from_context_menu
3499 } 3500 }
3500 3501
3501 } // namespace content 3502 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/apps/app_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698