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 41 matching lines...) Loading... | |
52 #include "content/browser/renderer_host/render_process_host_impl.h" | 52 #include "content/browser/renderer_host/render_process_host_impl.h" |
53 #include "content/browser/renderer_host/render_view_host_delegate.h" | 53 #include "content/browser/renderer_host/render_view_host_delegate.h" |
54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" | 54 #include "content/browser/renderer_host/render_view_host_delegate_view.h" |
55 #include "content/browser/renderer_host/render_view_host_impl.h" | 55 #include "content/browser/renderer_host/render_view_host_impl.h" |
56 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 56 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
57 #include "content/browser/renderer_host/render_widget_host_impl.h" | 57 #include "content/browser/renderer_host/render_widget_host_impl.h" |
58 #include "content/browser/renderer_host/render_widget_host_view_base.h" | 58 #include "content/browser/renderer_host/render_widget_host_view_base.h" |
59 #include "content/browser/shared_worker/shared_worker_service_impl.h" | 59 #include "content/browser/shared_worker/shared_worker_service_impl.h" |
60 #include "content/browser/websockets/websocket_manager.h" | 60 #include "content/browser/websockets/websocket_manager.h" |
61 #include "content/browser/webui/web_ui_controller_factory_registry.h" | 61 #include "content/browser/webui/web_ui_controller_factory_registry.h" |
62 #include "content/browser/webui/web_ui_url_loader_factory.h" | |
62 #include "content/common/accessibility_messages.h" | 63 #include "content/common/accessibility_messages.h" |
63 #include "content/common/associated_interface_provider_impl.h" | 64 #include "content/common/associated_interface_provider_impl.h" |
64 #include "content/common/associated_interface_registry_impl.h" | 65 #include "content/common/associated_interface_registry_impl.h" |
65 #include "content/common/associated_interfaces.mojom.h" | 66 #include "content/common/associated_interfaces.mojom.h" |
66 #include "content/common/content_security_policy/content_security_policy.h" | 67 #include "content/common/content_security_policy/content_security_policy.h" |
67 #include "content/common/frame_messages.h" | 68 #include "content/common/frame_messages.h" |
68 #include "content/common/frame_owner_properties.h" | 69 #include "content/common/frame_owner_properties.h" |
69 #include "content/common/input_messages.h" | 70 #include "content/common/input_messages.h" |
70 #include "content/common/inter_process_time_ticks_converter.h" | 71 #include "content/common/inter_process_time_ticks_converter.h" |
71 #include "content/common/navigation_params.h" | 72 #include "content/common/navigation_params.h" |
(...skipping 2969 matching lines...) Loading... | |
3041 DCHECK(!GetParent()); | 3042 DCHECK(!GetParent()); |
3042 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); | 3043 render_view_host()->Send(new FrameMsg_EnableViewSourceMode(routing_id_)); |
3043 } | 3044 } |
3044 | 3045 |
3045 const GURL body_url = body.get() ? body->GetURL() : GURL(); | 3046 const GURL body_url = body.get() ? body->GetURL() : GURL(); |
3046 const ResourceResponseHead head = response ? | 3047 const ResourceResponseHead head = response ? |
3047 response->head : ResourceResponseHead(); | 3048 response->head : ResourceResponseHead(); |
3048 FrameMsg_CommitDataNetworkService_Params commit_data; | 3049 FrameMsg_CommitDataNetworkService_Params commit_data; |
3049 commit_data.handle = handle.release(); | 3050 commit_data.handle = handle.release(); |
3050 // TODO(scottmg): Pass a factory for SW, etc. once we have one. | 3051 // TODO(scottmg): Pass a factory for SW, etc. once we have one. |
3051 commit_data.url_loader_factory = mojo::MessagePipeHandle(); | 3052 commit_data.url_loader_factory = mojo::MessagePipeHandle(); |
scottmg
2017/05/05 19:27:42
nit; put this in else
jam
2017/05/05 22:19:39
Done.
| |
3053 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | |
3054 switches::kEnableNetworkService) && | |
3055 common_params.url.SchemeIs(kChromeUIScheme)) { | |
3056 commit_data.url_loader_factory = GetWebUIURLLoader(frame_tree_node_) | |
3057 .PassInterface() | |
3058 .PassHandle() | |
3059 .release(); | |
3060 } | |
3052 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, | 3061 Send(new FrameMsg_CommitNavigation(routing_id_, head, body_url, commit_data, |
3053 common_params, request_params)); | 3062 common_params, request_params)); |
3054 | 3063 |
3055 // If a network request was made, update the Previews state. | 3064 // If a network request was made, update the Previews state. |
3056 if (ShouldMakeNetworkRequestForURL(common_params.url) && | 3065 if (ShouldMakeNetworkRequestForURL(common_params.url) && |
3057 !FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type)) { | 3066 !FrameMsg_Navigate_Type::IsSameDocument(common_params.navigation_type)) { |
3058 last_navigation_previews_state_ = common_params.previews_state; | 3067 last_navigation_previews_state_ = common_params.previews_state; |
3059 } | 3068 } |
3060 | 3069 |
3061 // TODO(clamy): Release the stream handle once the renderer has finished | 3070 // TODO(clamy): Release the stream handle once the renderer has finished |
(...skipping 839 matching lines...) Loading... | |
3901 } | 3910 } |
3902 | 3911 |
3903 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( | 3912 void RenderFrameHostImpl::ForwardGetInterfaceToRenderFrame( |
3904 const std::string& interface_name, | 3913 const std::string& interface_name, |
3905 mojo::ScopedMessagePipeHandle pipe) { | 3914 mojo::ScopedMessagePipeHandle pipe) { |
3906 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); | 3915 GetRemoteInterfaces()->GetInterface(interface_name, std::move(pipe)); |
3907 } | 3916 } |
3908 #endif | 3917 #endif |
3909 | 3918 |
3910 } // namespace content | 3919 } // namespace content |
OLD | NEW |