Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2119973002: Port WebSockets to Mojo IPC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix shared worker support Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 4157 matching lines...) Expand 10 before | Expand all | Expand 10 after
4305 return; 4305 return;
4306 } 4306 }
4307 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota( 4307 ChildThreadImpl::current()->quota_dispatcher()->RequestStorageQuota(
4308 render_view_->GetRoutingID(), 4308 render_view_->GetRoutingID(),
4309 blink::WebStringToGURL(origin.toString()), 4309 blink::WebStringToGURL(origin.toString()),
4310 static_cast<storage::StorageType>(type), 4310 static_cast<storage::StorageType>(type),
4311 requested_size, 4311 requested_size,
4312 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 4312 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
4313 } 4313 }
4314 4314
4315 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
4316 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle);
4317 impl->set_render_frame_id(routing_id_);
4318 }
4319
4320 blink::WebPresentationClient* RenderFrameImpl::presentationClient() { 4315 blink::WebPresentationClient* RenderFrameImpl::presentationClient() {
4321 if (!presentation_dispatcher_) 4316 if (!presentation_dispatcher_)
4322 presentation_dispatcher_ = new PresentationDispatcher(this); 4317 presentation_dispatcher_ = new PresentationDispatcher(this);
4323 return presentation_dispatcher_; 4318 return presentation_dispatcher_;
4324 } 4319 }
4325 4320
4326 blink::WebPushClient* RenderFrameImpl::pushClient() { 4321 blink::WebPushClient* RenderFrameImpl::pushClient() {
4327 if (!push_messaging_dispatcher_) 4322 if (!push_messaging_dispatcher_)
4328 push_messaging_dispatcher_ = new PushMessagingDispatcher(this); 4323 push_messaging_dispatcher_ = new PushMessagingDispatcher(this);
4329 return push_messaging_dispatcher_; 4324 return push_messaging_dispatcher_;
4330 } 4325 }
4331 4326
4327 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
4328 // Initialize the WebSocketHandle with our ServiceRegistry to provide the
4329 // WebSocket implementation with context about this frame.
4330 static_cast<WebSocketHandleImpl*>(handle)->Initialize(
4331 blink_interface_provider_.get());
4332 }
4333
4332 void RenderFrameImpl::willStartUsingPeerConnectionHandler( 4334 void RenderFrameImpl::willStartUsingPeerConnectionHandler(
4333 blink::WebRTCPeerConnectionHandler* handler) { 4335 blink::WebRTCPeerConnectionHandler* handler) {
4334 #if defined(ENABLE_WEBRTC) 4336 #if defined(ENABLE_WEBRTC)
4335 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame_); 4337 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame_);
4336 #endif 4338 #endif
4337 } 4339 }
4338 4340
4339 blink::WebUserMediaClient* RenderFrameImpl::userMediaClient() { 4341 blink::WebUserMediaClient* RenderFrameImpl::userMediaClient() {
4340 if (!web_user_media_client_) 4342 if (!web_user_media_client_)
4341 InitializeUserMediaClient(); 4343 InitializeUserMediaClient();
(...skipping 2005 matching lines...) Expand 10 before | Expand all | Expand 10 after
6347 // event target. Potentially a Pepper plugin will receive the event. 6349 // event target. Potentially a Pepper plugin will receive the event.
6348 // In order to tell whether a plugin gets the last mouse event and which it 6350 // In order to tell whether a plugin gets the last mouse event and which it
6349 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6351 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6350 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6352 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6351 // |pepper_last_mouse_event_target_|. 6353 // |pepper_last_mouse_event_target_|.
6352 pepper_last_mouse_event_target_ = nullptr; 6354 pepper_last_mouse_event_target_ = nullptr;
6353 #endif 6355 #endif
6354 } 6356 }
6355 6357
6356 } // namespace content 6358 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698