| 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 "gfx/native_widget_types.h" | 15 #include "gfx/native_widget_types.h" |
| 16 | 16 |
| 17 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; | 17 struct GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params; |
| 18 class GPUInfo; | 18 class GPUInfo; |
| 19 class ResourceMessageFilter; | 19 class ResourceMessageFilter; |
| 20 | 20 |
| 21 namespace gfx { |
| 22 class Size; |
| 23 } |
| 24 |
| 21 namespace IPC { | 25 namespace IPC { |
| 22 struct ChannelHandle; | 26 struct ChannelHandle; |
| 23 class Message; | 27 class Message; |
| 24 } | 28 } |
| 25 | 29 |
| 26 class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { | 30 class GpuProcessHost : public BrowserChildProcessHost, public NonThreadSafe { |
| 27 public: | 31 public: |
| 28 // Getter for the singleton. This will return NULL on failure. | 32 // Getter for the singleton. This will return NULL on failure. |
| 29 static GpuProcessHost* Get(); | 33 static GpuProcessHost* Get(); |
| 30 | 34 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 bool Init(); | 79 bool Init(); |
| 76 | 80 |
| 77 void OnControlMessageReceived(const IPC::Message& message); | 81 void OnControlMessageReceived(const IPC::Message& message); |
| 78 | 82 |
| 79 // Message handlers. | 83 // Message handlers. |
| 80 void OnChannelEstablished(const IPC::ChannelHandle& channel_handle, | 84 void OnChannelEstablished(const IPC::ChannelHandle& channel_handle, |
| 81 const GPUInfo& gpu_info); | 85 const GPUInfo& gpu_info); |
| 82 void OnSynchronizeReply(); | 86 void OnSynchronizeReply(); |
| 83 #if defined(OS_LINUX) | 87 #if defined(OS_LINUX) |
| 84 void OnGetViewXID(gfx::NativeViewId id, IPC::Message* reply_msg); | 88 void OnGetViewXID(gfx::NativeViewId id, IPC::Message* reply_msg); |
| 89 void OnResizeXID(unsigned long xid, gfx::Size size, IPC::Message* reply_msg); |
| 85 #elif defined(OS_MACOSX) | 90 #elif defined(OS_MACOSX) |
| 86 void OnAcceleratedSurfaceSetIOSurface( | 91 void OnAcceleratedSurfaceSetIOSurface( |
| 87 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); | 92 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); |
| 88 void OnAcceleratedSurfaceBuffersSwapped(int32 renderer_id, | 93 void OnAcceleratedSurfaceBuffersSwapped(int32 renderer_id, |
| 89 int32 render_view_id, | 94 int32 render_view_id, |
| 90 gfx::PluginWindowHandle window, | 95 gfx::PluginWindowHandle window, |
| 91 uint64 surface_id); | 96 uint64 surface_id); |
| 92 #endif | 97 #endif |
| 93 | 98 |
| 94 // Sends the response for establish channel request to the renderer. | 99 // Sends the response for establish channel request to the renderer. |
| (...skipping 22 matching lines...) Expand all Loading... |
| 117 // the GPU process, but haven't heard back about yet. | 122 // the GPU process, but haven't heard back about yet. |
| 118 std::queue<ChannelRequest> sent_requests_; | 123 std::queue<ChannelRequest> sent_requests_; |
| 119 | 124 |
| 120 // The pending synchronization requests we need to reply to. | 125 // The pending synchronization requests we need to reply to. |
| 121 std::queue<SynchronizationRequest> queued_synchronization_replies_; | 126 std::queue<SynchronizationRequest> queued_synchronization_replies_; |
| 122 | 127 |
| 123 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); | 128 DISALLOW_COPY_AND_ASSIGN(GpuProcessHost); |
| 124 }; | 129 }; |
| 125 | 130 |
| 126 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ | 131 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_H_ |
| OLD | NEW |