| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 CONTENT_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 5 #ifndef CONTENT_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
| 6 #define CONTENT_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 6 #define CONTENT_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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 | 88 |
| 89 private: | 89 private: |
| 90 explicit GpuProcessHostUIShim(int host_id); | 90 explicit GpuProcessHostUIShim(int host_id); |
| 91 virtual ~GpuProcessHostUIShim(); | 91 virtual ~GpuProcessHostUIShim(); |
| 92 | 92 |
| 93 // Message handlers. | 93 // Message handlers. |
| 94 bool OnControlMessageReceived(const IPC::Message& message); | 94 bool OnControlMessageReceived(const IPC::Message& message); |
| 95 | 95 |
| 96 void OnLogMessage(int level, const std::string& header, | 96 void OnLogMessage(int level, const std::string& header, |
| 97 const std::string& message); | 97 const std::string& message); |
| 98 #if defined(OS_LINUX) | 98 #if defined(OS_LINUX) && !defined(TOUCH_UI) || defined(OS_WIN) |
| 99 void OnResizeXID(unsigned long xid, gfx::Size size, IPC::Message* reply_msg); | 99 void OnResizeView(int32 renderer_id, |
| 100 int32 render_view_id, |
| 101 int32 command_buffer_route_id, |
| 102 gfx::Size size); |
| 100 #elif defined(OS_MACOSX) | 103 #elif defined(OS_MACOSX) |
| 101 void OnAcceleratedSurfaceSetIOSurface( | 104 void OnAcceleratedSurfaceSetIOSurface( |
| 102 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); | 105 const GpuHostMsg_AcceleratedSurfaceSetIOSurface_Params& params); |
| 103 void OnAcceleratedSurfaceBuffersSwapped( | 106 void OnAcceleratedSurfaceBuffersSwapped( |
| 104 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); | 107 const GpuHostMsg_AcceleratedSurfaceBuffersSwapped_Params& params); |
| 105 #elif defined(OS_WIN) | 108 #endif |
| 109 #if defined(OS_WIN) |
| 106 void OnScheduleComposite(int32 renderer_id, int32 render_view_id); | 110 void OnScheduleComposite(int32 renderer_id, int32 render_view_id); |
| 107 #endif | 111 #endif |
| 108 | 112 |
| 109 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. | 113 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. |
| 110 int host_id_; | 114 int host_id_; |
| 111 | 115 |
| 112 // In single process and in process GPU mode, this references the | 116 // In single process and in process GPU mode, this references the |
| 113 // GpuChannelManager or null otherwise. It must be called and deleted on the | 117 // GpuChannelManager or null otherwise. It must be called and deleted on the |
| 114 // GPU thread. | 118 // GPU thread. |
| 115 GpuChannelManager* gpu_channel_manager_; | 119 GpuChannelManager* gpu_channel_manager_; |
| 116 | 120 |
| 117 // This is likewise single process / in process GPU specific. This is a Sender | 121 // This is likewise single process / in process GPU specific. This is a Sender |
| 118 // implementation that forwards IPC messages to this UI shim on the UI thread. | 122 // implementation that forwards IPC messages to this UI shim on the UI thread. |
| 119 IPC::Channel::Sender* ui_thread_sender_; | 123 IPC::Channel::Sender* ui_thread_sender_; |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 #endif // CONTENT_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 126 #endif // CONTENT_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
| OLD | NEW |