diff options
Diffstat (limited to 'cc/test/fake_content_layer_client.h')
-rw-r--r-- | cc/test/fake_content_layer_client.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h index 85ab26e..c39683d 100644 --- a/cc/test/fake_content_layer_client.h +++ b/cc/test/fake_content_layer_client.h @@ -5,21 +5,31 @@ #ifndef CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ #define CC_TEST_FAKE_CONTENT_LAYER_CLIENT_H_ +#include <vector> + #include "base/compiler_specific.h" #include "cc/content_layer_client.h" +#include "ui/gfx/rect.h" namespace cc { class FakeContentLayerClient : public cc::ContentLayerClient { public: FakeContentLayerClient(); + virtual ~FakeContentLayerClient(); + + virtual void paintContents(SkCanvas*, const gfx::Rect& rect, + gfx::RectF& opaque_rect) OVERRIDE; - virtual void paintContents(SkCanvas*, const gfx::Rect& rect, gfx::RectF& opaqueRect) OVERRIDE; + void setPaintAllOpaque(bool opaque) { paint_all_opaque_ = opaque; } - void setPaintAllOpaque(bool opaque) { m_paintAllOpaque = opaque; } + void addDrawRect(const gfx::Rect& rect) { draw_rects_.push_back(rect); } private: - bool m_paintAllOpaque; + typedef std::vector<gfx::Rect> RectVector; + + bool paint_all_opaque_; + RectVector draw_rects_; }; } // namespace cc |