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_UI_SHIM_H_ | 5 #ifndef CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
6 #define CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 6 #define CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 // This class lives on the UI thread and supports classes like the | 9 // This class lives on the UI thread and supports classes like the |
10 // BackingStoreProxy, which must live on the UI thread. The IO thread | 10 // BackingStoreProxy, which must live on the UI thread. The IO thread |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 gpu_info_collected_callback_.reset(callback); | 70 gpu_info_collected_callback_.reset(callback); |
71 } | 71 } |
72 | 72 |
73 private: | 73 private: |
74 friend struct DefaultSingletonTraits<GpuProcessHostUIShim>; | 74 friend struct DefaultSingletonTraits<GpuProcessHostUIShim>; |
75 | 75 |
76 GpuProcessHostUIShim(); | 76 GpuProcessHostUIShim(); |
77 virtual ~GpuProcessHostUIShim(); | 77 virtual ~GpuProcessHostUIShim(); |
78 | 78 |
79 // Message handlers. | 79 // Message handlers. |
| 80 void OnDestroyCommandBuffer(gfx::PluginWindowHandle window, |
| 81 int32 renderer_id, int32 render_view_id); |
80 void OnGraphicsInfoCollected(const GPUInfo& gpu_info); | 82 void OnGraphicsInfoCollected(const GPUInfo& gpu_info); |
81 bool OnControlMessageReceived(const IPC::Message& message); | 83 bool OnControlMessageReceived(const IPC::Message& message); |
82 | 84 |
83 #if defined(OS_LINUX) | 85 #if defined(OS_LINUX) |
84 void OnGetViewXID(gfx::NativeViewId id, IPC::Message* reply_msg); | |
85 void OnReleaseXID(unsigned long xid); | |
86 void OnResizeXID(unsigned long xid, gfx::Size size, IPC::Message* reply_msg); | 86 void OnResizeXID(unsigned long xid, gfx::Size size, IPC::Message* reply_msg); |
87 #elif defined(OS_MACOSX) | 87 #elif defined(OS_MACOSX) |
88 void OnAcceleratedSurfaceSetIOSurface( | 88 void OnAcceleratedSurfaceSetIOSurface( |
89 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); | 89 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); |
90 void OnAcceleratedSurfaceBuffersSwapped( | 90 void OnAcceleratedSurfaceBuffersSwapped( |
91 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); | 91 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); |
92 #elif defined(OS_WIN) | 92 #elif defined(OS_WIN) |
93 void OnGetCompositorHostWindow(int renderer_id, | |
94 int render_view_id, | |
95 IPC::Message* reply_message); | |
96 void OnScheduleComposite(int32 renderer_id, int32 render_view_id); | 93 void OnScheduleComposite(int32 renderer_id, int32 render_view_id); |
97 #endif | 94 #endif |
98 | 95 |
99 int last_routing_id_; | 96 int last_routing_id_; |
100 | 97 |
101 GPUInfo gpu_info_; | 98 GPUInfo gpu_info_; |
102 | 99 |
103 MessageRouter router_; | 100 MessageRouter router_; |
104 | 101 |
105 // Used only in testing. If set, the callback is invoked when the GPU info | 102 // Used only in testing. If set, the callback is invoked when the GPU info |
106 // has been collected. | 103 // has been collected. |
107 scoped_ptr<Callback0::Type> gpu_info_collected_callback_; | 104 scoped_ptr<Callback0::Type> gpu_info_collected_callback_; |
108 }; | 105 }; |
109 | 106 |
110 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 107 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
111 | 108 |
OLD | NEW |