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 22 matching lines...) Expand all Loading... |
33 | 33 |
34 namespace IPC { | 34 namespace IPC { |
35 struct ChannelHandle; | 35 struct ChannelHandle; |
36 class Message; | 36 class Message; |
37 } | 37 } |
38 | 38 |
39 // A task that will forward an IPC message to the UI shim. | 39 // A task that will forward an IPC message to the UI shim. |
40 class RouteToGpuProcessHostUIShimTask : public Task { | 40 class RouteToGpuProcessHostUIShimTask : public Task { |
41 public: | 41 public: |
42 RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg); | 42 RouteToGpuProcessHostUIShimTask(int host_id, const IPC::Message& msg); |
43 ~RouteToGpuProcessHostUIShimTask(); | 43 virtual ~RouteToGpuProcessHostUIShimTask(); |
44 | 44 |
45 private: | 45 private: |
46 virtual void Run(); | 46 virtual void Run(); |
47 | 47 |
48 int host_id_; | 48 int host_id_; |
49 IPC::Message msg_; | 49 IPC::Message msg_; |
50 }; | 50 }; |
51 | 51 |
52 class GpuProcessHostUIShim | 52 class GpuProcessHostUIShim |
53 : public IPC::Channel::Listener, | 53 : public IPC::Channel::Listener, |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 // GpuChannelManager or null otherwise. It must be called and deleted on the | 114 // GpuChannelManager or null otherwise. It must be called and deleted on the |
115 // GPU thread. | 115 // GPU thread. |
116 GpuChannelManager* gpu_channel_manager_; | 116 GpuChannelManager* gpu_channel_manager_; |
117 | 117 |
118 // This is likewise single process / in process GPU specific. This is a Sender | 118 // This is likewise single process / in process GPU specific. This is a Sender |
119 // implementation that forwards IPC messages to this UI shim on the UI thread. | 119 // implementation that forwards IPC messages to this UI shim on the UI thread. |
120 IPC::Channel::Sender* ui_thread_sender_; | 120 IPC::Channel::Sender* ui_thread_sender_; |
121 }; | 121 }; |
122 | 122 |
123 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ | 123 #endif // CONTENT_BROWSER_GPU_GPU_PROCESS_HOST_UI_SHIM_H_ |
OLD | NEW |