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

Unified Diff: cc/test/layer_internals_for_test.h

Issue 2128633002: cc: Set up the framework to restrict access to Layer internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move out the inner struct. Created 4 years, 5 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/test/fake_picture_layer.cc ('k') | cc/test/layer_internals_for_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/layer_internals_for_test.h
diff --git a/cc/test/layer_internals_for_test.h b/cc/test/layer_internals_for_test.h
new file mode 100644
index 0000000000000000000000000000000000000000..58fce8c9fd201267a2bc32bd333df33df4e58e85
--- /dev/null
+++ b/cc/test/layer_internals_for_test.h
@@ -0,0 +1,28 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CC_TEST_LAYER_INTERNALS_FOR_TEST_H_
+#define CC_TEST_LAYER_INTERNALS_FOR_TEST_H_
+
+#include "base/macros.h"
+#include "cc/layers/layer.h"
+
+namespace cc {
+
+// Utility class to give tests access to Layer private methods.
+class LayerInternalsForTest {
+ public:
+ explicit LayerInternalsForTest(Layer* layer);
+
+ void OnOpacityAnimated(float opacity);
+ void OnTransformAnimated(const gfx::Transform& transform);
+ void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset);
+
+ private:
+ Layer* layer_;
+};
+
+} // namespace cc
+
+#endif // CC_TEST_LAYER_INTERNALS_FOR_TEST_H_
« no previous file with comments | « cc/test/fake_picture_layer.cc ('k') | cc/test/layer_internals_for_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698