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

Side by Side Diff: content/renderer/shared_worker/embedded_shared_worker_stub.h

Issue 158953008: Implementations of SharedWorker in the renderer process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@WorkerMessages
Patch Set: rebase Created 6 years, 10 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H
6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H
7
8 #include "content/child/child_message_filter.h"
9 #include "content/child/scoped_child_process_reference.h"
10 #include "ipc/ipc_listener.h"
11 #include "third_party/WebKit/public/platform/WebString.h"
12 #include "third_party/WebKit/public/web/WebContentSecurityPolicy.h"
13 #include "third_party/WebKit/public/web/WebSharedWorkerClient.h"
14 #include "url/gurl.h"
15
16 namespace blink {
17 class WebApplicationCacheHost;
18 class WebApplicationCacheHostClient;
19 class WebMessagePortChannel;
20 class WebNotificationPresenter;
21 class WebSecurityOrigin;
22 class WebSharedWorker;
23 class WebWorkerPermissionClientProxy;
24 }
25
26 namespace content {
27 class SharedWorkerDevToolsAgent;
28 class WebMessagePortChannelImpl;
29
30 class EmbeddedSharedWorkerStub : public IPC::Listener,
31 public blink::WebSharedWorkerClient {
32 public:
33 EmbeddedSharedWorkerStub(
34 const GURL& url,
35 const base::string16& name,
36 const base::string16& content_security_policy,
37 blink::WebContentSecurityPolicyType security_policy_type,
38 int route_id);
39
40 // IPC::Listener implementation.
41 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
42 virtual void OnChannelError() OVERRIDE;
43
44 // blink::WebSharedWorkerClient implementation.
45 virtual void workerContextClosed() OVERRIDE;
46 virtual void workerContextDestroyed() OVERRIDE;
47 virtual void workerScriptLoaded() OVERRIDE;
48 virtual void workerScriptLoadFailed() OVERRIDE;
49 virtual void selectAppCacheID(long long) OVERRIDE;
50 virtual blink::WebNotificationPresenter* notificationPresenter() OVERRIDE;
51 virtual blink::WebApplicationCacheHost* createApplicationCacheHost(
52 blink::WebApplicationCacheHostClient*) OVERRIDE;
53 virtual blink::WebWorkerPermissionClientProxy*
54 createWorkerPermissionClientProxy(
55 const blink::WebSecurityOrigin& origin) OVERRIDE;
56 virtual void dispatchDevToolsMessage(
57 const blink::WebString& message) OVERRIDE;
58 virtual void saveDevToolsAgentState(const blink::WebString& state) OVERRIDE;
59
60 private:
61 virtual ~EmbeddedSharedWorkerStub();
62
63 void Shutdown();
64 bool Send(IPC::Message* message);
65
66 void OnConnect(int sent_message_port_id, int routing_id);
67 void OnTerminateWorkerContext();
68
69 int route_id_;
70 base::string16 name_;
71 bool runing_;
72 GURL url_;
73 blink::WebSharedWorker* impl_;
sof 2014/06/23 08:17:22 Who gets to delete this object? Might it explain t
horo 2014/06/23 08:23:03 WebSharedWorkerImpl deletes itself in WebSharedWor
74 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_;
75
76 typedef std::vector<WebMessagePortChannelImpl*> PendingChannelList;
77 PendingChannelList pending_channels_;
78
79 ScopedChildProcessReference process_ref_;
80 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub);
81 };
82
83 } // namespace content
84
85 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H
OLDNEW
« no previous file with comments | « content/content_worker.gypi ('k') | content/renderer/shared_worker/embedded_shared_worker_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698