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_GPU_GPU_CHANNEL_MANAGER_H_ | 5 #ifndef CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
6 #define CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ | 6 #define CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 29 matching lines...) Expand all Loading... |
40 // a pointer to IPC::Message::Sender, which can be implemented by other hosts | 40 // a pointer to IPC::Message::Sender, which can be implemented by other hosts |
41 // to send IPC messages to the browser process IO thread on the | 41 // to send IPC messages to the browser process IO thread on the |
42 // GpuChannelManager's behalf. | 42 // GpuChannelManager's behalf. |
43 class GpuChannelManager : public IPC::Channel::Listener, | 43 class GpuChannelManager : public IPC::Channel::Listener, |
44 public IPC::Message::Sender { | 44 public IPC::Message::Sender { |
45 public: | 45 public: |
46 GpuChannelManager(IPC::Message::Sender* browser_channel, | 46 GpuChannelManager(IPC::Message::Sender* browser_channel, |
47 GpuWatchdog* watchdog, | 47 GpuWatchdog* watchdog, |
48 base::MessageLoopProxy* io_message_loop, | 48 base::MessageLoopProxy* io_message_loop, |
49 base::WaitableEvent* shutdown_event); | 49 base::WaitableEvent* shutdown_event); |
50 ~GpuChannelManager(); | 50 virtual ~GpuChannelManager(); |
51 | 51 |
52 // Remove the channel for a particular renderer. | 52 // Remove the channel for a particular renderer. |
53 void RemoveChannel(int renderer_id); | 53 void RemoveChannel(int renderer_id); |
54 | 54 |
55 // Listener overrides. | 55 // Listener overrides. |
56 virtual bool OnMessageReceived(const IPC::Message& msg); | 56 virtual bool OnMessageReceived(const IPC::Message& msg); |
57 | 57 |
58 // Sender overrides. | 58 // Sender overrides. |
59 virtual bool Send(IPC::Message* msg); | 59 virtual bool Send(IPC::Message* msg); |
60 | 60 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 // one channel for each renderer process that has connected to this GPU | 95 // one channel for each renderer process that has connected to this GPU |
96 // process. | 96 // process. |
97 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; | 97 typedef base::hash_map<int, scoped_refptr<GpuChannel> > GpuChannelMap; |
98 GpuChannelMap gpu_channels_; | 98 GpuChannelMap gpu_channels_; |
99 GpuWatchdog* watchdog_; | 99 GpuWatchdog* watchdog_; |
100 | 100 |
101 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); | 101 DISALLOW_COPY_AND_ASSIGN(GpuChannelManager); |
102 }; | 102 }; |
103 | 103 |
104 #endif // CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ | 104 #endif // CONTENT_GPU_GPU_CHANNEL_MANAGER_H_ |
OLD | NEW |