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 UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ | 5 #ifndef UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ |
6 #define UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ | 6 #define UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
12 #include "ui/gfx/compositor/compositor.h" | 12 #include "ui/gfx/compositor/compositor.h" |
13 | 13 |
14 namespace ui { | 14 namespace ui { |
15 | 15 |
16 class TestCompositorDelegate; | 16 class TestCompositorDelegate; |
17 | 17 |
18 // Trivial Compositor implementation that creates Textures of type TestTexture. | 18 // Trivial Compositor implementation that creates Textures of type TestTexture. |
19 class TestCompositor : public ui::Compositor { | 19 class TestCompositor : public ui::Compositor { |
20 public: | 20 public: |
21 TestCompositor(); | 21 TestCompositor(); |
22 virtual ~TestCompositor(); | 22 virtual ~TestCompositor(); |
23 | 23 |
24 // ui::Compositor: | 24 // ui::Compositor: |
25 virtual ui::Texture* CreateTexture() OVERRIDE; | 25 virtual ui::Texture* CreateTexture() OVERRIDE; |
26 virtual void OnNotifyStart(bool clear) OVERRIDE; | 26 virtual void OnNotifyStart(bool clear) OVERRIDE; |
27 virtual void OnNotifyEnd() OVERRIDE; | 27 virtual void OnNotifyEnd() OVERRIDE; |
28 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; | 28 virtual void Blur(const gfx::Rect& bounds) OVERRIDE; |
| 29 virtual void DrawTree() OVERRIDE; |
29 | 30 |
30 protected: | 31 protected: |
31 virtual void OnWidgetSizeChanged() OVERRIDE; | 32 virtual void OnWidgetSizeChanged() OVERRIDE; |
32 | 33 |
33 private: | 34 private: |
34 scoped_ptr<TestCompositorDelegate> owned_delegate_; | 35 scoped_ptr<TestCompositorDelegate> owned_delegate_; |
35 | 36 |
36 DISALLOW_COPY_AND_ASSIGN(TestCompositor); | 37 DISALLOW_COPY_AND_ASSIGN(TestCompositor); |
37 }; | 38 }; |
38 | 39 |
39 } // namespace ui | 40 } // namespace ui |
40 | 41 |
41 #endif // UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ | 42 #endif // UI_GFX_COMPOSITOR_TEST_COMPOSITOR_H_ |
OLD | NEW |