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

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

Issue 308513004: Pass render frame ID to WebSocketBridge (Chromium side) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/debug/alias.h" 12 #include "base/debug/alias.h"
13 #include "base/debug/dump_without_crashing.h" 13 #include "base/debug/dump_without_crashing.h"
14 #include "base/i18n/char_iterator.h" 14 #include "base/i18n/char_iterator.h"
15 #include "base/metrics/histogram.h" 15 #include "base/metrics/histogram.h"
16 #include "base/process/kill.h" 16 #include "base/process/kill.h"
17 #include "base/process/process.h" 17 #include "base/process/process.h"
18 #include "base/strings/string16.h" 18 #include "base/strings/string16.h"
19 #include "base/strings/utf_string_conversions.h" 19 #include "base/strings/utf_string_conversions.h"
20 #include "base/time/time.h" 20 #include "base/time/time.h"
21 #include "content/child/appcache/appcache_dispatcher.h" 21 #include "content/child/appcache/appcache_dispatcher.h"
22 #include "content/child/plugin_messages.h" 22 #include "content/child/plugin_messages.h"
23 #include "content/child/quota_dispatcher.h" 23 #include "content/child/quota_dispatcher.h"
24 #include "content/child/request_extra_data.h" 24 #include "content/child/request_extra_data.h"
25 #include "content/child/service_worker/service_worker_network_provider.h" 25 #include "content/child/service_worker/service_worker_network_provider.h"
26 #include "content/child/service_worker/web_service_worker_provider_impl.h" 26 #include "content/child/service_worker/web_service_worker_provider_impl.h"
27 #include "content/child/web_socket_stream_handle_impl.h" 27 #include "content/child/web_socket_stream_handle_impl.h"
28 #include "content/child/webmessageportchannel_impl.h" 28 #include "content/child/webmessageportchannel_impl.h"
29 #include "content/child/websocket_bridge.h"
29 #include "content/common/clipboard_messages.h" 30 #include "content/common/clipboard_messages.h"
30 #include "content/common/frame_messages.h" 31 #include "content/common/frame_messages.h"
31 #include "content/common/input_messages.h" 32 #include "content/common/input_messages.h"
32 #include "content/common/service_worker/service_worker_types.h" 33 #include "content/common/service_worker/service_worker_types.h"
33 #include "content/common/socket_stream_handle_data.h" 34 #include "content/common/socket_stream_handle_data.h"
34 #include "content/common/swapped_out_messages.h" 35 #include "content/common/swapped_out_messages.h"
35 #include "content/common/view_messages.h" 36 #include "content/common/view_messages.h"
36 #include "content/public/common/bindings_policy.h" 37 #include "content/public/common/bindings_policy.h"
37 #include "content/public/common/content_constants.h" 38 #include "content/public/common/content_constants.h"
38 #include "content/public/common/content_switches.h" 39 #include "content/public/common/content_switches.h"
(...skipping 2695 matching lines...) Expand 10 before | Expand all | Expand 10 after
2734 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); 2735 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks));
2735 } 2736 }
2736 2737
2737 void RenderFrameImpl::willOpenSocketStream( 2738 void RenderFrameImpl::willOpenSocketStream(
2738 blink::WebSocketStreamHandle* handle) { 2739 blink::WebSocketStreamHandle* handle) {
2739 WebSocketStreamHandleImpl* impl = 2740 WebSocketStreamHandleImpl* impl =
2740 static_cast<WebSocketStreamHandleImpl*>(handle); 2741 static_cast<WebSocketStreamHandleImpl*>(handle);
2741 impl->SetUserData(handle, new SocketStreamHandleData(routing_id_)); 2742 impl->SetUserData(handle, new SocketStreamHandleData(routing_id_));
2742 } 2743 }
2743 2744
2745 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) {
2746 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle);
2747 impl->set_render_frame_id(routing_id_);
2748 }
2749
2744 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { 2750 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() {
2745 return render_view_->geolocationClient(); 2751 return render_view_->geolocationClient();
2746 } 2752 }
2747 2753
2748 void RenderFrameImpl::willStartUsingPeerConnectionHandler( 2754 void RenderFrameImpl::willStartUsingPeerConnectionHandler(
2749 blink::WebLocalFrame* frame, 2755 blink::WebLocalFrame* frame,
2750 blink::WebRTCPeerConnectionHandler* handler) { 2756 blink::WebRTCPeerConnectionHandler* handler) {
2751 DCHECK(!frame_ || frame_ == frame); 2757 DCHECK(!frame_ || frame_ == frame);
2752 #if defined(ENABLE_WEBRTC) 2758 #if defined(ENABLE_WEBRTC)
2753 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame); 2759 static_cast<RTCPeerConnectionHandler*>(handler)->associateWithFrame(frame);
(...skipping 786 matching lines...) Expand 10 before | Expand all | Expand 10 after
3540 3546
3541 RendererCdmManager* RenderFrameImpl::GetCdmManager() { 3547 RendererCdmManager* RenderFrameImpl::GetCdmManager() {
3542 if (!cdm_manager_) 3548 if (!cdm_manager_)
3543 cdm_manager_ = new RendererCdmManager(this); 3549 cdm_manager_ = new RendererCdmManager(this);
3544 return cdm_manager_; 3550 return cdm_manager_;
3545 } 3551 }
3546 3552
3547 #endif // defined(OS_ANDROID) 3553 #endif // defined(OS_ANDROID)
3548 3554
3549 } // namespace content 3555 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698