| 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_BROWSER_GPU_PROCESS_HOST_H_ | 5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
| 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <queue> | 9 #include <queue> |
| 10 | 10 |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 #endif | 100 #endif |
| 101 | 101 |
| 102 // Sends the response for establish channel request to the renderer. | 102 // Sends the response for establish channel request to the renderer. |
| 103 void SendEstablishChannelReply(const IPC::ChannelHandle& channel, | 103 void SendEstablishChannelReply(const IPC::ChannelHandle& channel, |
| 104 const GPUInfo& gpu_info, | 104 const GPUInfo& gpu_info, |
| 105 RenderMessageFilter* filter); | 105 RenderMessageFilter* filter); |
| 106 // Sends the response for synchronization request to the renderer. | 106 // Sends the response for synchronization request to the renderer. |
| 107 void SendSynchronizationReply(IPC::Message* reply, | 107 void SendSynchronizationReply(IPC::Message* reply, |
| 108 RenderMessageFilter* filter); | 108 RenderMessageFilter* filter); |
| 109 | 109 |
| 110 // Sends outstanding replies to renderer processes. This is only called |
| 111 // in error situations like the GPU process crashing -- but is necessary |
| 112 // to prevent the renderer process from hanging. |
| 113 void SendOutstandingReplies(); |
| 114 |
| 110 virtual bool CanShutdown(); | 115 virtual bool CanShutdown(); |
| 111 virtual void OnChildDied(); | 116 virtual void OnChildDied(); |
| 112 virtual void OnProcessCrashed(int exit_code); | 117 virtual void OnProcessCrashed(int exit_code); |
| 113 | 118 |
| 114 bool CanLaunchGpuProcess() const; | 119 bool CanLaunchGpuProcess() const; |
| 115 bool LaunchGpuProcess(); | 120 bool LaunchGpuProcess(); |
| 116 | 121 |
| 117 bool LoadGpuBlacklist(); | 122 bool LoadGpuBlacklist(); |
| 118 | 123 |
| 119 bool initialized_; | 124 bool initialized_; |
| 120 bool initialized_successfully_; | 125 bool initialized_successfully_; |
| 121 | 126 |
| 122 scoped_ptr<GpuBlacklist> gpu_blacklist_; | 127 scoped_ptr<GpuBlacklist> gpu_blacklist_; |
| 123 | 128 |
| 124 // These are the channel requests that we have already sent to | 129 // These are the channel requests that we have already sent to |
| 125 // the GPU process, but haven't heard back about yet. | 130 // the GPU process, but haven't heard back about yet. |
| 126 std::queue<ChannelRequest> sent_requests_; | 131 std::queue<ChannelRequest> sent_requests_; |
| 127 | 132 |
| 128 // The pending synchronization requests we need to reply to. | 133 // The pending synchronization requests we need to reply to. |
| 129 std::queue<SynchronizationRequest> queued_synchronization_replies_; | 134 std::queue<SynchronizationRequest> queued_synchronization_replies_; |
| 130 | 135 |
| 131 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 136 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 132 }; | 137 }; |
| 133 | 138 |
| 134 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 139 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
| OLD | NEW |