summaryrefslogtreecommitdiffstats
path: root/chrome/gpu/gpu_video_layer_glx.h
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/gpu/gpu_video_layer_glx.h')
-rw-r--r--chrome/gpu/gpu_video_layer_glx.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/chrome/gpu/gpu_video_layer_glx.h b/chrome/gpu/gpu_video_layer_glx.h
new file mode 100644
index 0000000..772ff6f
--- /dev/null
+++ b/chrome/gpu/gpu_video_layer_glx.h
@@ -0,0 +1,46 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_
+#define CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_
+
+#include "base/basictypes.h"
+#include "base/process.h"
+#include "chrome/common/transport_dib.h"
+#include "chrome/common/x11_util.h"
+#include "ipc/ipc_channel.h"
+
+class GpuViewX;
+class GpuThread;
+
+class GpuVideoLayerGLX : public IPC::Channel::Listener {
+ public:
+ GpuVideoLayerGLX(GpuViewX* view,
+ GpuThread* gpu_thread,
+ int32 routing_id,
+ const gfx::Size& size);
+ virtual ~GpuVideoLayerGLX();
+
+ const gfx::Size& size() const { return size_; }
+
+ // IPC::Channel::Listener implementation.
+ virtual void OnMessageReceived(const IPC::Message& message);
+ virtual void OnChannelConnected(int32 peer_pid);
+ virtual void OnChannelError();
+
+ private:
+ // Message handlers.
+ void OnPaintToVideoLayer(base::ProcessId source_process_id,
+ TransportDIB::Id id,
+ const gfx::Rect& bitmap_rect);
+
+ GpuViewX* view_;
+ GpuThread* gpu_thread_;
+ int32 routing_id_;
+ gfx::Size size_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuVideoLayerGLX);
+};
+
+#endif // CHROME_GPU_GPU_VIDEO_LAYER_GLX_H_