| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 | 98 |
| 99 bool IsLost() const { | 99 bool IsLost() const { |
| 100 DCHECK(channel_filter_.get()); | 100 DCHECK(channel_filter_.get()); |
| 101 return channel_filter_->IsLost(); | 101 return channel_filter_->IsLost(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 // The GPU stats reported by the GPU process. | 104 // The GPU stats reported by the GPU process. |
| 105 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } | 105 const gpu::GPUInfo& gpu_info() const { return gpu_info_; } |
| 106 | 106 |
| 107 // IPC::Sender implementation: | 107 // IPC::Sender implementation: |
| 108 virtual bool Send(IPC::Message* msg) OVERRIDE; | 108 virtual bool Send(IPC::Message* msg) override; |
| 109 | 109 |
| 110 // Create and connect to a command buffer in the GPU process. | 110 // Create and connect to a command buffer in the GPU process. |
| 111 CommandBufferProxyImpl* CreateViewCommandBuffer( | 111 CommandBufferProxyImpl* CreateViewCommandBuffer( |
| 112 int32 surface_id, | 112 int32 surface_id, |
| 113 CommandBufferProxyImpl* share_group, | 113 CommandBufferProxyImpl* share_group, |
| 114 const std::vector<int32>& attribs, | 114 const std::vector<int32>& attribs, |
| 115 const GURL& active_url, | 115 const GURL& active_url, |
| 116 gfx::GpuPreference gpu_preference); | 116 gfx::GpuPreference gpu_preference); |
| 117 | 117 |
| 118 // Create and connect to a command buffer in the GPU process. | 118 // Create and connect to a command buffer in the GPU process. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 | 178 |
| 179 // Called on the IO thread. | 179 // Called on the IO thread. |
| 180 void AddRoute(int route_id, | 180 void AddRoute(int route_id, |
| 181 base::WeakPtr<IPC::Listener> listener, | 181 base::WeakPtr<IPC::Listener> listener, |
| 182 scoped_refptr<base::MessageLoopProxy> loop); | 182 scoped_refptr<base::MessageLoopProxy> loop); |
| 183 // Called on the IO thread. | 183 // Called on the IO thread. |
| 184 void RemoveRoute(int route_id); | 184 void RemoveRoute(int route_id); |
| 185 | 185 |
| 186 // IPC::MessageFilter implementation | 186 // IPC::MessageFilter implementation |
| 187 // (called on the IO thread): | 187 // (called on the IO thread): |
| 188 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; | 188 virtual bool OnMessageReceived(const IPC::Message& msg) override; |
| 189 virtual void OnChannelError() OVERRIDE; | 189 virtual void OnChannelError() override; |
| 190 | 190 |
| 191 // The following methods can be called on any thread. | 191 // The following methods can be called on any thread. |
| 192 | 192 |
| 193 // Whether the channel is lost. | 193 // Whether the channel is lost. |
| 194 bool IsLost() const; | 194 bool IsLost() const; |
| 195 | 195 |
| 196 private: | 196 private: |
| 197 virtual ~MessageFilter(); | 197 virtual ~MessageFilter(); |
| 198 | 198 |
| 199 // Threading notes: |listeners_| is only accessed on the IO thread. Every | 199 // Threading notes: |listeners_| is only accessed on the IO thread. Every |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // Used to look up a proxy from its routing id. | 238 // Used to look up a proxy from its routing id. |
| 239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; | 239 typedef base::hash_map<int, CommandBufferProxyImpl*> ProxyMap; |
| 240 ProxyMap proxies_; | 240 ProxyMap proxies_; |
| 241 | 241 |
| 242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 242 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 243 }; | 243 }; |
| 244 | 244 |
| 245 } // namespace content | 245 } // namespace content |
| 246 | 246 |
| 247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ | 247 #endif // CONTENT_COMMON_GPU_CLIENT_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |