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/isolated_world_ids.h" | 79 #include "content/public/common/isolated_world_ids.h" |
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 is_pasting_(false), | 1116 is_pasting_(false), |
1116 suppress_further_dialogs_(false), | 1117 suppress_further_dialogs_(false), |
1117 blame_context_(nullptr), | 1118 blame_context_(nullptr), |
1118 #if defined(ENABLE_PLUGINS) | 1119 #if defined(ENABLE_PLUGINS) |
1119 focused_pepper_plugin_(nullptr), | 1120 focused_pepper_plugin_(nullptr), |
1120 pepper_last_mouse_event_target_(nullptr), | 1121 pepper_last_mouse_event_target_(nullptr), |
1121 #endif | 1122 #endif |
1122 frame_binding_(this), | 1123 frame_binding_(this), |
1123 host_zoom_binding_(this), | 1124 host_zoom_binding_(this), |
1124 has_accessed_initial_document_(false), | 1125 has_accessed_initial_document_(false), |
| 1126 appcache_host_id_(kAppCacheNoHostId), |
1125 weak_factory_(this) { | 1127 weak_factory_(this) { |
1126 // We don't have a service_manager::Connection at this point, so use empty | 1128 // We don't have a service_manager::Connection at this point, so use empty |
1127 // identity/specs. | 1129 // identity/specs. |
1128 // TODO(beng): We should fix this, so we can apply policy about which | 1130 // TODO(beng): We should fix this, so we can apply policy about which |
1129 // interfaces get exposed. | 1131 // interfaces get exposed. |
1130 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( | 1132 interface_registry_ = base::MakeUnique<service_manager::InterfaceRegistry>( |
1131 mojom::kNavigation_FrameSpec); | 1133 mojom::kNavigation_FrameSpec); |
1132 service_manager::mojom::InterfaceProviderPtr remote_interfaces; | 1134 service_manager::mojom::InterfaceProviderPtr remote_interfaces; |
1133 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); | 1135 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); |
1134 remote_interfaces_.reset(new service_manager::InterfaceProvider); | 1136 remote_interfaces_.reset(new service_manager::InterfaceProvider); |
(...skipping 1726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2861 #endif | 2863 #endif |
2862 return media_player; | 2864 return media_player; |
2863 } | 2865 } |
2864 | 2866 |
2865 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 2867 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
2866 blink::WebApplicationCacheHostClient* client) { | 2868 blink::WebApplicationCacheHostClient* client) { |
2867 if (!frame_ || !frame_->view()) | 2869 if (!frame_ || !frame_->view()) |
2868 return NULL; | 2870 return NULL; |
2869 return new RendererWebApplicationCacheHostImpl( | 2871 return new RendererWebApplicationCacheHostImpl( |
2870 RenderViewImpl::FromWebView(frame_->view()), client, | 2872 RenderViewImpl::FromWebView(frame_->view()), client, |
2871 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2873 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy(), |
| 2874 appcache_host_id_); |
2872 } | 2875 } |
2873 | 2876 |
2874 blink::WebWorkerContentSettingsClientProxy* | 2877 blink::WebWorkerContentSettingsClientProxy* |
2875 RenderFrameImpl::createWorkerContentSettingsClientProxy() { | 2878 RenderFrameImpl::createWorkerContentSettingsClientProxy() { |
2876 if (!frame_ || !frame_->view()) | 2879 if (!frame_ || !frame_->view()) |
2877 return NULL; | 2880 return NULL; |
2878 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( | 2881 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( |
2879 this, frame_); | 2882 this, frame_); |
2880 } | 2883 } |
2881 | 2884 |
(...skipping 2119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5001 stream_override->response = response; | 5004 stream_override->response = response; |
5002 stream_override->redirects = request_params.redirects; | 5005 stream_override->redirects = request_params.redirects; |
5003 stream_override->redirect_responses = request_params.redirect_response; | 5006 stream_override->redirect_responses = request_params.redirect_response; |
5004 | 5007 |
5005 // If the request was initiated in the context of a user gesture then make | 5008 // If the request was initiated in the context of a user gesture then make |
5006 // sure that the navigation also executes in the context of a user gesture. | 5009 // sure that the navigation also executes in the context of a user gesture. |
5007 std::unique_ptr<blink::WebScopedUserGesture> gesture( | 5010 std::unique_ptr<blink::WebScopedUserGesture> gesture( |
5008 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) | 5011 request_params.has_user_gesture ? new blink::WebScopedUserGesture(frame_) |
5009 : nullptr); | 5012 : nullptr); |
5010 | 5013 |
| 5014 appcache_host_id_ = request_params.appcache_host_id; |
| 5015 |
5011 NavigateInternal(common_params, StartNavigationParams(), request_params, | 5016 NavigateInternal(common_params, StartNavigationParams(), request_params, |
5012 std::move(stream_override)); | 5017 std::move(stream_override)); |
| 5018 |
| 5019 appcache_host_id_ = kAppCacheNoHostId; |
| 5020 |
5013 browser_side_navigation_pending_ = false; | 5021 browser_side_navigation_pending_ = false; |
5014 } | 5022 } |
5015 | 5023 |
5016 // PlzNavigate | 5024 // PlzNavigate |
5017 void RenderFrameImpl::OnFailedNavigation( | 5025 void RenderFrameImpl::OnFailedNavigation( |
5018 const CommonNavigationParams& common_params, | 5026 const CommonNavigationParams& common_params, |
5019 const RequestNavigationParams& request_params, | 5027 const RequestNavigationParams& request_params, |
5020 bool has_stale_copy_in_cache, | 5028 bool has_stale_copy_in_cache, |
5021 int error_code) { | 5029 int error_code) { |
5022 DCHECK(IsBrowserSideNavigationEnabled()); | 5030 DCHECK(IsBrowserSideNavigationEnabled()); |
(...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6585 // event target. Potentially a Pepper plugin will receive the event. | 6593 // event target. Potentially a Pepper plugin will receive the event. |
6586 // In order to tell whether a plugin gets the last mouse event and which it | 6594 // In order to tell whether a plugin gets the last mouse event and which it |
6587 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6595 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6588 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6596 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6589 // |pepper_last_mouse_event_target_|. | 6597 // |pepper_last_mouse_event_target_|. |
6590 pepper_last_mouse_event_target_ = nullptr; | 6598 pepper_last_mouse_event_target_ = nullptr; |
6591 #endif | 6599 #endif |
6592 } | 6600 } |
6593 | 6601 |
6594 } // namespace content | 6602 } // namespace content |
OLD | NEW |