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 27 matching lines...) Expand all Loading... |
38 #include "content/child/quota_dispatcher.h" | 38 #include "content/child/quota_dispatcher.h" |
39 #include "content/child/request_extra_data.h" | 39 #include "content/child/request_extra_data.h" |
40 #include "content/child/service_worker/service_worker_handle_reference.h" | 40 #include "content/child/service_worker/service_worker_handle_reference.h" |
41 #include "content/child/service_worker/service_worker_network_provider.h" | 41 #include "content/child/service_worker/service_worker_network_provider.h" |
42 #include "content/child/service_worker/service_worker_provider_context.h" | 42 #include "content/child/service_worker/service_worker_provider_context.h" |
43 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 43 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
44 #include "content/child/v8_value_converter_impl.h" | 44 #include "content/child/v8_value_converter_impl.h" |
45 #include "content/child/web_url_loader_impl.h" | 45 #include "content/child/web_url_loader_impl.h" |
46 #include "content/child/web_url_request_util.h" | 46 #include "content/child/web_url_request_util.h" |
47 #include "content/child/webmessageportchannel_impl.h" | 47 #include "content/child/webmessageportchannel_impl.h" |
48 #include "content/child/websocket_bridge.h" | |
49 #include "content/child/weburlresponse_extradata_impl.h" | 48 #include "content/child/weburlresponse_extradata_impl.h" |
50 #include "content/common/accessibility_messages.h" | 49 #include "content/common/accessibility_messages.h" |
51 #include "content/common/clipboard_messages.h" | 50 #include "content/common/clipboard_messages.h" |
52 #include "content/common/content_constants_internal.h" | 51 #include "content/common/content_constants_internal.h" |
53 #include "content/common/content_security_policy_header.h" | 52 #include "content/common/content_security_policy_header.h" |
54 #include "content/common/frame_messages.h" | 53 #include "content/common/frame_messages.h" |
55 #include "content/common/frame_owner_properties.h" | 54 #include "content/common/frame_owner_properties.h" |
56 #include "content/common/frame_replication_state.h" | 55 #include "content/common/frame_replication_state.h" |
57 #include "content/common/gpu/client/context_provider_command_buffer.h" | 56 #include "content/common/gpu/client/context_provider_command_buffer.h" |
58 #include "content/common/input_messages.h" | 57 #include "content/common/input_messages.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 #include "content/renderer/renderer_webapplicationcachehost_impl.h" | 127 #include "content/renderer/renderer_webapplicationcachehost_impl.h" |
129 #include "content/renderer/renderer_webcolorchooser_impl.h" | 128 #include "content/renderer/renderer_webcolorchooser_impl.h" |
130 #include "content/renderer/savable_resources.h" | 129 #include "content/renderer/savable_resources.h" |
131 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" | 130 #include "content/renderer/screen_orientation/screen_orientation_dispatcher.h" |
132 #include "content/renderer/shared_worker_repository.h" | 131 #include "content/renderer/shared_worker_repository.h" |
133 #include "content/renderer/skia_benchmarking_extension.h" | 132 #include "content/renderer/skia_benchmarking_extension.h" |
134 #include "content/renderer/stats_collection_controller.h" | 133 #include "content/renderer/stats_collection_controller.h" |
135 #include "content/renderer/web_frame_utils.h" | 134 #include "content/renderer/web_frame_utils.h" |
136 #include "content/renderer/web_ui_extension.h" | 135 #include "content/renderer/web_ui_extension.h" |
137 #include "content/renderer/websharedworker_proxy.h" | 136 #include "content/renderer/websharedworker_proxy.h" |
| 137 #include "content/renderer/websockethandle_impl.h" |
138 #include "crypto/sha2.h" | 138 #include "crypto/sha2.h" |
139 #include "gin/modules/module_registry.h" | 139 #include "gin/modules/module_registry.h" |
140 #include "media/audio/audio_output_device.h" | 140 #include "media/audio/audio_output_device.h" |
141 #include "media/base/audio_renderer_mixer_input.h" | 141 #include "media/base/audio_renderer_mixer_input.h" |
142 #include "media/base/cdm_factory.h" | 142 #include "media/base/cdm_factory.h" |
143 #include "media/base/decoder_factory.h" | 143 #include "media/base/decoder_factory.h" |
144 #include "media/base/media.h" | 144 #include "media/base/media.h" |
145 #include "media/base/media_log.h" | 145 #include "media/base/media_log.h" |
146 #include "media/base/media_switches.h" | 146 #include "media/base/media_switches.h" |
147 #include "media/blink/url_index.h" | 147 #include "media/blink/url_index.h" |
(...skipping 4156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4304 return; | 4304 return; |
4305 } | 4305 } |
4306 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota( | 4306 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota( |
4307 render_view_->GetRoutingID(), | 4307 render_view_->GetRoutingID(), |
4308 blink::WebStringToGURL(origin.toString()), | 4308 blink::WebStringToGURL(origin.toString()), |
4309 static_cast<storage::StorageType>(type), | 4309 static_cast<storage::StorageType>(type), |
4310 requested_size, | 4310 requested_size, |
4311 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 4311 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
4312 } | 4312 } |
4313 | 4313 |
4314 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { | |
4315 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); | |
4316 impl->set_render_frame_id(routing_id_); | |
4317 } | |
4318 | |
4319 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { | 4314 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { |
4320 if (!presentation_dispatcher_) | 4315 if (!presentation_dispatcher_) |
4321 presentation_dispatcher_ = new PresentationDispatcher(this); | 4316 presentation_dispatcher_ = new PresentationDispatcher(this); |
4322 return presentation_dispatcher_; | 4317 return presentation_dispatcher_; |
4323 } | 4318 } |
4324 | 4319 |
4325 blink::WebPushClient* RenderFrameImpl::pushClient() { | 4320 blink::WebPushClient* RenderFrameImpl::pushClient() { |
4326 if (!push_messaging_dispatcher_) | 4321 if (!push_messaging_dispatcher_) |
4327 push_messaging_dispatcher_ = new PushMessagingDispatcher(this); | 4322 push_messaging_dispatcher_ = new PushMessagingDispatcher(this); |
4328 return push_messaging_dispatcher_; | 4323 return push_messaging_dispatcher_; |
4329 } | 4324 } |
4330 | 4325 |
| 4326 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
| 4327 // Initialize the WebSocketHandle with our InterfaceProvider to provide the |
| 4328 // WebSocket implementation with context about this frame. This is important |
| 4329 // so that the browser can show UI associated with the WebSocket (e.g., for |
| 4330 // certificate errors). |
| 4331 static_cast<WebSocketHandleImpl*>(handle)->Initialize( |
| 4332 blink_interface_provider_.get()); |
| 4333 } |
| 4334 |
4331 void RenderFrameImpl::willStartUsingPeerConnectionHandler( | 4335 void RenderFrameImpl::willStartUsingPeerConnectionHandler( |
4332 blink::WebRTCPeerConnectionHandler* handler) { | 4336 blink::WebRTCPeerConnectionHandler* handler) { |
4333 #if defined(ENABLE_WEBRTC) | 4337 #if defined(ENABLE_WEBRTC) |
4334 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame_); | 4338 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame_); |
4335 #endif | 4339 #endif |
4336 } | 4340 } |
4337 | 4341 |
4338 blink::WebUserMediaClient* RenderFrameImpl::userMediaClient() { | 4342 blink::WebUserMediaClient* RenderFrameImpl::userMediaClient() { |
4339 if (!web_user_media_client_) | 4343 if (!web_user_media_client_) |
4340 InitializeUserMediaClient(); | 4344 InitializeUserMediaClient(); |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6366 // event target. Potentially a Pepper plugin will receive the event. | 6370 // event target. Potentially a Pepper plugin will receive the event. |
6367 // In order to tell whether a plugin gets the last mouse event and which it | 6371 // In order to tell whether a plugin gets the last mouse event and which it |
6368 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets | 6372 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets |
6369 // the event, it will notify us via DidReceiveMouseEvent() and set itself as | 6373 // the event, it will notify us via DidReceiveMouseEvent() and set itself as |
6370 // |pepper_last_mouse_event_target_|. | 6374 // |pepper_last_mouse_event_target_|. |
6371 pepper_last_mouse_event_target_ = nullptr; | 6375 pepper_last_mouse_event_target_ = nullptr; |
6372 #endif | 6376 #endif |
6373 } | 6377 } |
6374 | 6378 |
6375 } // namespace content | 6379 } // namespace content |
OLD | NEW |