Chromium Code Reviews| 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/renderer/render_frame_impl.h" | 5 #include "content/renderer/render_frame_impl.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 59 #include "content/common/frame_replication_state.h" | 59 #include "content/common/frame_replication_state.h" |
| 60 #include "content/common/gpu/client/context_provider_command_buffer.h" | 60 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 61 #include "content/common/input_messages.h" | 61 #include "content/common/input_messages.h" |
| 62 #include "content/common/navigation_params.h" | 62 #include "content/common/navigation_params.h" |
| 63 #include "content/common/page_messages.h" | 63 #include "content/common/page_messages.h" |
| 64 #include "content/common/savable_subframe.h" | 64 #include "content/common/savable_subframe.h" |
| 65 #include "content/common/service_worker/service_worker_types.h" | 65 #include "content/common/service_worker/service_worker_types.h" |
| 66 #include "content/common/site_isolation_policy.h" | 66 #include "content/common/site_isolation_policy.h" |
| 67 #include "content/common/swapped_out_messages.h" | 67 #include "content/common/swapped_out_messages.h" |
| 68 #include "content/common/view_messages.h" | 68 #include "content/common/view_messages.h" |
| 69 #include "content/public/common/appcache_info.h" | |
| 69 #include "content/public/common/associated_interface_provider.h" | 70 #include "content/public/common/associated_interface_provider.h" |
| 70 #include "content/public/common/bindings_policy.h" | 71 #include "content/public/common/bindings_policy.h" |
| 71 #include "content/public/common/browser_side_navigation_policy.h" | 72 #include "content/public/common/browser_side_navigation_policy.h" |
| 72 #include "content/public/common/content_constants.h" | 73 #include "content/public/common/content_constants.h" |
| 73 #include "content/public/common/content_features.h" | 74 #include "content/public/common/content_features.h" |
| 74 #include "content/public/common/content_switches.h" | 75 #include "content/public/common/content_switches.h" |
| 75 #include "content/public/common/context_menu_params.h" | 76 #include "content/public/common/context_menu_params.h" |
| 76 #include "content/public/common/file_chooser_file_info.h" | 77 #include "content/public/common/file_chooser_file_info.h" |
| 77 #include "content/public/common/file_chooser_params.h" | 78 #include "content/public/common/file_chooser_params.h" |
| 78 #include "content/public/common/form_field_data.h" | 79 #include "content/public/common/form_field_data.h" |
| (...skipping 1021 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1100 is_pasting_(false), | 1101 is_pasting_(false), |
| 1101 suppress_further_dialogs_(false), | 1102 suppress_further_dialogs_(false), |
| 1102 blame_context_(nullptr), | 1103 blame_context_(nullptr), |
| 1103 #if BUILDFLAG(ENABLE_PLUGINS) | 1104 #if BUILDFLAG(ENABLE_PLUGINS) |
| 1104 focused_pepper_plugin_(nullptr), | 1105 focused_pepper_plugin_(nullptr), |
| 1105 pepper_last_mouse_event_target_(nullptr), | 1106 pepper_last_mouse_event_target_(nullptr), |
| 1106 #endif | 1107 #endif |
| 1107 frame_binding_(this), | 1108 frame_binding_(this), |
| 1108 host_zoom_binding_(this), | 1109 host_zoom_binding_(this), |
| 1109 has_accessed_initial_document_(false), | 1110 has_accessed_initial_document_(false), |
| 1111 appcache_host_id_(kAppCacheNoHostId), | |
| 1110 weak_factory_(this) { | 1112 weak_factory_(this) { |
| 1111 // We don't have a service_manager::Connection at this point, so use empty | 1113 // We don't have a service_manager::Connection at this point, so use empty |
| 1112 // identity/specs. | 1114 // identity/specs. |
| 1113 // TODO(beng): We should fix this, so we can apply policy about which | 1115 // TODO(beng): We should fix this, so we can apply policy about which |
| 1114 // interfaces get exposed. | 1116 // interfaces get exposed. |
| 1115 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( | 1117 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( |
| 1116 mojom::kNavigation_FrameSpec); | 1118 mojom::kNavigation_FrameSpec); |
| 1117 service_manager::mojom::InterfaceProviderPtr remote_interfaces; | 1119 service_manager::mojom::InterfaceProviderPtr remote_interfaces; |
| 1118 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); | 1120 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); |
| 1119 remote_interfaces_.reset(new service_manager::InterfaceProvider); | 1121 remote_interfaces_.reset(new service_manager::InterfaceProvider); |
| (...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2846 #endif | 2848 #endif |
| 2847 return media_player; | 2849 return media_player; |
| 2848 } | 2850 } |
| 2849 | 2851 |
| 2850 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 2852 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
| 2851 blink::WebApplicationCacheHostClient* client) { | 2853 blink::WebApplicationCacheHostClient* client) { |
| 2852 if (!frame_ || !frame_->view()) | 2854 if (!frame_ || !frame_->view()) |
| 2853 return NULL; | 2855 return NULL; |
| 2854 return new RendererWebApplicationCacheHostImpl( | 2856 return new RendererWebApplicationCacheHostImpl( |
| 2855 RenderViewImpl::FromWebView(frame_->view()), client, | 2857 RenderViewImpl::FromWebView(frame_->view()), client, |
| 2856 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2858 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy(), |
| 2859 appcache_host_id_); | |
| 2857 } | 2860 } |
| 2858 | 2861 |
| 2859 blink::WebWorkerContentSettingsClientProxy* | 2862 blink::WebWorkerContentSettingsClientProxy* |
| 2860 RenderFrameImpl::createWorkerContentSettingsClientProxy() { | 2863 RenderFrameImpl::createWorkerContentSettingsClientProxy() { |
| 2861 if (!frame_ || !frame_->view()) | 2864 if (!frame_ || !frame_->view()) |
| 2862 return NULL; | 2865 return NULL; |
| 2863 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( | 2866 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( |
| 2864 this, frame_); | 2867 this, frame_); |
| 2865 } | 2868 } |
| 2866 | 2869 |
| (...skipping 2125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4992 stream_override->response = response; | 4995 stream_override->response = response; |
| 4993 stream_override->redirects = request_params.redirects; | 4996 stream_override->redirects = request_params.redirects; |
| 4994 stream_override->redirect_responses = request_params.redirect_response; | 4997 stream_override->redirect_responses = request_params.redirect_response; |
| 4995 | 4998 |
| 4996 // If the request was initiated in the context of a user gesture then make | 4999 // If the request was initiated in the context of a user gesture then make |
| 4997 // sure that the navigation also executes in the context of a user gesture. | 5000 // sure that the navigation also executes in the context of a user gesture. |
| 4998 std::unique_ptr<blink::WebScopedUserGesture> gesture( | 5001 std::unique_ptr<blink::WebScopedUserGesture> gesture( |
| 4999 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) | 5002 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) |
| 5000 : nullptr); | 5003 : nullptr); |
| 5001 | 5004 |
| 5005 appcache_host_id_ = request_params.appcache_host_id; | |
|
clamy
2016/11/25 13:32:24
We store the request params in NavigateInternal, s
ananta
2016/11/28 21:36:53
We save the request params in the pending_navigati
clamy
2016/11/30 17:40:22
You can still access them through the DataSource D
ananta
2016/12/01 05:14:59
It looks like the right value is available via the
clamy
2016/12/01 10:02:47
Absolutely, this is what I meant. Sorry my comment
| |
| 5006 | |
| 5002 NavigateInternal(common_params, StartNavigationParams(), request_params, | 5007 NavigateInternal(common_params, StartNavigationParams(), request_params, |
| 5003 std::move(stream_override)); | 5008 std::move(stream_override)); |
| 5009 | |
| 5010 appcache_host_id_ = kAppCacheNoHostId; | |
| 5011 | |
| 5004 browser_side_navigation_pending_ = false; | 5012 browser_side_navigation_pending_ = false; |
| 5005 } | 5013 } |
| 5006 | 5014 |
| 5007 // PlzNavigate | 5015 // PlzNavigate |
| 5008 void RenderFrameImpl::OnFailedNavigation( | 5016 void RenderFrameImpl::OnFailedNavigation( |
| 5009 const CommonNavigationParams& common_params, | 5017 const CommonNavigationParams& common_params, |
| 5010 const RequestNavigationParams& request_params, | 5018 const RequestNavigationParams& request_params, |
| 5011 bool has_stale_copy_in_cache, | 5019 bool has_stale_copy_in_cache, |
| 5012 int error_code) { | 5020 int error_code) { |
| 5013 DCHECK(IsBrowserSideNavigationEnabled()); | 5021 DCHECK(IsBrowserSideNavigationEnabled()); |
| (...skipping 1629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6643 // event target. Potentially a Pepper plugin will receive the event. | 6651 // event target. Potentially a Pepper plugin will receive the event. |
| 6644 // In order to tell whether a plugin gets the last mouse event and which it | 6652 // In order to tell whether a plugin gets the last mouse event and which it |
| 6645 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6653 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6646 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6654 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6647 // |pepper_last_mouse_event_target_|. | 6655 // |pepper_last_mouse_event_target_|. |
| 6648 pepper_last_mouse_event_target_ = nullptr; | 6656 pepper_last_mouse_event_target_ = nullptr; |
| 6649 #endif | 6657 #endif |
| 6650 } | 6658 } |
| 6651 | 6659 |
| 6652 } // namespace content | 6660 } // namespace content |
| OLD | NEW |