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_registry_proxy.h" |
14 #include "content/common/socket_stream_handle_data.h" | 17 #include "content/common/socket_stream_handle_data.h" |
15 #include "content/common/swapped_out_messages.h" | 18 #include "content/common/swapped_out_messages.h" |
16 #include "content/common/view_messages.h" | 19 #include "content/common/view_messages.h" |
17 #include "content/public/common/content_constants.h" | 20 #include "content/public/common/content_constants.h" |
18 #include "content/public/common/content_switches.h" | 21 #include "content/public/common/content_switches.h" |
19 #include "content/public/common/url_constants.h" | 22 #include "content/public/common/url_constants.h" |
20 #include "content/public/renderer/content_renderer_client.h" | 23 #include "content/public/renderer/content_renderer_client.h" |
21 #include "content/public/renderer/document_state.h" | 24 #include "content/public/renderer/document_state.h" |
22 #include "content/public/renderer/navigation_state.h" | 25 #include "content/public/renderer/navigation_state.h" |
23 #include "content/renderer/browser_plugin/browser_plugin.h" | 26 #include "content/renderer/browser_plugin/browser_plugin.h" |
(...skipping 28 matching lines...) Expand all Loading... |
52 #endif | 55 #endif |
53 | 56 |
54 using WebKit::WebDataSource; | 57 using WebKit::WebDataSource; |
55 using WebKit::WebDocument; | 58 using WebKit::WebDocument; |
56 using WebKit::WebFrame; | 59 using WebKit::WebFrame; |
57 using WebKit::WebNavigationPolicy; | 60 using WebKit::WebNavigationPolicy; |
58 using WebKit::WebPluginParams; | 61 using WebKit::WebPluginParams; |
59 using WebKit::WebReferrerPolicy; | 62 using WebKit::WebReferrerPolicy; |
60 using WebKit::WebSearchableFormData; | 63 using WebKit::WebSearchableFormData; |
61 using WebKit::WebSecurityOrigin; | 64 using WebKit::WebSecurityOrigin; |
| 65 using WebKit::WebServiceWorkerRegistry; |
62 using WebKit::WebStorageQuotaCallbacks; | 66 using WebKit::WebStorageQuotaCallbacks; |
63 using WebKit::WebString; | 67 using WebKit::WebString; |
64 using WebKit::WebURL; | 68 using WebKit::WebURL; |
65 using WebKit::WebURLError; | 69 using WebKit::WebURLError; |
66 using WebKit::WebURLRequest; | 70 using WebKit::WebURLRequest; |
67 using WebKit::WebURLResponse; | 71 using WebKit::WebURLResponse; |
68 using WebKit::WebUserGestureIndicator; | 72 using WebKit::WebUserGestureIndicator; |
69 using WebKit::WebVector; | 73 using WebKit::WebVector; |
70 using WebKit::WebView; | 74 using WebKit::WebView; |
71 using base::Time; | 75 using base::Time; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 return NULL; | 212 return NULL; |
209 return new RendererWebApplicationCacheHostImpl( | 213 return new RendererWebApplicationCacheHostImpl( |
210 RenderViewImpl::FromWebView(frame->view()), client, | 214 RenderViewImpl::FromWebView(frame->view()), client, |
211 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); | 215 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); |
212 } | 216 } |
213 | 217 |
214 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { | 218 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { |
215 return render_view_->cookieJar(frame); | 219 return render_view_->cookieJar(frame); |
216 } | 220 } |
217 | 221 |
| 222 WebKit::WebServiceWorkerRegistry* RenderFrameImpl::serviceWorkerRegistry( |
| 223 WebKit::WebFrame* frame) { |
| 224 return new WebServiceWorkerRegistryImpl( |
| 225 ChildThread::current()->thread_safe_sender(), |
| 226 ChildThread::current()->service_worker_message_filter()); |
| 227 } |
| 228 |
218 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { | 229 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { |
219 render_view_->didAccessInitialDocument(frame); | 230 render_view_->didAccessInitialDocument(frame); |
220 } | 231 } |
221 | 232 |
222 void RenderFrameImpl::didCreateFrame(WebKit::WebFrame* parent, | 233 void RenderFrameImpl::didCreateFrame(WebKit::WebFrame* parent, |
223 WebKit::WebFrame* child) { | 234 WebKit::WebFrame* child) { |
224 render_view_->Send(new ViewHostMsg_FrameAttached( | 235 render_view_->Send(new ViewHostMsg_FrameAttached( |
225 render_view_->GetRoutingID(), parent->identifier(), child->identifier(), | 236 render_view_->GetRoutingID(), parent->identifier(), child->identifier(), |
226 UTF16ToUTF8(child->assignedName()))); | 237 UTF16ToUTF8(child->assignedName()))); |
227 } | 238 } |
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
869 | 880 |
870 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, | 881 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, |
871 int arb_robustness_status_code) { | 882 int arb_robustness_status_code) { |
872 render_view_->Send(new ViewHostMsg_DidLose3DContext( | 883 render_view_->Send(new ViewHostMsg_DidLose3DContext( |
873 GURL(frame->top()->document().securityOrigin().toString()), | 884 GURL(frame->top()->document().securityOrigin().toString()), |
874 THREE_D_API_TYPE_WEBGL, | 885 THREE_D_API_TYPE_WEBGL, |
875 arb_robustness_status_code)); | 886 arb_robustness_status_code)); |
876 } | 887 } |
877 | 888 |
878 } // namespace content | 889 } // namespace content |
OLD | NEW |