Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(420)

Unified Diff: cc/test/fake_content_layer_client.h

Issue 1673193002: HBitmap can't be immutable Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/playback/display_list_raster_source_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « cc/playback/display_list_raster_source_unittest.cc ('k') | cc/test/fake_content_layer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698