OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_WEBSHAREDWORKER_PROXY_H_ | 5 #ifndef CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_ |
6 #define CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_ | 6 #define CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 21 matching lines...) Expand all Loading... |
32 int route_id, | 32 int route_id, |
33 int render_frame_route_id); | 33 int render_frame_route_id); |
34 virtual ~WebSharedWorkerProxy(); | 34 virtual ~WebSharedWorkerProxy(); |
35 | 35 |
36 // Implementations of WebSharedWorkerConnector APIs | 36 // Implementations of WebSharedWorkerConnector APIs |
37 virtual void connect(blink::WebMessagePortChannel* channel, | 37 virtual void connect(blink::WebMessagePortChannel* channel, |
38 ConnectListener* listener); | 38 ConnectListener* listener); |
39 | 39 |
40 private: | 40 private: |
41 // IPC::Listener implementation. | 41 // IPC::Listener implementation. |
42 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 42 virtual bool OnMessageReceived(const IPC::Message& message) override; |
43 | 43 |
44 // Disconnects the worker (stops listening for incoming messages). | 44 // Disconnects the worker (stops listening for incoming messages). |
45 void Disconnect(); | 45 void Disconnect(); |
46 | 46 |
47 // Sends a message to the worker thread (forwarded via the RenderViewHost). | 47 // Sends a message to the worker thread (forwarded via the RenderViewHost). |
48 // If WorkerStarted() has not yet been called, message is queued. | 48 // If WorkerStarted() has not yet been called, message is queued. |
49 bool Send(IPC::Message*); | 49 bool Send(IPC::Message*); |
50 | 50 |
51 // Returns true if there are queued messages. | 51 // Returns true if there are queued messages. |
52 bool HasQueuedMessages() { return !queued_messages_.empty(); } | 52 bool HasQueuedMessages() { return !queued_messages_.empty(); } |
(...skipping 29 matching lines...) Expand all Loading... |
82 int pending_route_id_; | 82 int pending_route_id_; |
83 ConnectListener* connect_listener_; | 83 ConnectListener* connect_listener_; |
84 bool created_; | 84 bool created_; |
85 | 85 |
86 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerProxy); | 86 DISALLOW_COPY_AND_ASSIGN(WebSharedWorkerProxy); |
87 }; | 87 }; |
88 | 88 |
89 } // namespace content | 89 } // namespace content |
90 | 90 |
91 #endif // CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_ | 91 #endif // CONTENT_RENDERER_WEBSHAREDWORKER_PROXY_H_ |
OLD | NEW |