| 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 | 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/asan_invalid_access.h" | 13 #include "base/debug/asan_invalid_access.h" |
| 14 #include "base/debug/dump_without_crashing.h" | 14 #include "base/debug/dump_without_crashing.h" |
| 15 #include "base/i18n/char_iterator.h" | 15 #include "base/i18n/char_iterator.h" |
| 16 #include "base/metrics/histogram.h" | 16 #include "base/metrics/histogram.h" |
| 17 #include "base/process/kill.h" | 17 #include "base/process/kill.h" |
| 18 #include "base/process/process.h" | 18 #include "base/process/process.h" |
| 19 #include "base/strings/string16.h" | 19 #include "base/strings/string16.h" |
| 20 #include "base/strings/utf_string_conversions.h" | 20 #include "base/strings/utf_string_conversions.h" |
| 21 #include "base/time/time.h" | 21 #include "base/time/time.h" |
| 22 #include "content/child/appcache/appcache_dispatcher.h" | 22 #include "content/child/appcache/appcache_dispatcher.h" |
| 23 #include "content/child/plugin_messages.h" | 23 #include "content/child/plugin_messages.h" |
| 24 #include "content/child/quota_dispatcher.h" | 24 #include "content/child/quota_dispatcher.h" |
| 25 #include "content/child/request_extra_data.h" | 25 #include "content/child/request_extra_data.h" |
| 26 #include "content/child/service_worker/service_worker_network_provider.h" | 26 #include "content/child/service_worker/service_worker_network_provider.h" |
| 27 #include "content/child/service_worker/service_worker_provider_context.h" | 27 #include "content/child/service_worker/service_worker_provider_context.h" |
| 28 #include "content/child/service_worker/web_service_worker_provider_impl.h" | 28 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
| 29 #include "content/child/web_socket_stream_handle_impl.h" | |
| 30 #include "content/child/web_url_loader_impl.h" | 29 #include "content/child/web_url_loader_impl.h" |
| 31 #include "content/child/web_url_request_util.h" | 30 #include "content/child/web_url_request_util.h" |
| 32 #include "content/child/webmessageportchannel_impl.h" | 31 #include "content/child/webmessageportchannel_impl.h" |
| 33 #include "content/child/websocket_bridge.h" | 32 #include "content/child/websocket_bridge.h" |
| 34 #include "content/child/weburlresponse_extradata_impl.h" | 33 #include "content/child/weburlresponse_extradata_impl.h" |
| 35 #include "content/common/clipboard_messages.h" | 34 #include "content/common/clipboard_messages.h" |
| 36 #include "content/common/frame_messages.h" | 35 #include "content/common/frame_messages.h" |
| 37 #include "content/common/input_messages.h" | 36 #include "content/common/input_messages.h" |
| 38 #include "content/common/service_worker/service_worker_types.h" | 37 #include "content/common/service_worker/service_worker_types.h" |
| 39 #include "content/common/socket_stream_handle_data.h" | |
| 40 #include "content/common/swapped_out_messages.h" | 38 #include "content/common/swapped_out_messages.h" |
| 41 #include "content/common/view_messages.h" | 39 #include "content/common/view_messages.h" |
| 42 #include "content/public/common/bindings_policy.h" | 40 #include "content/public/common/bindings_policy.h" |
| 43 #include "content/public/common/content_constants.h" | 41 #include "content/public/common/content_constants.h" |
| 44 #include "content/public/common/content_switches.h" | 42 #include "content/public/common/content_switches.h" |
| 45 #include "content/public/common/context_menu_params.h" | 43 #include "content/public/common/context_menu_params.h" |
| 46 #include "content/public/common/page_state.h" | 44 #include "content/public/common/page_state.h" |
| 47 #include "content/public/common/resource_response.h" | 45 #include "content/public/common/resource_response.h" |
| 48 #include "content/public/common/url_constants.h" | 46 #include "content/public/common/url_constants.h" |
| 49 #include "content/public/common/url_utils.h" | 47 #include "content/public/common/url_utils.h" |
| (...skipping 3042 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3092 return; | 3090 return; |
| 3093 } | 3091 } |
| 3094 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( | 3092 ChildThread::current()->quota_dispatcher()->RequestStorageQuota( |
| 3095 render_view_->GetRoutingID(), | 3093 render_view_->GetRoutingID(), |
| 3096 GURL(origin.toString()), | 3094 GURL(origin.toString()), |
| 3097 static_cast<storage::StorageType>(type), | 3095 static_cast<storage::StorageType>(type), |
| 3098 requested_size, | 3096 requested_size, |
| 3099 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); | 3097 QuotaDispatcher::CreateWebStorageQuotaCallbacksWrapper(callbacks)); |
| 3100 } | 3098 } |
| 3101 | 3099 |
| 3102 void RenderFrameImpl::willOpenSocketStream( | |
| 3103 blink::WebSocketStreamHandle* handle) { | |
| 3104 WebSocketStreamHandleImpl* impl = | |
| 3105 static_cast<WebSocketStreamHandleImpl*>(handle); | |
| 3106 impl->SetUserData(handle, new SocketStreamHandleData(routing_id_)); | |
| 3107 } | |
| 3108 | |
| 3109 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { | 3100 void RenderFrameImpl::willOpenWebSocket(blink::WebSocketHandle* handle) { |
| 3110 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); | 3101 WebSocketBridge* impl = static_cast<WebSocketBridge*>(handle); |
| 3111 impl->set_render_frame_id(routing_id_); | 3102 impl->set_render_frame_id(routing_id_); |
| 3112 } | 3103 } |
| 3113 | 3104 |
| 3114 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { | 3105 blink::WebGeolocationClient* RenderFrameImpl::geolocationClient() { |
| 3115 if (!geolocation_dispatcher_) | 3106 if (!geolocation_dispatcher_) |
| 3116 geolocation_dispatcher_ = new GeolocationDispatcher(this); | 3107 geolocation_dispatcher_ = new GeolocationDispatcher(this); |
| 3117 return geolocation_dispatcher_; | 3108 return geolocation_dispatcher_; |
| 3118 } | 3109 } |
| (...skipping 987 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4106 | 4097 |
| 4107 #if defined(ENABLE_BROWSER_CDMS) | 4098 #if defined(ENABLE_BROWSER_CDMS) |
| 4108 RendererCdmManager* RenderFrameImpl::GetCdmManager() { | 4099 RendererCdmManager* RenderFrameImpl::GetCdmManager() { |
| 4109 if (!cdm_manager_) | 4100 if (!cdm_manager_) |
| 4110 cdm_manager_ = new RendererCdmManager(this); | 4101 cdm_manager_ = new RendererCdmManager(this); |
| 4111 return cdm_manager_; | 4102 return cdm_manager_; |
| 4112 } | 4103 } |
| 4113 #endif // defined(ENABLE_BROWSER_CDMS) | 4104 #endif // defined(ENABLE_BROWSER_CDMS) |
| 4114 | 4105 |
| 4115 } // namespace content | 4106 } // namespace content |
| OLD | NEW |