IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / renderer / shared_worker_repository.h
blob35537819f2d40df4ef13d8a4d8bf09faa67f9ff9
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
3 // found in the LICENSE file.
5 #ifndef CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_
6 #define CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_
8 #include <set>
10 #include "base/basictypes.h"
11 #include "content/public/renderer/render_frame_observer.h"
12 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h"
13 #include "third_party/WebKit/public/web/WebSharedWorkerRepositoryClient.h"
15 namespace content {
17 class RenderFrameImpl;
19 class SharedWorkerRepository : public RenderFrameObserver,
20 public blink::WebSharedWorkerRepositoryClient {
21 public:
22 explicit SharedWorkerRepository(RenderFrameImpl* render_frame);
23 virtual ~SharedWorkerRepository();
25 // RenderFrameObserver overrides.
26 virtual void WebFrameCreated(blink::WebFrame* frame) OVERRIDE;
28 // WebSharedWorkerRepositoryClient overrides.
29 virtual blink::WebSharedWorkerConnector* createSharedWorkerConnector(
30 const blink::WebURL& url,
31 const blink::WebString& name,
32 DocumentID document_id,
33 const blink::WebString& content_security_policy,
34 blink::WebContentSecurityPolicyType) OVERRIDE;
35 virtual void documentDetached(DocumentID document_id) OVERRIDE;
37 private:
38 std::set<DocumentID> documents_with_workers_;
40 DISALLOW_COPY_AND_ASSIGN(SharedWorkerRepository);
43 } // namespace content
45 #endif // CONTENT_RENDERER_SHARED_WORKER_REPOSITORY_H_