| 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_GPU_PROCESS_HOST_UI_SHIM_H_ | 5 #ifndef CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
| 6 #define CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 6 #define CONTENT_BROWSER_GPU_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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 // IPC::Channel::Sender implementation. | 68 // IPC::Channel::Sender implementation. |
| 69 virtual bool Send(IPC::Message* msg) OVERRIDE; | 69 virtual bool Send(IPC::Message* msg) OVERRIDE; |
| 70 | 70 |
| 71 // IPC::Channel::Listener implementation. | 71 // IPC::Channel::Listener implementation. |
| 72 // The GpuProcessHost causes this to be called on the UI thread to | 72 // The GpuProcessHost causes this to be called on the UI thread to |
| 73 // dispatch the incoming messages from the GPU process, which are | 73 // dispatch the incoming messages from the GPU process, which are |
| 74 // actually received on the IO thread. | 74 // actually received on the IO thread. |
| 75 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 75 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 76 | 76 |
| 77 #if defined(OS_MACOSX) || defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | |
| 78 // TODO(apatrick): Remove this when mac does not use AcceleratedSurfaces for | |
| 79 // when running the GPU thread in the browser process. | |
| 80 // This is now also used in TOUCH_UI builds. | |
| 81 static void SendToGpuHost(int host_id, IPC::Message* msg); | |
| 82 #endif | |
| 83 | |
| 84 private: | 77 private: |
| 85 explicit GpuProcessHostUIShim(int host_id); | 78 explicit GpuProcessHostUIShim(int host_id); |
| 86 virtual ~GpuProcessHostUIShim(); | 79 virtual ~GpuProcessHostUIShim(); |
| 87 | 80 |
| 88 // Message handlers. | 81 // Message handlers. |
| 89 bool OnControlMessageReceived(const IPC::Message& message); | 82 bool OnControlMessageReceived(const IPC::Message& message); |
| 90 | 83 |
| 91 void OnLogMessage(int level, const std::string& header, | 84 void OnLogMessage(int level, const std::string& header, |
| 92 const std::string& message); | 85 const std::string& message); |
| 93 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ | 86 #if defined(TOOLKIT_USES_GTK) && !defined(UI_COMPOSITOR_IMAGE_TRANSPORT) || \ |
| (...skipping 14 matching lines...) Expand all Loading... |
| 108 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) | 101 #if defined(UI_COMPOSITOR_IMAGE_TRANSPORT) |
| 109 void OnAcceleratedSurfaceRelease( | 102 void OnAcceleratedSurfaceRelease( |
| 110 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); | 103 const GpuHostMsg_AcceleratedSurfaceRelease_Params& params); |
| 111 #endif | 104 #endif |
| 112 | 105 |
| 113 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. | 106 // The serial number of the GpuProcessHost / GpuProcessHostUIShim pair. |
| 114 int host_id_; | 107 int host_id_; |
| 115 }; | 108 }; |
| 116 | 109 |
| 117 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 110 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
| OLD | NEW |