| 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 <string> |
| 8 |
| 7 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| 9 #include "base/time/time.h" | 11 #include "base/time/time.h" |
| 10 #include "content/child/appcache/appcache_dispatcher.h" | 12 #include "content/child/appcache/appcache_dispatcher.h" |
| 11 #include "content/child/plugin_messages.h" | 13 #include "content/child/plugin_messages.h" |
| 12 #include "content/child/quota_dispatcher.h" | 14 #include "content/child/quota_dispatcher.h" |
| 13 #include "content/child/request_extra_data.h" | 15 #include "content/child/request_extra_data.h" |
| 16 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
| 14 #include "content/common/frame_messages.h" | 17 #include "content/common/frame_messages.h" |
| 15 #include "content/common/socket_stream_handle_data.h" | 18 #include "content/common/socket_stream_handle_data.h" |
| 16 #include "content/common/swapped_out_messages.h" | 19 #include "content/common/swapped_out_messages.h" |
| 17 #include "content/common/view_messages.h" | 20 #include "content/common/view_messages.h" |
| 18 #include "content/public/common/content_constants.h" | 21 #include "content/public/common/content_constants.h" |
| 19 #include "content/public/common/content_switches.h" | 22 #include "content/public/common/content_switches.h" |
| 20 #include "content/public/common/url_constants.h" | 23 #include "content/public/common/url_constants.h" |
| 21 #include "content/public/renderer/content_renderer_client.h" | 24 #include "content/public/renderer/content_renderer_client.h" |
| 22 #include "content/public/renderer/document_state.h" | 25 #include "content/public/renderer/document_state.h" |
| 23 #include "content/public/renderer/navigation_state.h" | 26 #include "content/public/renderer/navigation_state.h" |
| (...skipping 29 matching lines...) Expand all Loading... |
| 53 #endif | 56 #endif |
| 54 | 57 |
| 55 using WebKit::WebDataSource; | 58 using WebKit::WebDataSource; |
| 56 using WebKit::WebDocument; | 59 using WebKit::WebDocument; |
| 57 using WebKit::WebFrame; | 60 using WebKit::WebFrame; |
| 58 using WebKit::WebNavigationPolicy; | 61 using WebKit::WebNavigationPolicy; |
| 59 using WebKit::WebPluginParams; | 62 using WebKit::WebPluginParams; |
| 60 using WebKit::WebReferrerPolicy; | 63 using WebKit::WebReferrerPolicy; |
| 61 using WebKit::WebSearchableFormData; | 64 using WebKit::WebSearchableFormData; |
| 62 using WebKit::WebSecurityOrigin; | 65 using WebKit::WebSecurityOrigin; |
| 66 using WebKit::WebServiceWorkerProvider; |
| 63 using WebKit::WebStorageQuotaCallbacks; | 67 using WebKit::WebStorageQuotaCallbacks; |
| 64 using WebKit::WebString; | 68 using WebKit::WebString; |
| 65 using WebKit::WebURL; | 69 using WebKit::WebURL; |
| 66 using WebKit::WebURLError; | 70 using WebKit::WebURLError; |
| 67 using WebKit::WebURLRequest; | 71 using WebKit::WebURLRequest; |
| 68 using WebKit::WebURLResponse; | 72 using WebKit::WebURLResponse; |
| 69 using WebKit::WebUserGestureIndicator; | 73 using WebKit::WebUserGestureIndicator; |
| 70 using WebKit::WebVector; | 74 using WebKit::WebVector; |
| 71 using WebKit::WebView; | 75 using WebKit::WebView; |
| 72 using base::Time; | 76 using base::Time; |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 return NULL; | 217 return NULL; |
| 214 return new RendererWebApplicationCacheHostImpl( | 218 return new RendererWebApplicationCacheHostImpl( |
| 215 RenderViewImpl::FromWebView(frame->view()), client, | 219 RenderViewImpl::FromWebView(frame->view()), client, |
| 216 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 220 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
| 217 } | 221 } |
| 218 | 222 |
| 219 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { | 223 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { |
| 220 return render_view_->cookieJar(frame); | 224 return render_view_->cookieJar(frame); |
| 221 } | 225 } |
| 222 | 226 |
| 227 WebKit::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider( |
| 228 WebKit::WebFrame* frame, |
| 229 WebKit::WebServiceWorkerProviderClient* client) { |
| 230 return new WebServiceWorkerProviderImpl( |
| 231 ChildThread::current()->thread_safe_sender(), |
| 232 ChildThread::current()->service_worker_message_filter(), |
| 233 GURL(frame->document().securityOrigin().toString()), |
| 234 client); |
| 235 } |
| 236 |
| 223 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { | 237 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { |
| 224 render_view_->didAccessInitialDocument(frame); | 238 render_view_->didAccessInitialDocument(frame); |
| 225 } | 239 } |
| 226 | 240 |
| 227 WebKit::WebFrame* RenderFrameImpl::createChildFrame( | 241 WebKit::WebFrame* RenderFrameImpl::createChildFrame( |
| 228 WebKit::WebFrame* parent, | 242 WebKit::WebFrame* parent, |
| 229 const WebKit::WebString& name) { | 243 const WebKit::WebString& name) { |
| 230 RenderFrameImpl* child_render_frame = this; | 244 RenderFrameImpl* child_render_frame = this; |
| 231 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); | 245 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); |
| 232 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { | 246 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { |
| (...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 912 | 926 |
| 913 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, | 927 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, |
| 914 int arb_robustness_status_code) { | 928 int arb_robustness_status_code) { |
| 915 render_view_->Send(new ViewHostMsg_DidLose3DContext( | 929 render_view_->Send(new ViewHostMsg_DidLose3DContext( |
| 916 GURL(frame->top()->document().securityOrigin().toString()), | 930 GURL(frame->top()->document().securityOrigin().toString()), |
| 917 THREE_D_API_TYPE_WEBGL, | 931 THREE_D_API_TYPE_WEBGL, |
| 918 arb_robustness_status_code)); | 932 arb_robustness_status_code)); |
| 919 } | 933 } |
| 920 | 934 |
| 921 } // namespace content | 935 } // namespace content |
| OLD | NEW |