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

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

Issue 25008006: Flush out initial [un]registerServiceWorker roundtrip (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address review comments Created 7 years, 2 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
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>
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
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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 return NULL; 218 return NULL;
214 return new RendererWebApplicationCacheHostImpl( 219 return new RendererWebApplicationCacheHostImpl(
215 RenderViewImpl::FromWebView(frame->view()), client, 220 RenderViewImpl::FromWebView(frame->view()), client,
216 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy()); 221 RenderThreadImpl::current()->appcache_dispatcher()->backend_proxy());
217 } 222 }
218 223
219 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) { 224 WebKit::WebCookieJar* RenderFrameImpl::cookieJar(WebKit::WebFrame* frame) {
220 return render_view_->cookieJar(frame); 225 return render_view_->cookieJar(frame);
221 } 226 }
222 227
228 WebKit::WebServiceWorkerProvider* RenderFrameImpl::createServiceWorkerProvider(
229 WebKit::WebFrame* frame,
230 WebKit::WebServiceWorkerProviderClient* client) {
231 return new WebServiceWorkerProviderImpl(
232 ChildThread::current()->thread_safe_sender(),
233 ChildThread::current()->service_worker_message_filter(),
234 GURL(frame->document().securityOrigin().toString()),
235 make_scoped_ptr(client));
236 }
237
223 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) { 238 void RenderFrameImpl::didAccessInitialDocument(WebKit::WebFrame* frame) {
224 render_view_->didAccessInitialDocument(frame); 239 render_view_->didAccessInitialDocument(frame);
225 } 240 }
226 241
227 WebKit::WebFrame* RenderFrameImpl::createChildFrame( 242 WebKit::WebFrame* RenderFrameImpl::createChildFrame(
228 WebKit::WebFrame* parent, 243 WebKit::WebFrame* parent,
229 const WebKit::WebString& name) { 244 const WebKit::WebString& name) {
230 RenderFrameImpl* child_render_frame = this; 245 RenderFrameImpl* child_render_frame = this;
231 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier(); 246 long long child_frame_identifier = WebFrame::generateEmbedderIdentifier();
232 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) { 247 if (CommandLine::ForCurrentProcess()->HasSwitch(switches::kSitePerProcess)) {
(...skipping 721 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 969
955 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame, 970 void RenderFrameImpl::didLoseWebGLContext(WebKit::WebFrame* frame,
956 int arb_robustness_status_code) { 971 int arb_robustness_status_code) {
957 render_view_->Send(new ViewHostMsg_DidLose3DContext( 972 render_view_->Send(new ViewHostMsg_DidLose3DContext(
958 GURL(frame->top()->document().securityOrigin().toString()), 973 GURL(frame->top()->document().securityOrigin().toString()),
959 THREE_D_API_TYPE_WEBGL, 974 THREE_D_API_TYPE_WEBGL,
960 arb_robustness_status_code)); 975 arb_robustness_status_code));
961 } 976 }
962 977
963 } // namespace content 978 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698