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

Unified Diff: public/web/WebSharedWorkerRepositoryClient.h

Issue 40143003: Simplify SharedWorkerRepository code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/web/WebSharedWorkerRepository.h ('k') | public/web/WebView.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/web/WebSharedWorkerRepositoryClient.h
diff --git a/public/web/WebSharedWorkerRepository.h b/public/web/WebSharedWorkerRepositoryClient.h
similarity index 73%
copy from public/web/WebSharedWorkerRepository.h
copy to public/web/WebSharedWorkerRepositoryClient.h
index 34c4a91b1df661915d8bc44e7b6c543c83e6071d..c81a5d5788e1d1e2bfbb3040c002ca5b1c13206e 100644
--- a/public/web/WebSharedWorkerRepository.h
+++ b/public/web/WebSharedWorkerRepositoryClient.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
+ * Copyright (C) 2013 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -28,10 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSharedWorkerRepository_h
-#define WebSharedWorkerRepository_h
-
-#include "../platform/WebCommon.h"
+#ifndef WebSharedWorkerRepositoryClient_h
+#define WebSharedWorkerRepositoryClient_h
namespace WebKit {
@@ -39,24 +37,18 @@ class WebString;
class WebSharedWorker;
class WebURL;
-class WebSharedWorkerRepository {
+class WebSharedWorkerRepositoryClient {
public:
// Unique identifier for the parent document of a worker (unique within a given process).
typedef unsigned long long DocumentID;
- // Tracks a newly-created SharedWorker via the repository.
- virtual void addSharedWorker(WebSharedWorker*, DocumentID) = 0;
+ // Creates a new shared worker. This may return null.
+ virtual WebSharedWorker* createSharedWorker(const WebURL&, const WebString&, DocumentID) { return 0; }
// Invoked when a document has been detached. DocumentID can be re-used after documentDetached() is invoked.
- virtual void documentDetached(DocumentID) = 0;
-
- // Returns true if the passed document is associated with any SharedWorkers.
- virtual bool hasSharedWorkers(DocumentID) = 0;
+ virtual void documentDetached(DocumentID) { }
};
-// Initializes shared worker support.
-BLINK_EXPORT void setSharedWorkerRepository(WebSharedWorkerRepository*);
-
} // namespace WebKit
-#endif // WebSharedWorkerRepository_h
+#endif // WebSharedWorkerRepositoryClient_h
« no previous file with comments | « public/web/WebSharedWorkerRepository.h ('k') | public/web/WebView.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698