More cr.ui.FocusRow simplifications
[chromium-blink-merge.git] / media / cast / test / linux_output_window.h
blob5907da207eac0e2360ff393e2c2fc54813e91103
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 Display* display_;
45 Window window_;
46 XShmSegmentInfo shminfo_;
47 GC gc_;
48 XImage* image_;
51 } // namespace test
52 } // namespace cast
53 } // namespace media
55 #endif // MEDIA_CAST_TEST_LINUX_OUTPUT_WINDOW_H_