| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 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 | 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 #include "ui/compositor/test/test_compositor_host.h" | 5 #include "ui/compositor/test/test_compositor_host.h" |
| 6 | 6 |
| 7 #include <X11/Xlib.h> | 7 #include <X11/Xlib.h> |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/logging.h" | 12 #include "base/logging.h" |
| 13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/memory/weak_ptr.h" | 14 #include "base/memory/weak_ptr.h" |
| 15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
| 16 #include "ui/compositor/compositor.h" | 16 #include "ui/compositor/compositor.h" |
| 17 #include "ui/gfx/rect.h" | 17 #include "ui/gfx/rect.h" |
| 18 #include "ui/gfx/x/x11_types.h" | 18 #include "ui/gfx/x/x11_types.h" |
| 19 | 19 |
| 20 namespace ui { | 20 namespace ui { |
| 21 | 21 |
| 22 class TestCompositorHostX11 : public TestCompositorHost { | 22 class TestCompositorHostX11 : public TestCompositorHost { |
| 23 public: | 23 public: |
| 24 TestCompositorHostX11(const gfx::Rect& bounds, | 24 TestCompositorHostX11(const gfx::Rect& bounds, |
| 25 ui::ContextFactory* context_factory); | 25 ui::ContextFactory* context_factory); |
| 26 virtual ~TestCompositorHostX11(); | 26 virtual ~TestCompositorHostX11(); |
| 27 | 27 |
| 28 private: | 28 private: |
| 29 // Overridden from TestCompositorHost: | 29 // Overridden from TestCompositorHost: |
| 30 virtual void Show() OVERRIDE; | 30 virtual void Show() override; |
| 31 virtual ui::Compositor* GetCompositor() OVERRIDE; | 31 virtual ui::Compositor* GetCompositor() override; |
| 32 | 32 |
| 33 gfx::Rect bounds_; | 33 gfx::Rect bounds_; |
| 34 | 34 |
| 35 ui::ContextFactory* context_factory_; | 35 ui::ContextFactory* context_factory_; |
| 36 | 36 |
| 37 scoped_ptr<ui::Compositor> compositor_; | 37 scoped_ptr<ui::Compositor> compositor_; |
| 38 | 38 |
| 39 XID window_; | 39 XID window_; |
| 40 | 40 |
| 41 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostX11); | 41 DISALLOW_COPY_AND_ASSIGN(TestCompositorHostX11); |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 } | 84 } |
| 85 | 85 |
| 86 // static | 86 // static |
| 87 TestCompositorHost* TestCompositorHost::Create( | 87 TestCompositorHost* TestCompositorHost::Create( |
| 88 const gfx::Rect& bounds, | 88 const gfx::Rect& bounds, |
| 89 ui::ContextFactory* context_factory) { | 89 ui::ContextFactory* context_factory) { |
| 90 return new TestCompositorHostX11(bounds, context_factory); | 90 return new TestCompositorHostX11(bounds, context_factory); |
| 91 } | 91 } |
| 92 | 92 |
| 93 } // namespace ui | 93 } // namespace ui |
| OLD | NEW |