OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_WEBWORKER_PROXY_H_ | 5 #ifndef CHROME_RENDERER_WEBWORKER_PROXY_H_ |
6 #define CHROME_RENDERER_WEBWORKER_PROXY_H_ | 6 #define CHROME_RENDERER_WEBWORKER_PROXY_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 25 matching lines...) Expand all Loading... |
36 virtual void postMessageToWorkerContext(const WebKit::WebString& message); | 36 virtual void postMessageToWorkerContext(const WebKit::WebString& message); |
37 virtual void workerObjectDestroyed(); | 37 virtual void workerObjectDestroyed(); |
38 | 38 |
39 // IPC::Channel::Listener implementation. | 39 // IPC::Channel::Listener implementation. |
40 void OnMessageReceived(const IPC::Message& message); | 40 void OnMessageReceived(const IPC::Message& message); |
41 | 41 |
42 private: | 42 private: |
43 bool Send(IPC::Message* message); | 43 bool Send(IPC::Message* message); |
44 | 44 |
45 void OnDedicatedWorkerCreated(); | 45 void OnDedicatedWorkerCreated(); |
| 46 void Disconnect(); |
46 | 47 |
47 // The routing id used to reach WebWorkerClientProxy in the worker process. | 48 // The routing id used to reach WebWorkerClientProxy in the worker process. |
48 int route_id_; | 49 int route_id_; |
49 | 50 |
50 ChildThread* child_thread_; | 51 ChildThread* child_thread_; |
51 | 52 |
52 // The routing id for the RenderView that created this worker. | 53 // The routing id for the RenderView that created this worker. |
53 int render_view_route_id_; | 54 int render_view_route_id_; |
54 | 55 |
55 // Used to communicate to the WebCore::Worker object in response to IPC | 56 // Used to communicate to the WebCore::Worker object in response to IPC |
56 // messages. | 57 // messages. |
57 WebKit::WebWorkerClient* client_; | 58 WebKit::WebWorkerClient* client_; |
58 | 59 |
59 // Stores messages that were sent before the StartWorkerContext message. | 60 // Stores messages that were sent before the StartWorkerContext message. |
60 std::vector<IPC::Message*> queued_messages_; | 61 std::vector<IPC::Message*> queued_messages_; |
61 | 62 |
62 DISALLOW_COPY_AND_ASSIGN(WebWorkerProxy); | 63 DISALLOW_COPY_AND_ASSIGN(WebWorkerProxy); |
63 }; | 64 }; |
64 | 65 |
65 #endif // CHROME_RENDERER_WEBWORKER_PROXY_H_ | 66 #endif // CHROME_RENDERER_WEBWORKER_PROXY_H_ |
OLD | NEW |