| Index: cc/test/fake_content_layer_client.h
|
| diff --git a/cc/test/fake_content_layer_client.h b/cc/test/fake_content_layer_client.h
|
| index 53548338c0304730d2f35b1ed3af1c121c1e7d29..7170c6abd355c2f09b26abb194a7338dbc6b4827 100644
|
| --- a/cc/test/fake_content_layer_client.h
|
| +++ b/cc/test/fake_content_layer_client.h
|
| @@ -11,6 +11,8 @@
|
| #include <vector>
|
|
|
| #include "base/compiler_specific.h"
|
| +#include "base/macros.h"
|
| +#include "base/memory/scoped_ptr.h"
|
| #include "cc/layers/content_layer_client.h"
|
| #include "third_party/skia/include/core/SkPaint.h"
|
| #include "ui/gfx/geometry/rect.h"
|
| @@ -21,6 +23,16 @@ class SkImage;
|
|
|
| namespace cc {
|
|
|
| +class FakeOnPaintDelegate {
|
| + public:
|
| + FakeOnPaintDelegate() {}
|
| + virtual ~FakeOnPaintDelegate() {}
|
| + virtual void OnPaint(SkCanvas* canvas,
|
| + const gfx::Rect& invalidation) = 0;
|
| + private:
|
| + DISALLOW_COPY_AND_ASSIGN(FakeOnPaintDelegate);
|
| +};
|
| +
|
| class FakeContentLayerClient : public ContentLayerClient {
|
| public:
|
| struct ImageData {
|
| @@ -91,6 +103,10 @@ class FakeContentLayerClient : public ContentLayerClient {
|
| bounds_set_ = true;
|
| }
|
|
|
| + void set_on_paint_delegate(scoped_ptr<FakeOnPaintDelegate> delegate) {
|
| + delegate_ = std::move(delegate);
|
| + }
|
| +
|
| private:
|
| typedef std::vector<std::pair<gfx::RectF, SkPaint>> RectPaintVector;
|
| typedef std::vector<ImageData> ImageVector;
|
| @@ -104,6 +120,7 @@ class FakeContentLayerClient : public ContentLayerClient {
|
| size_t reported_memory_usage_;
|
| gfx::Size bounds_;
|
| bool bounds_set_;
|
| + scoped_ptr<FakeOnPaintDelegate> delegate_;
|
| };
|
|
|
| } // namespace cc
|
|
|