| 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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 #include "content/common/frame_replication_state.h" | 60 #include "content/common/frame_replication_state.h" |
| 61 #include "content/common/gpu/client/context_provider_command_buffer.h" | 61 #include "content/common/gpu/client/context_provider_command_buffer.h" |
| 62 #include "content/common/input_messages.h" | 62 #include "content/common/input_messages.h" |
| 63 #include "content/common/navigation_params.h" | 63 #include "content/common/navigation_params.h" |
| 64 #include "content/common/page_messages.h" | 64 #include "content/common/page_messages.h" |
| 65 #include "content/common/savable_subframe.h" | 65 #include "content/common/savable_subframe.h" |
| 66 #include "content/common/service_worker/service_worker_types.h" | 66 #include "content/common/service_worker/service_worker_types.h" |
| 67 #include "content/common/site_isolation_policy.h" | 67 #include "content/common/site_isolation_policy.h" |
| 68 #include "content/common/swapped_out_messages.h" | 68 #include "content/common/swapped_out_messages.h" |
| 69 #include "content/common/view_messages.h" | 69 #include "content/common/view_messages.h" |
| 70 #include "content/public/common/appcache_info.h" |
| 70 #include "content/public/common/associated_interface_provider.h" | 71 #include "content/public/common/associated_interface_provider.h" |
| 71 #include "content/public/common/bindings_policy.h" | 72 #include "content/public/common/bindings_policy.h" |
| 72 #include "content/public/common/browser_side_navigation_policy.h" | 73 #include "content/public/common/browser_side_navigation_policy.h" |
| 73 #include "content/public/common/content_constants.h" | 74 #include "content/public/common/content_constants.h" |
| 74 #include "content/public/common/content_features.h" | 75 #include "content/public/common/content_features.h" |
| 75 #include "content/public/common/content_switches.h" | 76 #include "content/public/common/content_switches.h" |
| 76 #include "content/public/common/context_menu_params.h" | 77 #include "content/public/common/context_menu_params.h" |
| 77 #include "content/public/common/file_chooser_file_info.h" | 78 #include "content/public/common/file_chooser_file_info.h" |
| 78 #include "content/public/common/file_chooser_params.h" | 79 #include "content/public/common/file_chooser_params.h" |
| 79 #include "content/public/common/form_field_data.h" | 80 #include "content/public/common/form_field_data.h" |
| (...skipping 2789 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2869 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind( | 2870 remoting_controller_ptr->SetSwitchRendererCallback(base::Bind( |
| 2870 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr())); | 2871 &media::WebMediaPlayerImpl::ScheduleRestart, media_player->AsWeakPtr())); |
| 2871 #endif | 2872 #endif |
| 2872 return media_player; | 2873 return media_player; |
| 2873 } | 2874 } |
| 2874 | 2875 |
| 2875 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( | 2876 blink::WebApplicationCacheHost* RenderFrameImpl::createApplicationCacheHost( |
| 2876 blink::WebApplicationCacheHostClient* client) { | 2877 blink::WebApplicationCacheHostClient* client) { |
| 2877 if (!frame_ || !frame_->view()) | 2878 if (!frame_ || !frame_->view()) |
| 2878 return NULL; | 2879 return NULL; |
| 2880 |
| 2881 DocumentState* document_state = |
| 2882 frame_->provisionalDataSource() |
| 2883 ? DocumentState::FromDataSource(frame_->provisionalDataSource()) |
| 2884 : DocumentState::FromDataSource(frame_->dataSource()); |
| 2885 |
| 2886 NavigationStateImpl* navigation_state = |
| 2887 static_cast<NavigationStateImpl*>(document_state->navigation_state()); |
| 2888 |
| 2879 return new RendererWebApplicationCacheHostImpl( | 2889 return new RendererWebApplicationCacheHostImpl( |
| 2880 RenderViewImpl::FromWebView(frame_->view()), client, | 2890 RenderViewImpl::FromWebView(frame_->view()), client, |
| 2881 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 2891 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy(), |
| 2892 navigation_state->request_params().appcache_host_id); |
| 2882 } | 2893 } |
| 2883 | 2894 |
| 2884 blink::WebWorkerContentSettingsClientProxy* | 2895 blink::WebWorkerContentSettingsClientProxy* |
| 2885 RenderFrameImpl::createWorkerContentSettingsClientProxy() { | 2896 RenderFrameImpl::createWorkerContentSettingsClientProxy() { |
| 2886 if (!frame_ || !frame_->view()) | 2897 if (!frame_ || !frame_->view()) |
| 2887 return NULL; | 2898 return NULL; |
| 2888 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( | 2899 return GetContentClient()->renderer()->CreateWorkerContentSettingsClientProxy( |
| 2889 this, frame_); | 2900 this, frame_); |
| 2890 } | 2901 } |
| 2891 | 2902 |
| (...skipping 2129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5021 | 5032 |
| 5022 // If the request was initiated in the context of a user gesture then make | 5033 // If the request was initiated in the context of a user gesture then make |
| 5023 // sure that the navigation also executes in the context of a user gesture. | 5034 // sure that the navigation also executes in the context of a user gesture. |
| 5024 std::unique_ptr<blink::WebScopedUserGesture> gesture( | 5035 std::unique_ptr<blink::WebScopedUserGesture> gesture( |
| 5025 (common_params.gesture == NavigationGestureUser) | 5036 (common_params.gesture == NavigationGestureUser) |
| 5026 ? new blink::WebScopedUserGesture(frame_) | 5037 ? new blink::WebScopedUserGesture(frame_) |
| 5027 : nullptr); | 5038 : nullptr); |
| 5028 | 5039 |
| 5029 NavigateInternal(common_params, StartNavigationParams(), request_params, | 5040 NavigateInternal(common_params, StartNavigationParams(), request_params, |
| 5030 std::move(stream_override)); | 5041 std::move(stream_override)); |
| 5042 |
| 5031 browser_side_navigation_pending_ = false; | 5043 browser_side_navigation_pending_ = false; |
| 5032 } | 5044 } |
| 5033 | 5045 |
| 5034 // PlzNavigate | 5046 // PlzNavigate |
| 5035 void RenderFrameImpl::OnFailedNavigation( | 5047 void RenderFrameImpl::OnFailedNavigation( |
| 5036 const CommonNavigationParams& common_params, | 5048 const CommonNavigationParams& common_params, |
| 5037 const RequestNavigationParams& request_params, | 5049 const RequestNavigationParams& request_params, |
| 5038 bool has_stale_copy_in_cache, | 5050 bool has_stale_copy_in_cache, |
| 5039 int error_code) { | 5051 int error_code) { |
| 5040 DCHECK(IsBrowserSideNavigationEnabled()); | 5052 DCHECK(IsBrowserSideNavigationEnabled()); |
| (...skipping 1630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6671 // event target. Potentially a Pepper plugin will receive the event. | 6683 // event target. Potentially a Pepper plugin will receive the event. |
| 6672 // In order to tell whether a plugin gets the last mouse event and which it | 6684 // In order to tell whether a plugin gets the last mouse event and which it |
| 6673 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6685 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
| 6674 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6686 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
| 6675 // |pepper_last_mouse_event_target_|. | 6687 // |pepper_last_mouse_event_target_|. |
| 6676 pepper_last_mouse_event_target_ = nullptr; | 6688 pepper_last_mouse_event_target_ = nullptr; |
| 6677 #endif | 6689 #endif |
| 6678 } | 6690 } |
| 6679 | 6691 |
| 6680 } // namespace content | 6692 } // namespace content |
| OLD | NEW |