| 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_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 // Called on the IO thread. | 185 // Called on the IO thread. |
| 186 void AddRoute(int route_id, | 186 void AddRoute(int route_id, |
| 187 base::WeakPtr<IPC::Listener> listener, | 187 base::WeakPtr<IPC::Listener> listener, |
| 188 scoped_refptr<base::MessageLoopProxy> loop); | 188 scoped_refptr<base::MessageLoopProxy> loop); |
| 189 // Called on the IO thread. | 189 // Called on the IO thread. |
| 190 void RemoveRoute(int route_id); | 190 void RemoveRoute(int route_id); |
| 191 | 191 |
| 192 // IPC::MessageFilter implementation | 192 // IPC::MessageFilter implementation |
| 193 // (called on the IO thread): | 193 // (called on the IO thread): |
| 194 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 194 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 195 virtual void OnChannelError() OVERRIDE; | 195 virtual void OnSenderError() OVERRIDE; |
| 196 | 196 |
| 197 // The following methods can be called on any thread. | 197 // The following methods can be called on any thread. |
| 198 | 198 |
| 199 // Whether the channel is lost. | 199 // Whether the channel is lost. |
| 200 bool IsLost() const; | 200 bool IsLost() const; |
| 201 | 201 |
| 202 private: | 202 private: |
| 203 virtual ~MessageFilter(); | 203 virtual ~MessageFilter(); |
| 204 | 204 |
| 205 // Threading notes: |listeners_| is only accessed on the IO thread. Every | 205 // Threading notes: |listeners_| is only accessed on the IO thread. Every |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 // Used to look up a proxy from its routing id. | 244 // Used to look up a proxy from its routing id. |
| 245 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 245 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| 246 ProxyMap proxies_; | 246 ProxyMap proxies_; |
| 247 | 247 |
| 248 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 248 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 249 }; | 249 }; |
| 250 | 250 |
| 251 } // namespace content | 251 } // namespace content |
| 252 | 252 |
| 253 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 253 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |