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 | 7 |
8 // This class lives on the UI thread and supports classes like the | 8 // This class lives on the UI thread and supports classes like the |
9 // BackingStoreProxy, which must live on the UI thread. The IO thread | 9 // BackingStoreProxy, which must live on the UI thread. The IO thread |
10 // portion of this class, the GpuProcessHost, is responsible for | 10 // portion of this class, the GpuProcessHost, is responsible for |
11 // shuttling messages between the browser and GPU processes. | 11 // shuttling messages between the browser and GPU processes. |
12 | 12 |
13 #include "base/singleton.h" | 13 #include "base/singleton.h" |
| 14 #include "base/mp/message_router.h" |
14 #include "chrome/common/gpu_native_window_handle.h" | 15 #include "chrome/common/gpu_native_window_handle.h" |
15 #include "chrome/common/message_router.h" | |
16 #include "ipc/ipc_channel.h" | 16 #include "ipc/ipc_channel.h" |
17 #include "gfx/native_widget_types.h" | 17 #include "gfx/native_widget_types.h" |
18 | 18 |
19 class GpuProcessHostUIShim : public IPC::Channel::Sender, | 19 class GpuProcessHostUIShim : public IPC::Channel::Sender, |
20 public IPC::Channel::Listener { | 20 public IPC::Channel::Listener { |
21 public: | 21 public: |
22 // Getter for the singleton. This will return NULL on failure. | 22 // Getter for the singleton. This will return NULL on failure. |
23 static GpuProcessHostUIShim* Get(); | 23 static GpuProcessHostUIShim* Get(); |
24 | 24 |
25 int32 GetNextRoutingId(); | 25 int32 GetNextRoutingId(); |
(...skipping 16 matching lines...) Expand all Loading... |
42 void RemoveRoute(int32 routing_id); | 42 void RemoveRoute(int32 routing_id); |
43 | 43 |
44 private: | 44 private: |
45 friend struct DefaultSingletonTraits<GpuProcessHostUIShim>; | 45 friend struct DefaultSingletonTraits<GpuProcessHostUIShim>; |
46 | 46 |
47 GpuProcessHostUIShim(); | 47 GpuProcessHostUIShim(); |
48 virtual ~GpuProcessHostUIShim(); | 48 virtual ~GpuProcessHostUIShim(); |
49 | 49 |
50 int last_routing_id_; | 50 int last_routing_id_; |
51 | 51 |
52 MessageRouter router_; | 52 base::MessageRouter router_; |
53 }; | 53 }; |
54 | 54 |
55 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ | 55 #endif // CHROME_BROWSER_GPU_PROCESS_HOST_UI_SHIM_H_ |
56 | 56 |
OLD | NEW |