OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H | 5 #ifndef CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H |
6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H | 6 #define CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "content/child/child_message_filter.h" | 10 #include "content/child/child_message_filter.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 public: | 35 public: |
36 EmbeddedSharedWorkerStub( | 36 EmbeddedSharedWorkerStub( |
37 const GURL& url, | 37 const GURL& url, |
38 const base::string16& name, | 38 const base::string16& name, |
39 const base::string16& content_security_policy, | 39 const base::string16& content_security_policy, |
40 blink::WebContentSecurityPolicyType security_policy_type, | 40 blink::WebContentSecurityPolicyType security_policy_type, |
41 bool pause_on_start, | 41 bool pause_on_start, |
42 int route_id); | 42 int route_id); |
43 | 43 |
44 // IPC::Listener implementation. | 44 // IPC::Listener implementation. |
45 virtual bool OnMessageReceived(const IPC::Message& message) override; | 45 bool OnMessageReceived(const IPC::Message& message) override; |
46 virtual void OnChannelError() override; | 46 void OnChannelError() override; |
47 | 47 |
48 // blink::WebSharedWorkerClient implementation. | 48 // blink::WebSharedWorkerClient implementation. |
49 virtual void workerContextClosed() override; | 49 virtual void workerContextClosed() override; |
50 virtual void workerContextDestroyed() override; | 50 virtual void workerContextDestroyed() override; |
51 virtual void workerReadyForInspection() override; | 51 virtual void workerReadyForInspection() override; |
52 virtual void workerScriptLoaded() override; | 52 virtual void workerScriptLoaded() override; |
53 virtual void workerScriptLoadFailed() override; | 53 virtual void workerScriptLoadFailed() override; |
54 virtual void selectAppCacheID(long long) override; | 54 virtual void selectAppCacheID(long long) override; |
55 virtual blink::WebNotificationPresenter* notificationPresenter() override; | 55 virtual blink::WebNotificationPresenter* notificationPresenter() override; |
56 virtual blink::WebApplicationCacheHost* createApplicationCacheHost( | 56 virtual blink::WebApplicationCacheHost* createApplicationCacheHost( |
57 blink::WebApplicationCacheHostClient*) override; | 57 blink::WebApplicationCacheHostClient*) override; |
58 virtual blink::WebWorkerPermissionClientProxy* | 58 virtual blink::WebWorkerPermissionClientProxy* |
59 createWorkerPermissionClientProxy( | 59 createWorkerPermissionClientProxy( |
60 const blink::WebSecurityOrigin& origin) override; | 60 const blink::WebSecurityOrigin& origin) override; |
61 virtual void dispatchDevToolsMessage( | 61 virtual void dispatchDevToolsMessage( |
62 const blink::WebString& message) override; | 62 const blink::WebString& message) override; |
63 virtual void saveDevToolsAgentState(const blink::WebString& state) override; | 63 virtual void saveDevToolsAgentState(const blink::WebString& state) override; |
64 | 64 |
65 private: | 65 private: |
66 virtual ~EmbeddedSharedWorkerStub(); | 66 ~EmbeddedSharedWorkerStub() override; |
67 | 67 |
68 void Shutdown(); | 68 void Shutdown(); |
69 bool Send(IPC::Message* message); | 69 bool Send(IPC::Message* message); |
70 | 70 |
71 // WebSharedWorker will own |channel|. | 71 // WebSharedWorker will own |channel|. |
72 void ConnectToChannel(WebMessagePortChannelImpl* channel); | 72 void ConnectToChannel(WebMessagePortChannelImpl* channel); |
73 | 73 |
74 void OnConnect(int sent_message_port_id, int routing_id); | 74 void OnConnect(int sent_message_port_id, int routing_id); |
75 void OnTerminateWorkerContext(); | 75 void OnTerminateWorkerContext(); |
76 | 76 |
77 int route_id_; | 77 int route_id_; |
78 base::string16 name_; | 78 base::string16 name_; |
79 bool runing_; | 79 bool runing_; |
80 GURL url_; | 80 GURL url_; |
81 blink::WebSharedWorker* impl_; | 81 blink::WebSharedWorker* impl_; |
82 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; | 82 scoped_ptr<SharedWorkerDevToolsAgent> worker_devtools_agent_; |
83 | 83 |
84 typedef std::vector<WebMessagePortChannelImpl*> PendingChannelList; | 84 typedef std::vector<WebMessagePortChannelImpl*> PendingChannelList; |
85 PendingChannelList pending_channels_; | 85 PendingChannelList pending_channels_; |
86 | 86 |
87 ScopedChildProcessReference process_ref_; | 87 ScopedChildProcessReference process_ref_; |
88 WebApplicationCacheHostImpl* app_cache_host_; | 88 WebApplicationCacheHostImpl* app_cache_host_; |
89 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub); | 89 DISALLOW_COPY_AND_ASSIGN(EmbeddedSharedWorkerStub); |
90 }; | 90 }; |
91 | 91 |
92 } // namespace content | 92 } // namespace content |
93 | 93 |
94 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H | 94 #endif // CONTENT_RENDERER_SHARED_WORKER_EMBEDDED_SHARED_WORKER_STUB_H |
OLD | NEW |