| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_GPU_CHANNEL_HOST_H_ | 5 #ifndef CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
| 6 #define CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 6 #define CHROME_RENDERER_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 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 // Called on the render thread | 42 // Called on the render thread |
| 43 GpuChannelHost(); | 43 GpuChannelHost(); |
| 44 ~GpuChannelHost(); | 44 ~GpuChannelHost(); |
| 45 | 45 |
| 46 // Connect to GPU process channel. | 46 // Connect to GPU process channel. |
| 47 void Connect(const IPC::ChannelHandle& channel_handle); | 47 void Connect(const IPC::ChannelHandle& channel_handle); |
| 48 | 48 |
| 49 State state() const { return state_; } | 49 State state() const { return state_; } |
| 50 | 50 |
| 51 // Change state to kLost. |
| 52 void SetStateLost(); |
| 53 |
| 51 // The GPU stats reported by the GPU process. | 54 // The GPU stats reported by the GPU process. |
| 52 void set_gpu_info(const GPUInfo& gpu_info); | 55 void set_gpu_info(const GPUInfo& gpu_info); |
| 53 const GPUInfo& gpu_info() const; | 56 const GPUInfo& gpu_info() const; |
| 54 | 57 |
| 55 // IPC::Channel::Listener implementation: | 58 // IPC::Channel::Listener implementation: |
| 56 virtual bool OnMessageReceived(const IPC::Message& msg); | 59 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 57 virtual void OnChannelConnected(int32 peer_pid); | 60 virtual void OnChannelConnected(int32 peer_pid); |
| 58 virtual void OnChannelError(); | 61 virtual void OnChannelError(); |
| 59 | 62 |
| 60 // IPC::Message::Sender implementation: | 63 // IPC::Message::Sender implementation: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ProxyMap proxies_; | 102 ProxyMap proxies_; |
| 100 | 103 |
| 101 // This is a MessageFilter to intercept IPC messages and distribute them | 104 // This is a MessageFilter to intercept IPC messages and distribute them |
| 102 // to the corresponding GpuVideoDecoderHost. | 105 // to the corresponding GpuVideoDecoderHost. |
| 103 scoped_refptr<GpuVideoServiceHost> gpu_video_service_host_; | 106 scoped_refptr<GpuVideoServiceHost> gpu_video_service_host_; |
| 104 | 107 |
| 105 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); | 108 DISALLOW_COPY_AND_ASSIGN(GpuChannelHost); |
| 106 }; | 109 }; |
| 107 | 110 |
| 108 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ | 111 #endif // CHROME_RENDERER_GPU_CHANNEL_HOST_H_ |
| OLD | NEW |