| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_GPU_GPU_CHANNEL_HOST_H_ | 5 #ifndef CONTENT_RENDERER_GPU_GPU_CHANNEL_HOST_H_ |
| 6 #define CONTENT_RENDERER_GPU_GPU_CHANNEL_HOST_H_ | 6 #define CONTENT_RENDERER_GPU_GPU_CHANNEL_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // Change state to kLost. | 65 // Change state to kLost. |
| 66 void SetStateLost(); | 66 void SetStateLost(); |
| 67 | 67 |
| 68 // The GPU stats reported by the GPU process. | 68 // The GPU stats reported by the GPU process. |
| 69 void set_gpu_info(const content::GPUInfo& gpu_info); | 69 void set_gpu_info(const content::GPUInfo& gpu_info); |
| 70 const content::GPUInfo& gpu_info() const; | 70 const content::GPUInfo& gpu_info() const; |
| 71 | 71 |
| 72 void OnChannelError(); | 72 void OnChannelError(); |
| 73 | 73 |
| 74 // IPC::Message::Sender implementation: | 74 // IPC::Message::Sender implementation: |
| 75 virtual bool Send(IPC::Message* msg); | 75 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 76 | 76 |
| 77 // Create and connect to a command buffer in the GPU process. | 77 // Create and connect to a command buffer in the GPU process. |
| 78 CommandBufferProxy* CreateViewCommandBuffer( | 78 CommandBufferProxy* CreateViewCommandBuffer( |
| 79 int render_view_id, | 79 int render_view_id, |
| 80 CommandBufferProxy* share_group, | 80 CommandBufferProxy* share_group, |
| 81 const std::string& allowed_extensions, | 81 const std::string& allowed_extensions, |
| 82 const std::vector<int32>& attribs, | 82 const std::vector<int32>& attribs, |
| 83 const GURL& active_url, | 83 const GURL& active_url, |
| 84 gfx::GpuPreference gpu_preference); | 84 gfx::GpuPreference gpu_preference); |
| 85 | 85 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 public: | 151 public: |
| 152 explicit MessageFilter(GpuChannelHost* parent); | 152 explicit MessageFilter(GpuChannelHost* parent); |
| 153 virtual ~MessageFilter(); | 153 virtual ~MessageFilter(); |
| 154 | 154 |
| 155 void AddRoute(int route_id, | 155 void AddRoute(int route_id, |
| 156 base::WeakPtr<IPC::Channel::Listener> listener, | 156 base::WeakPtr<IPC::Channel::Listener> listener, |
| 157 scoped_refptr<base::MessageLoopProxy> loop); | 157 scoped_refptr<base::MessageLoopProxy> loop); |
| 158 void RemoveRoute(int route_id); | 158 void RemoveRoute(int route_id); |
| 159 | 159 |
| 160 // IPC::ChannelProxy::MessageFilter implementation: | 160 // IPC::ChannelProxy::MessageFilter implementation: |
| 161 virtual bool OnMessageReceived(const IPC::Message& msg); | 161 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
| 162 virtual void OnChannelError(); | 162 virtual void OnChannelError() OVERRIDE; |
| 163 | 163 |
| 164 private: | 164 private: |
| 165 GpuChannelHost* parent_; | 165 GpuChannelHost* parent_; |
| 166 | 166 |
| 167 typedef base::hash_map<int, | 167 typedef base::hash_map<int, |
| 168 scoped_refptr<GpuChannelHost::Listener> > ListenerMap; | 168 scoped_refptr<GpuChannelHost::Listener> > ListenerMap; |
| 169 ListenerMap listeners_; | 169 ListenerMap listeners_; |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 State state_; | 172 State state_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 188 // textures. These messages are routed to TransportTextureHost. | 188 // textures. These messages are routed to TransportTextureHost. |
| 189 scoped_refptr<TransportTextureService> transport_texture_service_; | 189 scoped_refptr<TransportTextureService> transport_texture_service_; |
| 190 | 190 |
| 191 // A filter for sending messages from thread other than the main thread. | 191 // A filter for sending messages from thread other than the main thread. |
| 192 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; | 192 scoped_refptr<IPC::SyncMessageFilter> sync_filter_; |
| 193 | 193 |
| 194 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 194 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 195 }; | 195 }; |
| 196 | 196 |
| 197 #endif // CONTENT_RENDERER_GPU_GPU_CHANNEL_HOST_H_ | 197 #endif // CONTENT_RENDERER_GPU_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |