OLD | NEW |
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 585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 | 596 |
597 AssociatedInterfaceProvider* | 597 AssociatedInterfaceProvider* |
598 RenderFrameHostImpl::GetRemoteAssociatedInterfaces() { | 598 RenderFrameHostImpl::GetRemoteAssociatedInterfaces() { |
599 if (!remote_associated_interfaces_) { | 599 if (!remote_associated_interfaces_) { |
600 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; | 600 mojom::AssociatedInterfaceProviderAssociatedPtr remote_interfaces; |
601 IPC::ChannelProxy* channel = GetProcess()->GetChannel(); | 601 IPC::ChannelProxy* channel = GetProcess()->GetChannel(); |
602 if (channel) { | 602 if (channel) { |
603 RenderProcessHostImpl* process = | 603 RenderProcessHostImpl* process = |
604 static_cast<RenderProcessHostImpl*>(GetProcess()); | 604 static_cast<RenderProcessHostImpl*>(GetProcess()); |
605 process->GetRemoteRouteProvider()->GetRoute( | 605 process->GetRemoteRouteProvider()->GetRoute( |
606 GetRoutingID(), | 606 GetRoutingID(), mojo::MakeRequest(&remote_interfaces)); |
607 mojo::MakeRequest(&remote_interfaces, channel->GetAssociatedGroup())); | |
608 } else { | 607 } else { |
609 // The channel may not be initialized in some tests environments. In this | 608 // The channel may not be initialized in some tests environments. In this |
610 // case we set up a dummy interface provider. | 609 // case we set up a dummy interface provider. |
611 mojo::GetIsolatedProxy(&remote_interfaces); | 610 mojo::GetIsolatedProxy(&remote_interfaces); |
612 } | 611 } |
613 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( | 612 remote_associated_interfaces_.reset(new AssociatedInterfaceProviderImpl( |
614 std::move(remote_interfaces))); | 613 std::move(remote_interfaces))); |
615 } | 614 } |
616 return remote_associated_interfaces_.get(); | 615 return remote_associated_interfaces_.get(); |
617 } | 616 } |
(...skipping 2875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3493 // There is no pending NavigationEntry in these cases, so pass 0 as the | 3492 // There is no pending NavigationEntry in these cases, so pass 0 as the |
3494 // pending_nav_entry_id. If the previous handle was a prematurely aborted | 3493 // pending_nav_entry_id. If the previous handle was a prematurely aborted |
3495 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. | 3494 // navigation loaded via LoadDataWithBaseURL, propagate the entry id. |
3496 return NavigationHandleImpl::Create( | 3495 return NavigationHandleImpl::Create( |
3497 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, | 3496 params.url, params.redirects, frame_tree_node_, is_renderer_initiated, |
3498 params.was_within_same_page, base::TimeTicks::Now(), | 3497 params.was_within_same_page, base::TimeTicks::Now(), |
3499 entry_id_for_data_nav, false); // started_from_context_menu | 3498 entry_id_for_data_nav, false); // started_from_context_menu |
3500 } | 3499 } |
3501 | 3500 |
3502 } // namespace content | 3501 } // namespace content |
OLD | NEW |