Remove Unused AsTextButtonBorder RTTI helper.
[chromium-blink-merge.git] / media / cast / test / linux_output_window.h
blob9a68bff87909f75ecdce57941e9db4d6d3c1d270
1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_
6 #define MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_
8 #include <X11/Xlib.h>
9 #include <X11/Xutil.h>
10 #include <sys/ipc.h>
11 #include <sys/shm.h>
12 #include <X11/extensions/XShm.h>
14 #include <string>
16 #include "base/memory/ref_counted.h"
17 #include "base/memory/scoped_ptr.h"
19 namespace media {
20 class VideoFrame;
23 namespace media {
24 namespace cast {
25 namespace test {
27 class LinuxOutputWindow {
28 public:
29 LinuxOutputWindow(int x_pos,
30 int y_pos,
31 int width,
32 int height,
33 const std::string& name);
34 virtual ~LinuxOutputWindow();
36 void RenderFrame(const scoped_refptr<media::VideoFrame>& video_frame);
38 private:
39 void CreateWindow(int x_pos,
40 int y_pos,
41 int width,
42 int height,
43 const std::string& name);
44 uint8* render_buffer_;
45 Display* display_;
46 Window window_;
47 XShmSegmentInfo shminfo_;
48 GC gc_;
49 XImage* image_;
52 } // namespace test
53 } // namespace cast
54 } // namespace media
56 #endif // MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_