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

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

Issue 138333006: Now that RenderFrame is 1:1 with WebFrame, add the associated getters and start cleaning up assumpt… (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 6 years, 11 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/shared_worker_repository.h" 5 #include "content/renderer/shared_worker_repository.h"
6 6
7 #include "content/child/child_thread.h" 7 #include "content/child/child_thread.h"
8 #include "content/common/view_messages.h" 8 #include "content/common/view_messages.h"
9 #include "content/renderer/render_frame_impl.h" 9 #include "content/renderer/render_frame_impl.h"
10 #include "content/renderer/websharedworker_proxy.h" 10 #include "content/renderer/websharedworker_proxy.h"
11 #include "third_party/WebKit/public/web/WebFrame.h" 11 #include "third_party/WebKit/public/web/WebFrame.h"
12 12
13 namespace content { 13 namespace content {
14 14
15 SharedWorkerRepository::SharedWorkerRepository(RenderFrameImpl* render_frame) 15 SharedWorkerRepository::SharedWorkerRepository(RenderFrameImpl* render_frame)
16 : RenderFrameObserver(render_frame) { 16 : RenderFrameObserver(render_frame) {
17 render_frame->GetWebFrame()->setSharedWorkerRepositoryClient(this);
17 } 18 }
18 19
19 SharedWorkerRepository::~SharedWorkerRepository() {} 20 SharedWorkerRepository::~SharedWorkerRepository() {}
20 21
21 void SharedWorkerRepository::WebFrameCreated(blink::WebFrame* frame) {
22 frame->setSharedWorkerRepositoryClient(this);
23 }
24
25 blink::WebSharedWorkerConnector* 22 blink::WebSharedWorkerConnector*
26 SharedWorkerRepository::createSharedWorkerConnector( 23 SharedWorkerRepository::createSharedWorkerConnector(
27 const blink::WebURL& url, 24 const blink::WebURL& url,
28 const blink::WebString& name, 25 const blink::WebString& name,
29 DocumentID document_id, 26 DocumentID document_id,
30 const blink::WebString& content_security_policy, 27 const blink::WebString& content_security_policy,
31 blink::WebContentSecurityPolicyType security_policy_type) { 28 blink::WebContentSecurityPolicyType security_policy_type) {
32 int route_id = MSG_ROUTING_NONE; 29 int route_id = MSG_ROUTING_NONE;
33 bool exists = false; 30 bool exists = false;
34 bool url_mismatch = false; 31 bool url_mismatch = false;
(...skipping 21 matching lines...) Expand all
56 void SharedWorkerRepository::documentDetached(DocumentID document) { 53 void SharedWorkerRepository::documentDetached(DocumentID document) {
57 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document); 54 std::set<DocumentID>::iterator iter = documents_with_workers_.find(document);
58 if (iter != documents_with_workers_.end()) { 55 if (iter != documents_with_workers_.end()) {
59 // Notify the browser process that the document has shut down. 56 // Notify the browser process that the document has shut down.
60 Send(new ViewHostMsg_DocumentDetached(document)); 57 Send(new ViewHostMsg_DocumentDetached(document));
61 documents_with_workers_.erase(iter); 58 documents_with_workers_.erase(iter);
62 } 59 }
63 } 60 }
64 61
65 } // namespace content 62 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698