blob: 8bd615c80a0ad1d1a66494fe863362b5dfc3d44c [file] [log] [blame]
[email protected]f44f18c2010-07-31 15:33:321// Copyright (c) 2010 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.
[email protected]ab3505362009-10-30 18:11:474
[email protected]6f516082011-03-17 19:15:355#ifndef CONTENT_RENDERER_WEBSHAREDWORKERREPOSITORY_IMPL_H_
6#define CONTENT_RENDERER_WEBSHAREDWORKERREPOSITORY_IMPL_H_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]ab3505362009-10-30 18:11:478
[email protected]8bd0fe62011-01-17 06:44:379#include "third_party/WebKit/Source/WebKit/chromium/public/WebSharedWorkerRepository.h"
[email protected]ab3505362009-10-30 18:11:4710
[email protected]30447b62009-11-13 01:13:3711#include "base/hash_tables.h"
12
[email protected]30a71872009-10-31 16:09:2113namespace WebKit {
[email protected]f44f18c2010-07-31 15:33:3214class WebSharedWorker;
[email protected]30a71872009-10-31 16:09:2115}
[email protected]ab3505362009-10-30 18:11:4716
17class WebSharedWorkerRepositoryImpl : public WebKit::WebSharedWorkerRepository {
[email protected]30447b62009-11-13 01:13:3718 public:
[email protected]38e08982010-10-22 17:28:4319 WebSharedWorkerRepositoryImpl();
20 virtual ~WebSharedWorkerRepositoryImpl();
[email protected]8e4f0102010-07-30 23:42:4321
[email protected]f44f18c2010-07-31 15:33:3222 virtual void addSharedWorker(WebKit::WebSharedWorker*, DocumentID document);
23 virtual void documentDetached(DocumentID document);
[email protected]30447b62009-11-13 01:13:3724
[email protected]f44f18c2010-07-31 15:33:3225 // Returns true if the document has created a SharedWorker (used by the
26 // WebKit code to determine if the document can be suspended).
27 virtual bool hasSharedWorkers(DocumentID document);
[email protected]8e4f0102010-07-30 23:42:4328
[email protected]30447b62009-11-13 01:13:3729 private:
[email protected]f44f18c2010-07-31 15:33:3230 // The set of documents that have created a SharedWorker.
31 typedef base::hash_set<DocumentID> DocumentSet;
32 DocumentSet shared_worker_parents_;
[email protected]ab3505362009-10-30 18:11:4733};
34
[email protected]6f516082011-03-17 19:15:3535#endif // CONTENT_RENDERER_WEBSHAREDWORKERREPOSITORY_IMPL_H_