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 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/non_thread_safe.h" | 12 #include "base/non_thread_safe.h" |
13 #include "base/ref_counted.h" | 13 #include "base/ref_counted.h" |
14 #include "chrome/browser/browser_child_process_host.h" | 14 #include "chrome/browser/browser_child_process_host.h" |
15 #include "chrome/browser/gpu_blacklist.h" | |
brettw
2010/12/03 00:11:38
I think this can be forward declared instead.
Zhenyao Mo
2010/12/03 18:29:57
Done.
| |
15 #include "gfx/native_widget_types.h" | 16 #include "gfx/native_widget_types.h" |
16 | 17 |
17 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; | 18 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; |
18 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; | 19 struct GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params; |
19 class GPUInfo; | 20 class GPUInfo; |
20 class ResourceMessageFilter; | 21 class ResourceMessageFilter; |
21 | 22 |
22 namespace gfx { | 23 namespace gfx { |
23 class Size; | 24 class Size; |
24 } | 25 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); | 97 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); |
97 #elif defined(OS_WIN) | 98 #elif defined(OS_WIN) |
98 void OnCreateCompositorHostWindow(int renderer_id, | 99 void OnCreateCompositorHostWindow(int renderer_id, |
99 int render_view_id, | 100 int render_view_id, |
100 IPC::Message* reply_message); | 101 IPC::Message* reply_message); |
101 #endif | 102 #endif |
102 | 103 |
103 // Sends the response for establish channel request to the renderer. | 104 // Sends the response for establish channel request to the renderer. |
104 void SendEstablishChannelReply(const IPC::ChannelHandle& channel, | 105 void SendEstablishChannelReply(const IPC::ChannelHandle& channel, |
105 const GPUInfo& gpu_info, | 106 const GPUInfo& gpu_info, |
107 const GpuFeatureFlags& gpu_feature_flags, | |
106 ResourceMessageFilter* filter); | 108 ResourceMessageFilter* filter); |
107 // Sends the response for synchronization request to the renderer. | 109 // Sends the response for synchronization request to the renderer. |
108 void SendSynchronizationReply(IPC::Message* reply, | 110 void SendSynchronizationReply(IPC::Message* reply, |
109 ResourceMessageFilter* filter); | 111 ResourceMessageFilter* filter); |
110 | 112 |
111 // ResourceDispatcherHost::Receiver implementation: | 113 // ResourceDispatcherHost::Receiver implementation: |
112 virtual URLRequestContext* GetRequestContext( | 114 virtual URLRequestContext* GetRequestContext( |
113 uint32 request_id, | 115 uint32 request_id, |
114 const ViewHostMsg_Resource_Request& request_data); | 116 const ViewHostMsg_Resource_Request& request_data); |
115 | 117 |
116 virtual bool CanShutdown(); | 118 virtual bool CanShutdown(); |
117 virtual void OnChildDied(); | 119 virtual void OnChildDied(); |
118 virtual void OnProcessCrashed(); | 120 virtual void OnProcessCrashed(); |
119 | 121 |
120 bool CanLaunchGpuProcess() const; | 122 bool CanLaunchGpuProcess() const; |
121 bool LaunchGpuProcess(); | 123 bool LaunchGpuProcess(); |
122 | 124 |
125 bool LoadGpuBlacklist(); | |
126 | |
123 bool initialized_; | 127 bool initialized_; |
124 bool initialized_successfully_; | 128 bool initialized_successfully_; |
125 | 129 |
130 scoped_ptr<GpuBlacklist> gpu_blacklist_; | |
131 | |
126 // These are the channel requests that we have already sent to | 132 // These are the channel requests that we have already sent to |
127 // the GPU process, but haven't heard back about yet. | 133 // the GPU process, but haven't heard back about yet. |
128 std::queue<ChannelRequest> sent_requests_; | 134 std::queue<ChannelRequest> sent_requests_; |
129 | 135 |
130 // The pending synchronization requests we need to reply to. | 136 // The pending synchronization requests we need to reply to. |
131 std::queue<SynchronizationRequest> queued_synchronization_replies_; | 137 std::queue<SynchronizationRequest> queued_synchronization_replies_; |
132 | 138 |
133 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 139 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
134 }; | 140 }; |
135 | 141 |
136 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 142 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
OLD | NEW |