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 #ifndef CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ | 5 #ifndef CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ |
6 #define CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ | 6 #define CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "content/public/renderer/render_view_observer.h" | 11 #include "content/public/renderer/render_view_observer.h" |
12 #include "third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h" | 12 #include "third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h" |
13 | 13 |
| 14 namespace blink{ |
| 15 enum WebContentSecurityPolicyType; |
| 16 } |
| 17 |
14 namespace content { | 18 namespace content { |
15 | 19 |
16 class RenderViewImpl; | 20 class RenderViewImpl; |
17 | 21 |
18 class SharedWorkerRepository : public RenderViewObserver, | 22 class SharedWorkerRepository : public RenderViewObserver, |
19 public blink::WebSharedWorkerRepositoryClient { | 23 public blink::WebSharedWorkerRepositoryClient { |
20 public: | 24 public: |
21 explicit SharedWorkerRepository(RenderViewImpl* render_view); | 25 explicit SharedWorkerRepository(RenderViewImpl* render_view); |
22 virtual ~SharedWorkerRepository(); | 26 virtual ~SharedWorkerRepository(); |
23 | 27 |
24 // WebSharedWorkerRepositoryClient overrides. | 28 // WebSharedWorkerRepositoryClient overrides. |
25 virtual blink::WebSharedWorkerConnector* createSharedWorkerConnector( | 29 virtual blink::WebSharedWorkerConnector* createSharedWorkerConnector( |
26 const blink::WebURL& url, | 30 const blink::WebURL& url, |
27 const blink::WebString& name, | 31 const blink::WebString& name, |
28 DocumentID document_id) OVERRIDE; | 32 DocumentID document_id, |
| 33 const blink::WebString& content_security_policy, |
| 34 blink::WebContentSecurityPolicyType) OVERRIDE; |
29 virtual void documentDetached(DocumentID document_id) OVERRIDE; | 35 virtual void documentDetached(DocumentID document_id) OVERRIDE; |
30 | 36 |
31 private: | 37 private: |
32 std::set<DocumentID> documents_with_workers_; | 38 std::set<DocumentID> documents_with_workers_; |
33 | 39 |
34 DISALLOW_COPY_AND_ASSIGN(SharedWorkerRepository); | 40 DISALLOW_COPY_AND_ASSIGN(SharedWorkerRepository); |
35 }; | 41 }; |
36 | 42 |
37 } // namespace content | 43 } // namespace content |
38 | 44 |
39 #endif // CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ | 45 #endif // CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_ |
OLD | NEW |