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

Unified Diff: third_party/WebKit/public/web/WebSharedWorkerConnectListener.h

Issue 2627123003: SharedWorker: Simplify connection sequence (Closed)
Patch Set: remove unnecessary forward declaration Created 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | third_party/WebKit/public/web/WebSharedWorkerConnector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/public/web/WebSharedWorkerConnectListener.h
diff --git a/third_party/WebKit/public/web/WebSharedWorkerConnector.h b/third_party/WebKit/public/web/WebSharedWorkerConnectListener.h
similarity index 67%
rename from third_party/WebKit/public/web/WebSharedWorkerConnector.h
rename to third_party/WebKit/public/web/WebSharedWorkerConnectListener.h
index c922c7b0811b485d3264a69f5afadfcdfe0e295d..078eb0282948f72ca0d166eb0084f5264a16f116 100644
--- a/third_party/WebKit/public/web/WebSharedWorkerConnector.h
+++ b/third_party/WebKit/public/web/WebSharedWorkerConnectListener.h
@@ -28,33 +28,26 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebSharedWorkerConnector_h
-#define WebSharedWorkerConnector_h
+#ifndef WebSharedWorkerConnectListener_h
+#define WebSharedWorkerConnectListener_h
-#include "WebContentSecurityPolicy.h"
+#include "WebSharedWorkerCreationErrors.h"
namespace blink {
-class WebMessagePortChannel;
-
-// This is the interface to conncect to SharedWorker.
-// Since SharedWorkers communicate entirely through MessagePorts this interface
-// only contains APIs for starting up a SharedWorker.
-class WebSharedWorkerConnector {
+// This is the callback interface passed from blink to the embedder.
+class WebSharedWorkerConnectListener {
public:
- virtual ~WebSharedWorkerConnector() {}
-
- class ConnectListener {
- public:
- // Invoked once the connect event has been sent so the caller can free this
- // object.
- virtual void connected() = 0;
- virtual void scriptLoadFailed() = 0;
- };
-
- // Sends a connect event to the SharedWorker context. The listener is invoked
- // when this async operation completes.
- virtual void connect(WebMessagePortChannel*, ConnectListener*) = 0;
+ virtual ~WebSharedWorkerConnectListener() = default;
+
+ // Called when a worker is created.
+ virtual void workerCreated(WebWorkerCreationError) = 0;
+
+ // Called when worker script load fails.
+ virtual void scriptLoadFailed() = 0;
+
+ // Called when a connection is established.
+ virtual void connected() = 0;
};
} // namespace blink
« no previous file with comments | « third_party/WebKit/public/BUILD.gn ('k') | third_party/WebKit/public/web/WebSharedWorkerConnector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698