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> |
| 8 #include <string> |
| 9 |
7 #include "base/command_line.h" | 10 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 11 #include "base/strings/utf_string_conversions.h" |
9 #include "base/time/time.h" | 12 #include "base/time/time.h" |
10 #include "content/child/appcache/appcache_dispatcher.h" | 13 #include "content/child/appcache/appcache_dispatcher.h" |
11 #include "content/child/plugin_messages.h" | 14 #include "content/child/plugin_messages.h" |
12 #include "content/child/quota_dispatcher.h" | 15 #include "content/child/quota_dispatcher.h" |
13 #include "content/child/request_extra_data.h" | 16 #include "content/child/request_extra_data.h" |
| 17 #include "content/child/service_worker/web_service_worker_provider_impl.h" |
14 #include "content/common/frame_messages.h" | 18 #include "content/common/frame_messages.h" |
15 #include "content/common/socket_stream_handle_data.h" | 19 #include "content/common/socket_stream_handle_data.h" |
16 #include "content/common/swapped_out_messages.h" | 20 #include "content/common/swapped_out_messages.h" |
17 #include "content/common/view_messages.h" | 21 #include "content/common/view_messages.h" |
18 #include "content/public/common/content_constants.h" | 22 #include "content/public/common/content_constants.h" |
19 #include "content/public/common/content_switches.h" | 23 #include "content/public/common/content_switches.h" |
20 #include "content/public/common/url_constants.h" | 24 #include "content/public/common/url_constants.h" |
21 #include "content/public/renderer/content_renderer_client.h" | 25 #include "content/public/renderer/content_renderer_client.h" |
22 #include "content/public/renderer/document_state.h" | 26 #include "content/public/renderer/document_state.h" |
23 #include "content/public/renderer/navigation_state.h" | 27 #include "content/public/renderer/navigation_state.h" |
(...skipping 29 matching lines...) Expand all Loading... |
53 #endif | 57 #endif |
54 | 58 |
55 using WebKit::WebDataSource; | 59 using WebKit::WebDataSource; |
56 using WebKit::WebDocument; | 60 using WebKit::WebDocument; |
57 using WebKit::WebFrame; | 61 using WebKit::WebFrame; |
58 using WebKit::WebNavigationPolicy; | 62 using WebKit::WebNavigationPolicy; |
59 using WebKit::WebPluginParams; | 63 using WebKit::WebPluginParams; |
60 using WebKit::WebReferrerPolicy; | 64 using WebKit::WebReferrerPolicy; |
61 using WebKit::WebSearchableFormData; | 65 using WebKit::WebSearchableFormData; |
62 using WebKit::WebSecurityOrigin; | 66 using WebKit::WebSecurityOrigin; |
| 67 using WebKit::WebServiceWorkerProvider; |
63 using WebKit::WebStorageQuotaCallbacks; | 68 using WebKit::WebStorageQuotaCallbacks; |
64 using WebKit::WebString; | 69 using WebKit::WebString; |
65 using WebKit::WebURL; | 70 using WebKit::WebURL; |
66 using WebKit::WebURLError; | 71 using WebKit::WebURLError; |
67 using WebKit::WebURLRequest; | 72 using WebKit::WebURLRequest; |
68 using WebKit::WebURLResponse; | 73 using WebKit::WebURLResponse; |
69 using WebKit::WebUserGestureIndicator; | 74 using WebKit::WebUserGestureIndicator; |
70 using WebKit::WebVector; | 75 using WebKit::WebVector; |
71 using WebKit::WebView; | 76 using WebKit::WebView; |
72 using base::Time; | 77 using base::Time; |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 return NULL; | 190 return NULL; |
186 return new RendererWebApplicationCacheHostImpl( | 191 return new RendererWebApplicationCacheHostImpl( |
187 RenderViewImpl::FromWebView(frame->view()), client, | 192 RenderViewImpl::FromWebView(frame->view()), client, |
188 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 193 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
189 } | 194 } |
190 | 195 |
191 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { | 196 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { |
192 return render_view_->cookieJar(frame); | 197 return render_view_->cookieJar(frame); |
193 } | 198 } |
194 | 199 |
| 200 WebKit::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider( |
| 201 WebKit::WebFrame* frame, |
| 202 WebKit::WebServiceWorkerProviderClient* client) { |
| 203 return new WebServiceWorkerProviderImpl( |
| 204 ChildThread::current()->thread_safe_sender(), |
| 205 ChildThread::current()->service_worker_message_filter(), |
| 206 GURL(frame->document().securityOrigin().toString()), |
| 207 make_scoped_ptr(client)); |
| 208 } |
| 209 |
195 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { | 210 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { |
196 render_view_->didAccessInitialDocument(frame); | 211 render_view_->didAccessInitialDocument(frame); |
197 } | 212 } |
198 | 213 |
199 WebKit::WebFrame* RenderFrameImpl::createChildFrame( | 214 WebKit::WebFrame* RenderFrameImpl::createChildFrame( |
200 WebKit::WebFrame* parent, | 215 WebKit::WebFrame* parent, |
201 const WebKit::WebString& name) { | 216 const WebKit::WebString& name) { |
202 RenderFrameImpl* child_render_frame = this; | 217 RenderFrameImpl* child_render_frame = this; |
203 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); | 218 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); |
204 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { | 219 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { |
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
926 | 941 |
927 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, | 942 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, |
928 int arb_robustness_status_code) { | 943 int arb_robustness_status_code) { |
929 render_view_->Send(new ViewHostMsg_DidLose3DContext( | 944 render_view_->Send(new ViewHostMsg_DidLose3DContext( |
930 GURL(frame->top()->document().securityOrigin().toString()), | 945 GURL(frame->top()->document().securityOrigin().toString()), |
931 THREE_D_API_TYPE_WEBGL, | 946 THREE_D_API_TYPE_WEBGL, |
932 arb_robustness_status_code)); | 947 arb_robustness_status_code)); |
933 } | 948 } |
934 | 949 |
935 } // namespace content | 950 } // namespace content |
OLD | NEW |